Skip to content

Commit b3c1043

Browse files
committed
docs: formatting
1 parent 23b247b commit b3c1043

File tree

2 files changed

+57
-19
lines changed

2 files changed

+57
-19
lines changed

README.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ npm i json-editor-vue vanilla-jsoneditor
5757

5858
```vue
5959
<template>
60-
<JsonEditorVue v-model="value" v-bind="{/* local props & attrs */}" />
60+
<JsonEditorVue
61+
v-model="value"
62+
v-bind="{/* local props & attrs */}"
63+
/>
6164
</template>
6265
6366
<script setup>
@@ -169,7 +172,10 @@ npm i json-editor-vue vanilla-jsoneditor
169172

170173
```vue
171174
<template>
172-
<JsonEditorVue v-model="value" v-bind="{/* local props & attrs */}" />
175+
<JsonEditorVue
176+
v-model="value"
177+
v-bind="{/* local props & attrs */}"
178+
/>
173179
</template>
174180
175181
<script setup>
@@ -281,7 +287,10 @@ npm i json-editor-vue vanilla-jsoneditor @vue/composition-api
281287

282288
```vue
283289
<template>
284-
<JsonEditorVue v-model="value" v-bind="{/* local props & attrs */}" />
290+
<JsonEditorVue
291+
v-model="value"
292+
v-bind="{/* local props & attrs */}"
293+
/>
285294
</template>
286295
287296
<script>
@@ -430,7 +439,10 @@ const attrs = useAttrs()
430439
```vue
431440
<template>
432441
<client-only>
433-
<JsonEditorVue v-model="value" v-bind="{/* local props & attrs */}" />
442+
<JsonEditorVue
443+
v-model="value"
444+
v-bind="{/* local props & attrs */}"
445+
/>
434446
</client-only>
435447
</template>
436448
@@ -517,7 +529,10 @@ export default {
517529
```vue
518530
<template>
519531
<client-only>
520-
<JsonEditorVue v-model="value" v-bind="{/* local props & attrs */}" />
532+
<JsonEditorVue
533+
v-model="value"
534+
v-bind="{/* local props & attrs */}"
535+
/>
521536
</client-only>
522537
</template>
523538
@@ -607,7 +622,10 @@ export default {
607622
```vue
608623
<template>
609624
<client-only>
610-
<JsonEditorVue v-model="value" v-bind="{/* local props & attrs */}" />
625+
<JsonEditorVue
626+
v-model="value"
627+
v-bind="{/* local props & attrs */}"
628+
/>
611629
</client-only>
612630
</template>
613631
@@ -827,7 +845,8 @@ If you prefer the behavior of svelte-jsoneditor:
827845

828846
```html
829847
<JsonEditorVue
830-
:content="content" :onChange="updatedContent => {
848+
:content="content"
849+
:onChange="updatedContent => {
831850
content = updatedContent
832851
}"
833852
/>

docs/README.zh-CN.md

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ npm i json-editor-vue vanilla-jsoneditor
5757

5858
```vue
5959
<template>
60-
<JsonEditorVue v-model="value" v-bind="{/* 局部 props & attrs */}" />
60+
<JsonEditorVue
61+
v-model="value"
62+
v-bind="{/* 局部 props & attrs */}"
63+
/>
6164
</template>
6265
6366
<script setup>
@@ -169,7 +172,10 @@ npm i json-editor-vue vanilla-jsoneditor
169172

170173
```vue
171174
<template>
172-
<JsonEditorVue v-model="value" v-bind="{/* 局部 props & attrs */}" />
175+
<JsonEditorVue
176+
v-model="value"
177+
v-bind="{/* 局部 props & attrs */}"
178+
/>
173179
</template>
174180
175181
<script setup>
@@ -281,7 +287,10 @@ npm i json-editor-vue vanilla-jsoneditor @vue/composition-api
281287

282288
```vue
283289
<template>
284-
<JsonEditorVue v-model="value" v-bind="{/* 局部 props & attrs */}" />
290+
<JsonEditorVue
291+
v-model="value"
292+
v-bind="{/* 局部 props & attrs */}"
293+
/>
285294
</template>
286295
287296
<script>
@@ -430,7 +439,10 @@ const attrs = useAttrs()
430439
```vue
431440
<template>
432441
<client-only>
433-
<JsonEditorVue v-model="value" v-bind="{/* 局部 props & attrs */}" />
442+
<JsonEditorVue
443+
v-model="value"
444+
v-bind="{/* 局部 props & attrs */}"
445+
/>
434446
</client-only>
435447
</template>
436448
@@ -517,7 +529,10 @@ export default {
517529
```vue
518530
<template>
519531
<client-only>
520-
<JsonEditorVue v-model="value" v-bind="{/* 局部 props & attrs */}" />
532+
<JsonEditorVue
533+
v-model="value"
534+
v-bind="{/* 局部 props & attrs */}"
535+
/>
521536
</client-only>
522537
</template>
523538
@@ -607,7 +622,10 @@ export default {
607622
```vue
608623
<template>
609624
<client-only>
610-
<JsonEditorVue v-model="value" v-bind="{/* 局部 props & attrs */}" />
625+
<JsonEditorVue
626+
v-model="value"
627+
v-bind="{/* 局部 props & attrs */}"
628+
/>
611629
</client-only>
612630
</template>
613631
@@ -810,11 +828,11 @@ module.exports = {
810828

811829
## 属性
812830

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) 的参数 | | |
818836

819837
### svelte-jsoneditor 与 json-editor-vue 中绑定值的差异
820838

@@ -825,7 +843,8 @@ module.exports = {
825843

826844
```html
827845
<JsonEditorVue
828-
:content="content" :onChange="updatedContent => {
846+
:content="content"
847+
:onChange="updatedContent => {
829848
content = updatedContent
830849
}"
831850
/>

0 commit comments

Comments
 (0)