Skip to content

Commit

Permalink
opti: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hellosean1025 committed Apr 10, 2018
1 parent 13d149d commit 440f510
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules/
package/
src/
prd/
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,28 @@ npm install json-schema-editor-visual
```

```js
const option = {}
import 'antd/dist/antd.css'
const Schema = require("json-schema-editor-visual")();

require('json-schema-editor-visual/dist/main.css')
const schemaEditor = require("json-schema-editor-visual/dist/main.js");
const SchemaEditor = schemaEditor(option)

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

## Run dev
```
git clone https://github.com/YMFE/json-schema-editor-visual.git
npm install
npm run start
```
## Option Object

| name | desc | default |
| ---- | ----------- | --------- |
| `lg` | language, support `en_US` or `zh_CN` | en_US

## SchemaEditor Props

| name | type | default | desc
| ---- | ----------- | --------- | --------- |
| `data` | string | null | the data of editor
| `onChange`| function | null |
| `showEditor` | boolean | false |
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "json-schema-editor-visual",
"version": "1.0.8",
"description": "jsonschema editor",
"main": "dist/main.js",
"main": "package/index.js",
"license": "MIC",
"scripts":{
"start": "ykit s -p 8082",
Expand Down

0 comments on commit 440f510

Please sign in to comment.