2.0.1 • Published 7 months ago

json-schema-editor-visual-antd4-externals v2.0.1

Weekly downloads
-
License
MIC
Repository
github
Last release
7 months ago

json-schema-editor-visual-antd4-externals

A json-schema editor of high efficient and easy-to-use, base on React.

avatar

Usage

npm install json-schema-editor-visual-antd4-externals
const option = {}
import 'antd/dist/antd.css'
require('json-schema-editor-visual-antd4-externals/dist/main.css')
const schemaEditor = require("json-schema-editor-visual-antd4-externals/dist/main.js");
const SchemaEditor = schemaEditor(option)

render(
    <SchemaEditor />,
  document.getElementById('root')
)

Option Object

namedescdefault
lglanguage, support en_US or zh_CNen_US

SchemaEditor Props

nametypedefaultdesc
datastringnullthe data of editor
onChangefunctionnull
showEditorbooleanfalse

Links

https://github.com/zyqwst/json-schema-editor-vue

Change

  1. Use antd4
  2. Use lodash to replace underscore
  3. Use easy-json-schema to replace generate-schema (the object attribute of array is required by default)
  4. Remove the style of webkit-scrollbar
  5. Switch back to generate-schema, easy-json-schema has format errors when converting array