File tree Expand file tree Collapse file tree 8 files changed +274
-247
lines changed Expand file tree Collapse file tree 8 files changed +274
-247
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ declare global {
36
36
const readonly : typeof import ( 'vue' ) [ 'readonly' ]
37
37
const ref : typeof import ( 'vue' ) [ 'ref' ]
38
38
const resolveComponent : typeof import ( 'vue' ) [ 'resolveComponent' ]
39
+ const resolveDirective : typeof import ( 'vue' ) [ 'resolveDirective' ]
39
40
const shallowReactive : typeof import ( 'vue' ) [ 'shallowReactive' ]
40
41
const shallowReadonly : typeof import ( 'vue' ) [ 'shallowReadonly' ]
41
42
const shallowRef : typeof import ( 'vue' ) [ 'shallowRef' ]
Original file line number Diff line number Diff line change 19
19
</p >
20
20
21
21
<br >
22
- <JsonEditorVue
23
- ref =" jsonEditorVueRef" v-model =" data.value" :mode.sync =" data.mode"
24
- :readOnly =" data.readOnly"
25
- />
22
+ <JsonEditorVue ref =" jsonEditorVueRef" v-model =" data.value" :mode.sync =" data.mode"
23
+ :readOnly =" data.readOnly" />
26
24
27
25
<br >
28
26
<p >Mode</p >
@@ -52,7 +50,6 @@ export default {
52
50
hasSetup = true
53
51
}
54
52
55
- const jsonEditorVueRef = ref ()
56
53
const data = reactive <{
57
54
value: any
58
55
mode? : Mode
@@ -63,17 +60,18 @@ export default {
63
60
readOnly: false ,
64
61
})
65
62
63
+ /* const jsonEditorVueRef = ref()
66
64
onMounted(() => {
67
65
console.log(jsonEditorVueRef.value)
68
- })
66
+ }) */
69
67
70
68
return {
71
- jsonEditorVueRef ,
69
+ // jsonEditorVueRef,
72
70
data ,
73
71
}
74
72
},
75
73
mounted() {
76
- console .log (this .$refs .jsonEditorVueRef .jsonEditor .expand )
74
+ console .log (' expand: ' , this .$refs .jsonEditorVueRef .jsonEditor .expand )
77
75
},
78
76
}
79
77
</script >
Original file line number Diff line number Diff line change 32
32
</div >
33
33
</template >
34
34
35
- <script setup lang="ts" >
35
+ <script setup>
36
36
import JsonEditorVue from ' ../../src'
37
- import type { Mode } from ' ../../src'
38
37
39
- const data = reactive <{
40
- value: any
41
- mode? : Mode
42
- readOnly: boolean
43
- }>({
38
+ const data = reactive ({
44
39
value: undefined ,
45
40
mode: undefined ,
46
41
readOnly: false ,
47
42
})
48
43
49
44
const jsonEditorVueRef = ref ()
50
45
onMounted (() => {
51
- console .log (jsonEditorVueRef .value .jsonEditor .expand )
46
+ console .log (' expand: ' , jsonEditorVueRef .value .jsonEditor .expand )
52
47
})
53
48
</script >
Original file line number Diff line number Diff line change @@ -65,6 +65,6 @@ const data = reactive<{
65
65
66
66
const jsonEditorVueRef = ref ()
67
67
onMounted (() => {
68
- console .log (jsonEditorVueRef .value .jsonEditor .expand )
68
+ console .log (' expand: ' , jsonEditorVueRef .value .jsonEditor .expand )
69
69
})
70
70
</script >
Original file line number Diff line number Diff line change 5
5
< meta charset ="UTF-8 " />
6
6
< link rel ="icon " href ="/favicon.ico " />
7
7
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
8
- < title > {{NAME}} + Vue {{VUE_VERSION}}</ title >
8
+ < title > Vue {{VUE_VERSION}}</ title >
9
9
</ head >
10
10
11
11
< body >
Original file line number Diff line number Diff line change 82
82
"lint-staged" : " latest" ,
83
83
"lossless-json" : " latest" ,
84
84
"typescript" : " latest" ,
85
- "unplugin-auto-import" : " 0.11.2 " ,
85
+ "unplugin-auto-import" : " latest " ,
86
86
"vanilla-jsoneditor" : " latest" ,
87
87
"vite" : " latest" ,
88
88
"vite-plugin-dts" : " latest" ,
You can’t perform that action at this time.
0 commit comments