nc-json-ace
v1.0.5
Published
nc-json-ace widget for [ncform](https://github.com/ncform/ncform)
Downloads
15
Readme
nc-json-ace
nc-json-ace widget for ncform
Refer to https://github.com/ajaxorg/ace/wiki
Install and basic usage
npm i -s nc-json-ace
Add the widget
import ncJsonAce from 'nc-json-ace';
Vue.use(vueNcform, { extComponents: {ncJsonAce} });
// or vm.$ncformAddWidget({name: 'ncJsonAce', widget: ncJsonAce});
Use the widget
{
"type": "object",
"properties": {
"demo": {
"type": "object",
"default": {},
"ui": {
"widget": "nc-json-ace",
"widgetConfig": {
"dataSchema": {
"type": "object",
"properties": {
"user": {
"type": "object",
"description": {
"en": "This is the system user",
"zh_cn": "这是系统用户"
},
"properties": {
"name": {
"type": "string",
"description": {
"en": "Your name",
"zh_cn": "你的名字"
},
"enum": [
{ "value": "daniel", "desc": { "en": "This is daniel", "zh_cn": "这是丹尼尔" } },
{ "value": "sarah", "desc": { "en": "This is sarah", "zh_cn": "这是莎拉" } }
]
}
}
}
}
},
"minLines": 10,
"maxLines": Infinity,
}
}
}
}
}
Project setup
npm install
Compiles and hot-reloads for development
npm run serve
You only need to care about src/components/index.vue
Compiles and minifies for production
npm run build
Run your tests
npm run test
Lints and fixes files
npm run lint
Run your end-to-end tests
npm run test:e2e
Run your unit tests
npm run test:unit