Skip to content

Commit 7172608

Browse files
committed
fix: demo vue 2.6
1 parent 72e9bc4 commit 7172608

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

demo/vue2.6/index.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
version: Vue.version,
1313
data: {
1414
value: {
15-
// bigint: 124124124124124124124n,
15+
// bigint: 124124124124124124124n,
1616
boolean: true,
1717
string: 'Hello World',
1818
number: 123.456,
@@ -33,6 +33,11 @@ export default {
3333
mounted() {
3434
console.log('expand: ', this.$refs.jsonEditorVueRef.jsonEditor.expand)
3535
},
36+
methods: {
37+
onInput(data) {
38+
console.log('onInput: ', data)
39+
}
40+
},
3641
}
3742
</script>
3843

@@ -49,7 +54,7 @@ export default {
4954
<button @click="data.value.number = Math.random()">
5055
改变属性
5156
</button>
52-
<button @click="value = undefined">
57+
<button @click="data.value = undefined">
5358
清空
5459
</button>
5560
<button @click="mode = mode === 'text' ? 'tree' : 'text'">
@@ -63,17 +68,18 @@ export default {
6368
<br>
6469
<JsonEditorVue
6570
ref="jsonEditorVueRef"
66-
v-model="value"
71+
v-model="data.value"
6772
:mode.sync="mode"
6873
:readOnly="readOnly"
74+
@input="onInput"
6975
/>
7076

7177
<br>
7278
<p>Mode</p>
7379
{{ mode }}
7480
<p>Value</p>
75-
{{ value }}
81+
{{ data.value }}
7682
<p>Type</p>
77-
{{ typeof value }}
83+
{{ typeof data.value }}
7884
</div>
7985
</template>

0 commit comments

Comments
 (0)