File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export default {
12
12
version: Vue .version ,
13
13
data: {
14
14
value: {
15
- // bigint: 124124124124124124124n,
15
+ // bigint: 124124124124124124124n,
16
16
boolean: true ,
17
17
string: ' Hello World' ,
18
18
number: 123.456 ,
@@ -33,6 +33,11 @@ export default {
33
33
mounted () {
34
34
console .log (' expand: ' , this .$refs .jsonEditorVueRef .jsonEditor .expand )
35
35
},
36
+ methods: {
37
+ onInput (data ) {
38
+ console .log (' onInput: ' , data)
39
+ }
40
+ },
36
41
}
37
42
</script >
38
43
@@ -49,7 +54,7 @@ export default {
49
54
<button @click =" data.value.number = Math.random()" >
50
55
改变属性
51
56
</button >
52
- <button @click =" value = undefined" >
57
+ <button @click =" data. value = undefined" >
53
58
清空
54
59
</button >
55
60
<button @click =" mode = mode === 'text' ? 'tree' : 'text'" >
@@ -63,17 +68,18 @@ export default {
63
68
<br >
64
69
<JsonEditorVue
65
70
ref =" jsonEditorVueRef"
66
- v-model =" value"
71
+ v-model =" data. value"
67
72
:mode.sync =" mode"
68
73
:readOnly =" readOnly"
74
+ @input =" onInput"
69
75
/>
70
76
71
77
<br >
72
78
<p >Mode</p >
73
79
{{ mode }}
74
80
<p >Value</p >
75
- {{ value }}
81
+ {{ data. value }}
76
82
<p >Type</p >
77
- {{ typeof value }}
83
+ {{ typeof data. value }}
78
84
</div >
79
85
</template >
You can’t perform that action at this time.
0 commit comments