Skip to content

Commit 99aa0fa

Browse files
committed
docs: add peer dependencies section
1 parent dcbc6a1 commit 99aa0fa

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,19 @@ JSON editor for Vue 2.6 / 2.7 / 3, powered by [svelte-jsoneditor](https://github
2828

2929
## Installation
3030

31+
### Peer Dependencies
32+
33+
- `vanilla-jsoneditor`: a standalone bundle provided by svelte-jsoneditor
34+
35+
<br>
36+
3137
### Vue 3
3238

3339
```sh
3440
npm add json-editor-vue vanilla-jsoneditor
3541
```
3642

37-
#### Global registration
43+
#### Global Registration
3844

3945
```ts
4046
import { createApp } from 'vue'
@@ -47,7 +53,7 @@ createApp()
4753
.mount('#app')
4854
```
4955

50-
#### Local registration
56+
#### Local Registration
5157

5258
```vue
5359
<template>
@@ -61,7 +67,7 @@ const value = ref()
6167
</script>
6268
```
6369

64-
#### Without bundler / CDN
70+
#### Without Bundler / CDN
6571

6672
```html
6773
<div id="app">
@@ -101,7 +107,7 @@ const value = ref()
101107
npm add json-editor-vue vanilla-jsoneditor
102108
```
103109

104-
#### Global registration
110+
#### Global Registration
105111

106112
```ts
107113
import Vue from 'vue'
@@ -112,7 +118,7 @@ Vue.use(JsonEditorVue, {
112118
})
113119
```
114120

115-
#### Local registration
121+
#### Local Registration
116122

117123
```vue
118124
<template>
@@ -126,7 +132,7 @@ const value = ref()
126132
</script>
127133
```
128134

129-
#### Without bundler / CDN
135+
#### Without Bundler / CDN
130136

131137
```html
132138
<div id="app">
@@ -162,13 +168,13 @@ const value = ref()
162168

163169
<br>
164170

165-
### Vue 2.6 or earlier
171+
### Vue 2.6 or Earlier
166172

167173
```sh
168174
npm add json-editor-vue vanilla-jsoneditor @vue/composition-api
169175
```
170176

171-
#### Global registration
177+
#### Global Registration
172178

173179
```ts
174180
import Vue from 'vue'
@@ -181,7 +187,7 @@ Vue.use(JsonEditorVue, {
181187
})
182188
```
183189

184-
#### Local registration
190+
#### Local Registration
185191

186192
```vue
187193
<template>
@@ -206,7 +212,7 @@ export default {
206212
</script>
207213
```
208214

209-
#### Without bundler / CDN
215+
#### Without Bundler / CDN
210216

211217
> It's quite messy this way due to `vanilla-jsoneditor` does not export UMD.
212218
@@ -277,7 +283,7 @@ type Mode = 'tree' | 'text'
277283
278284
<a name="dark-theme"></a>
279285
280-
## Dark theme
286+
## Dark Theme
281287
282288
```vue
283289
<template>

docs/README.zh-CN.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626

2727
## 安装
2828

29-
![NPM](https://nodei.co/npm/json-editor-vue.png)
29+
### 外置依赖
30+
31+
- `vanilla-jsoneditor`: svelte-jsoneditor 提供的原生包
32+
33+
<br>
3034

3135
### Vue 3
3236

src/Component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default defineComponent({
4444
const initialMode = conclude([props.mode, globalProps.mode])
4545
const initialValue = conclude([props[modelValueProp], globalProps[modelValueProp]])
4646
const initialAttrs = conclude([attrs, globalAttrs, {
47-
// vanilla-jsoneditor@0.7.1 以后,用户输入 / 编程式设值 都会触发 onChange
47+
// 用户输入 & 编程式设值 会触发 onChange
4848
onChange: debounce((updatedContent: { text: string; json: any }) => {
4949
if (preventOnChange.value) {
5050
preventOnChange.value = false

0 commit comments

Comments
 (0)