Skip to content

Commit 4ab37d1

Browse files
committed
docs: update zh-CN doc
1 parent 16a654d commit 4ab37d1

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

docs/README.zh-CN.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,29 @@ const value = ref()
436436
</script>
437437
```
438438

439-
#### 全局注册
439+
#### 全局注册为 Module
440+
441+
```ts
442+
// nuxt.config.ts
443+
444+
export default defineNuxtConfig({
445+
modules: ['json-editor-vue/nuxt'],
446+
})
447+
```
448+
449+
```vue
450+
<template>
451+
<client-only>
452+
<JsonEditorVue v-model="value" />
453+
</client-only>
454+
</template>
455+
456+
<script setup>
457+
const value = ref()
458+
</script>
459+
```
460+
461+
#### 全局注册为 Plugin
440462

441463
```ts
442464
// ~/plugins/JsonEditorVue.client.ts

0 commit comments

Comments
 (0)