1.0.5 • Published 6 years ago

nc-json-ace v1.0.5

Weekly downloads
24
License
-
Repository
github
Last release
6 years ago

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
1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago