Skip to content

Commit 2836466

Browse files
committed
docs: add dark theme section
1 parent 5fcf2d9 commit 2836466

File tree

3 files changed

+100
-2
lines changed

3 files changed

+100
-2
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ createApp()
5050
5151
<script setup>
5252
import JsonEditorVue from 'json-editor-vue'
53+
54+
const value = ref()
5355
</script>
5456
```
5557

@@ -113,6 +115,8 @@ Vue.use(JsonEditorVue, {
113115
114116
<script setup>
115117
import JsonEditorVue from 'json-editor-vue'
118+
119+
const value = ref()
116120
</script>
117121
```
118122

@@ -187,6 +191,11 @@ Vue.use(VCA)
187191
188192
export default {
189193
components: { JsonEditorVue },
194+
date() {
195+
return {
196+
value: undefined,
197+
}
198+
},
190199
}
191200
</script>
192201
```
@@ -237,7 +246,7 @@ export default {
237246
| Name | Description | Type | Default |
238247
| ------- | --------------------------------------------------------------------------------------------- | ------------------ | -------- |
239248
| v-model | binding value | `any` | |
240-
| mode | edit mode, use `v-model:mode` in Vue 3 or `:mode.sync` in Vue 2 | `'tree'`, `'text'` | `'tree'` |
249+
| mode | edit mode, use `v-model:mode` in Vue 3 or `:mode.sync` in Vue 2 | `'tree'`, `'text'` | `'tree'` |
241250
| ... | properties of [svelte-jsoneditor](https://github.com/josdejong/svelte-jsoneditor/#properties) | | |
242251

243252
<br>
@@ -260,6 +269,21 @@ type Mode = 'tree' | 'text'
260269
261270
<br>
262271
272+
## Dark theme
273+
274+
```vue
275+
<template>
276+
<JsonEditorVue class="jse-theme-dark" />
277+
</template>
278+
279+
<script setup>
280+
import 'vanilla-jsoneditor/themes/jse-theme-dark.css'
281+
import JsonEditorVue from 'json-editor-vue'
282+
</script>
283+
```
284+
285+
<br>
286+
263287
## Changelog
264288

265289
Detailed changes for each release are documented in the [release notes](https://github.com/cloydlau/json-editor-vue/releases).

auto-imports.d.ts

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,55 @@
11
// Generated by 'unplugin-auto-import'
22
export {}
33
declare global {
4-
4+
const EffectScope: typeof import('vue')['EffectScope']
5+
const computed: typeof import('vue')['computed']
6+
const createApp: typeof import('vue')['createApp']
7+
const customRef: typeof import('vue')['customRef']
8+
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
9+
const defineComponent: typeof import('vue')['defineComponent']
10+
const effectScope: typeof import('vue')['effectScope']
11+
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
12+
const getCurrentScope: typeof import('vue')['getCurrentScope']
13+
const h: typeof import('vue')['h']
14+
const inject: typeof import('vue')['inject']
15+
const isProxy: typeof import('vue')['isProxy']
16+
const isReactive: typeof import('vue')['isReactive']
17+
const isReadonly: typeof import('vue')['isReadonly']
18+
const isRef: typeof import('vue')['isRef']
19+
const markRaw: typeof import('vue')['markRaw']
20+
const nextTick: typeof import('vue')['nextTick']
21+
const onActivated: typeof import('vue')['onActivated']
22+
const onBeforeMount: typeof import('vue')['onBeforeMount']
23+
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
24+
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
25+
const onDeactivated: typeof import('vue')['onDeactivated']
26+
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
27+
const onMounted: typeof import('vue')['onMounted']
28+
const onRenderTracked: typeof import('vue')['onRenderTracked']
29+
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
30+
const onScopeDispose: typeof import('vue')['onScopeDispose']
31+
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
32+
const onUnmounted: typeof import('vue')['onUnmounted']
33+
const onUpdated: typeof import('vue')['onUpdated']
34+
const provide: typeof import('vue')['provide']
35+
const reactive: typeof import('vue')['reactive']
36+
const readonly: typeof import('vue')['readonly']
37+
const ref: typeof import('vue')['ref']
38+
const resolveComponent: typeof import('vue')['resolveComponent']
39+
const shallowReactive: typeof import('vue')['shallowReactive']
40+
const shallowReadonly: typeof import('vue')['shallowReadonly']
41+
const shallowRef: typeof import('vue')['shallowRef']
42+
const toRaw: typeof import('vue')['toRaw']
43+
const toRef: typeof import('vue')['toRef']
44+
const toRefs: typeof import('vue')['toRefs']
45+
const triggerRef: typeof import('vue')['triggerRef']
46+
const unref: typeof import('vue')['unref']
47+
const useAttrs: typeof import('vue')['useAttrs']
48+
const useCssModule: typeof import('vue')['useCssModule']
49+
const useCssVars: typeof import('vue')['useCssVars']
50+
const useSlots: typeof import('vue')['useSlots']
51+
const watch: typeof import('vue')['watch']
52+
const watchEffect: typeof import('vue')['watchEffect']
53+
const watchPostEffect: typeof import('vue')['watchPostEffect']
54+
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
555
}

docs/README.zh-CN.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ createApp()
5050
5151
<script setup>
5252
import JsonEditorVue from 'json-editor-vue'
53+
54+
const value = ref()
5355
</script>
5456
```
5557

@@ -113,6 +115,8 @@ Vue.use(JsonEditorVue, {
113115
114116
<script setup>
115117
import JsonEditorVue from 'json-editor-vue'
118+
119+
const value = ref()
116120
</script>
117121
```
118122

@@ -187,6 +191,11 @@ Vue.use(VCA)
187191
188192
export default {
189193
components: { JsonEditorVue },
194+
date() {
195+
return {
196+
value: undefined,
197+
}
198+
},
190199
}
191200
</script>
192201
```
@@ -260,6 +269,21 @@ type Mode = 'tree' | 'text'
260269
261270
<br>
262271
272+
## 暗色主题
273+
274+
```vue
275+
<template>
276+
<JsonEditorVue class="jse-theme-dark" />
277+
</template>
278+
279+
<script setup>
280+
import 'vanilla-jsoneditor/themes/jse-theme-dark.css'
281+
import JsonEditorVue from 'json-editor-vue'
282+
</script>
283+
```
284+
285+
<br>
286+
263287
## 更新日志
264288

265289
各版本详细改动请参考 [release notes](https://github.com/cloydlau/json-editor-vue/releases)

0 commit comments

Comments
 (0)