vue-json-editor json编辑器
json
适用于现代 C++ 的 JSON。
项目地址:https://gitcode.com/gh_mirrors/js/json

·
1.安装插件
npm install vue-json-editor --save
2.使用
<template>
<div>
<p>vue-json-editor</p>
<vue-json-editor
v-model="json"
:show-btns="true" // 是否显示保存按钮
:mode="'code'" // 默认编辑模式
lang="zh" // 显示中文,默认英文
@json-change="onJsonChange" // 数据改变事件
@json-save="onJsonSave"
@has-error="onError"></vue-json-editor>
</div>
</template>
<script>
import vueJsonEditor from 'vue-json-editor'
export default {
data () {
return {
json: {
msg: 'demo of jsoneditor'
}
}
},
components: {
vueJsonEditor
},
methods: {
onJsonChange (value) {
console.log('value:', value);
},
onJsonSave (value) {
console.log('value:', value);
},
onError (value) {
console.log('value:', value);
}
}
}
</script>
3.效果
4.参数补充
model:bind the [json object] :show-btns: boolean, show the save button, default: true :expandedOnStart: boolean, expand the JSON editor on start for the modes 'tree', 'view', and 'form', default: false :mode: string, default: tree :lang: string, default: en @json-change: on json changed @json-save: on json save @has-error: on error




适用于现代 C++ 的 JSON。
最近提交(Master分支:23 天前 )
2d9a2512
20 小时前
3cca3ad2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.17 to 3.28.18.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/60168efe1c415ce0f5521ea06d5c2062adbeed1b...ff0a06e83cb2de871e5a09832bc6a81e7276941f)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-version: 3.28.18
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 4 天前
更多推荐
所有评论(0)