@lyc305213781/json-editor
v0.0.6
Published
vue3版本的Json Editor a json-editor component for vue3
Downloads
1
Readme
@lyc305213781/json-editor
vue3版本的Json Editor a json-editor component for vue3
Compile and Hot-Reload for Development
pnpm dev
How to use
pnpm add @lyc305213781/@lyc305213781/json-editor
const app = createApp(App);
import VueJsonEditor from './VueJsonEditor.vue';
app.component('vue-json-editor', VueJsonEditor);
<template>
<vue-json-editor
v-model="jsonData"
:show-btns="true"
:expandedOnStart="true"
@json-change="onJsonChange"
></vue-json-editor>
</template>
Props
| Property | Description | type | default | | ----------------- | ---------------- | :--------: | :----------: | | show-btns | show-btns | boolean | true |
Events
| Property | Description | type | default | | ----------------- | ---------------- | :--------: | :----------: | | json-change | json-change event | (json: any) => void | | | input | input event | (json: any) => void | | | has-error | has-error event | (error: Error) => void | | | json-save | json-save event | (json: any) => void | |