@@ -57,7 +57,10 @@ npm i json-editor-vue vanilla-jsoneditor
57
57
58
58
``` vue
59
59
<template>
60
- <JsonEditorVue v-model="value" v-bind="{/* 局部 props & attrs */}" />
60
+ <JsonEditorVue
61
+ v-model="value"
62
+ v-bind="{/* 局部 props & attrs */}"
63
+ />
61
64
</template>
62
65
63
66
<script setup>
@@ -169,7 +172,10 @@ npm i json-editor-vue vanilla-jsoneditor
169
172
170
173
``` vue
171
174
<template>
172
- <JsonEditorVue v-model="value" v-bind="{/* 局部 props & attrs */}" />
175
+ <JsonEditorVue
176
+ v-model="value"
177
+ v-bind="{/* 局部 props & attrs */}"
178
+ />
173
179
</template>
174
180
175
181
<script setup>
@@ -281,7 +287,10 @@ npm i json-editor-vue vanilla-jsoneditor @vue/composition-api
281
287
282
288
``` vue
283
289
<template>
284
- <JsonEditorVue v-model="value" v-bind="{/* 局部 props & attrs */}" />
290
+ <JsonEditorVue
291
+ v-model="value"
292
+ v-bind="{/* 局部 props & attrs */}"
293
+ />
285
294
</template>
286
295
287
296
<script>
@@ -430,7 +439,10 @@ const attrs = useAttrs()
430
439
``` vue
431
440
<template>
432
441
<client-only>
433
- <JsonEditorVue v-model="value" v-bind="{/* 局部 props & attrs */}" />
442
+ <JsonEditorVue
443
+ v-model="value"
444
+ v-bind="{/* 局部 props & attrs */}"
445
+ />
434
446
</client-only>
435
447
</template>
436
448
@@ -517,7 +529,10 @@ export default {
517
529
``` vue
518
530
<template>
519
531
<client-only>
520
- <JsonEditorVue v-model="value" v-bind="{/* 局部 props & attrs */}" />
532
+ <JsonEditorVue
533
+ v-model="value"
534
+ v-bind="{/* 局部 props & attrs */}"
535
+ />
521
536
</client-only>
522
537
</template>
523
538
@@ -607,7 +622,10 @@ export default {
607
622
``` vue
608
623
<template>
609
624
<client-only>
610
- <JsonEditorVue v-model="value" v-bind="{/* 局部 props & attrs */}" />
625
+ <JsonEditorVue
626
+ v-model="value"
627
+ v-bind="{/* 局部 props & attrs */}"
628
+ />
611
629
</client-only>
612
630
</template>
613
631
@@ -810,11 +828,11 @@ module.exports = {
810
828
811
829
## 属性
812
830
813
- | 名称 | 说明 | 类型 | 默认值 |
814
- | ------- | ---------------------------------------------------------------------------------------------------- | ------------- | -------- |
815
- | v-model | 绑定值 | ` any ` | |
816
- | mode | 编辑模式,<br >在 Vue 3 中使用 ` [v-model]:mode ` ,<br >在 Vue 2 中使用 ` :mode[.sync] ` | [ Mode] ( #Mode ) | ` 'tree' ` |
817
- | ... | [ svelte-jsoneditor] ( https://github.com/josdejong/svelte-jsoneditor/#properties ) 的参数 (通过 attrs) | | |
831
+ | 名称 | 说明 | 类型 | 默认值 |
832
+ | ------- | -------------------------------------------------------------------------------------- | ------------- | -------- |
833
+ | v-model | 绑定值 | ` any ` | |
834
+ | mode | 编辑模式,<br >在 Vue 3 中使用 ` [v-model]:mode ` ,<br >在 Vue 2 中使用 ` :mode[.sync] ` | [ Mode] ( #Mode ) | ` 'tree' ` |
835
+ | ... | [ svelte-jsoneditor] ( https://github.com/josdejong/svelte-jsoneditor/#properties ) 的参数 | | |
818
836
819
837
### svelte-jsoneditor 与 json-editor-vue 中绑定值的差异
820
838
@@ -825,7 +843,8 @@ module.exports = {
825
843
826
844
``` html
827
845
<JsonEditorVue
828
- :content =" content" :onChange =" updatedContent => {
846
+ :content =" content"
847
+ :onChange =" updatedContent => {
829
848
content = updatedContent
830
849
}"
831
850
/>
0 commit comments