From 632324a48b153805e06fb93eaf5077aa0f9bca95 Mon Sep 17 00:00:00 2001
From: cloydlau <253055734@qq.com>
Date: Wed, 25 Jan 2023 02:05:18 +0800
Subject: [PATCH] docs: formatting
---
README.md | 18 +++++++++---------
docs/README.zh-CN.md | 22 +++++++++++-----------
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/README.md b/README.md
index 0087153..0f0346a 100644
--- a/README.md
+++ b/README.md
@@ -541,7 +541,7 @@ import { ref } from 'vue'
const JsonEditorVue = () => process.client
? import('json-editor-vue')
- : Promise.resolve({ render: h => h('div') })
+ : Promise.resolve({ render: (h) => h('div') })
const value = ref()
@@ -638,7 +638,7 @@ export default {
components: {
JsonEditorVue: () => process.client
? import('json-editor-vue')
- : Promise.resolve({ render: h => h('div') }),
+ : Promise.resolve({ render: (h) => h('div') }),
},
data() {
return {
@@ -828,13 +828,13 @@ module.exports = {
## Props
-| Name | Description | Type | Default |
-| ------- | --------------------------------------------------------------------------------------------- | ------------- | -------- |
-| v-model | binding value | `any` | |
-| mode | edit mode,
use `[v-model]:mode` in Vue 3
or `:mode[.sync]` in Vue 2 | [Mode](#Mode) | `'tree'` |
-| ... | properties of [svelte-jsoneditor](https://github.com/josdejong/svelte-jsoneditor/#properties) | | |
+| Name | Description | Type | Default |
+| ------------------------------------------------------ | --------------------------------------------------------------------------------------------- | ------------- | -------- |
+| v-model /
modelValue (Vue 3) /
value (Vue 2) | binding value | any | |
+| mode /
v-model:mode (Vue 3) /
:mode.sync (Vue 2) | edit mode | [Mode](#Mode) | `'tree'` |
+| ... | properties of [svelte-jsoneditor](https://github.com/josdejong/svelte-jsoneditor/#properties) | | |
-> ⚠ kebab-case is required for tag & prop name when using from CDN
+> ⚠ kebab-case is required for tag & prop name when using from CDN.
### Binding value difference between svelte-jsoneditor and json-editor-vue
@@ -846,7 +846,7 @@ If you prefer the behavior of svelte-jsoneditor:
```html
{
content = updatedContent
}"
/>
diff --git a/docs/README.zh-CN.md b/docs/README.zh-CN.md
index 8087c0d..98a722d 100644
--- a/docs/README.zh-CN.md
+++ b/docs/README.zh-CN.md
@@ -541,7 +541,7 @@ import { ref } from 'vue'
const JsonEditorVue = () => process.client
? import('json-editor-vue')
- : Promise.resolve({ render: h => h('div') })
+ : Promise.resolve({ render: (h) => h('div') })
const value = ref()
@@ -638,7 +638,7 @@ export default {
components: {
JsonEditorVue: () => process.client
? import('json-editor-vue')
- : Promise.resolve({ render: h => h('div') }),
+ : Promise.resolve({ render: (h) => h('div') }),
},
data() {
return {
@@ -828,11 +828,11 @@ module.exports = {
## 属性
-| 名称 | 说明 | 类型 | 默认值 |
-| ------- | -------------------------------------------------------------------------------------- | ------------- | -------- |
-| v-model | 绑定值 | `any` | |
-| mode | 编辑模式,
在 Vue 3 中使用 `[v-model]:mode`,
在 Vue 2 中使用 `:mode[.sync]` | [Mode](#Mode) | `'tree'` |
-| ... | [svelte-jsoneditor](https://github.com/josdejong/svelte-jsoneditor/#properties) 的参数 | | |
+| 名称 | 说明 | 类型 | 默认值 |
+| ------------------------------------------------------ | -------------------------------------------------------------------------------------- | ------------- | -------- |
+| v-model /
modelValue (Vue 3) /
value (Vue 2) | 绑定值 | any | |
+| mode /
v-model:mode (Vue 3) /
:mode.sync (Vue 2) | 编辑模式 | [Mode](#Mode) | `'tree'` |
+| ... | [svelte-jsoneditor](https://github.com/josdejong/svelte-jsoneditor/#properties) 的属性 | | |
### svelte-jsoneditor 与 json-editor-vue 中绑定值的差异
@@ -844,7 +844,7 @@ module.exports = {
```html
{
content = updatedContent
}"
/>
@@ -852,15 +852,15 @@ module.exports = {
> 详情见 https://github.com/josdejong/svelte-jsoneditor/pull/166。
-### 布尔类型参数
+### 布尔类型属性
-仅写上 svelte-jsoneditor 的布尔类型参数如 `readOnly` 但不传值,会隐式转换为 `true`:
+仅写上 svelte-jsoneditor 的布尔类型属性如 `readOnly` 但不传值,会隐式转换为 `true`:
- ✔️ ``
- ✔️ ``
-> 通过 CDN 使用时,标签、prop 名称都必须使用短横线命名
+> 通过 CDN 使用时,标签、属性名称都必须使用短横线命名。