Skip to content

Commit 471b926

Browse files
committed
docs: 修改 readme
1 parent 8b3f4a0 commit 471b926

File tree

3 files changed

+125
-127
lines changed

3 files changed

+125
-127
lines changed

README.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
# vue-json-schema-form
2-
Quickly building HTML form based on `Vue`, `Json Schema` and `ElementUi`.
2+
基于 `Vue``ElementUi``Json Schema` 快速构建一个带完整校验的form表单.
33

4-
* [中文文档(推荐)](https://github.com/lljj-x/vue-json-schema-form/blob/master/README_zh-cn.md)
5-
6-
## Experience quickly
7-
* [Live playground](https://form.lljj.me/ "Vue JSON Schema Form Demo")
8-
* [Document](https://vue-json-schema-form.lljj.me/en/ "Vue JSON Schema Docs")
9-
* [Github](https://github.com/lljj-x/vue-json-schema-form "Vue JSON Schema github")
10-
* [Usage scenario - visual activity editor](https://form.lljj.me/vue-editor.html)
11-
* [Todo](https://vue-json-schema-form.lljj.me/en/guide/todo.html)
4+
## 快速体验
5+
* [演示demo](https://form.lljj.me/ "Vue JSON Schema Form Demo")
6+
* [查看文档](https://vue-json-schema-form.lljj.me/ "Vue JSON Schema Docs")
7+
* [源代码](https://github.com/lljj-x/vue-json-schema-form "Vue JSON Schema github")
8+
* [使用场景 - 可视化活动编辑器(H5活动编辑器)](https://form.lljj.me/vue-editor.html)
9+
* [不支持部分和更新计划](https://vue-json-schema-form.lljj.me/zh/guide/todo.html)
1210

1311
![](https://7.luochongfei.top/vue-json-schema-form.gif?1)
1412

1513
``` bash
16-
# npm
14+
# 安装
1715
npm install --save @lljj/vue-json-schema-form
1816

19-
# yarn
17+
# 或者:
2018
yarn add @lljj/vue-json-schema-form
2119
```
2220

@@ -30,6 +28,7 @@ yarn add @lljj/vue-json-schema-form
3028
</template>
3129
3230
<script >
31+
// 使用
3332
import VueForm from '@lljj/vue-json-schema-form';
3433
3534
export default {
@@ -63,39 +62,39 @@ yarn add @lljj/vue-json-schema-form
6362
</script>
6463
```
6564

66-
## Run demo
65+
## 运行Demo
6766
```ssh
68-
# Install
67+
# 安装依赖
6968
yarn install
7069
71-
# Run (Run form editor and activity editor at the same time)
72-
# Form editor http://127.0.0.1:8800/
73-
# Activity editor http://127.0.0.1:8800/vue-editor.html
70+
# 运行demo页 (同时运行表单编辑器和活动编辑器)
71+
# (formEditr)表单编辑器 http://127.0.0.1:8800/
72+
# (H5)活动编辑器 http://127.0.0.1:8800/vue-editor.html
7473
yarn run demo:dev
7574
76-
# Only run form editor
75+
# 只运行(formEditr)表单编辑器
7776
yarn run demo:dev --dir=index
7877
79-
# Only run activity editor
78+
# 只运行(H5)活动编辑器
8079
yarn run demo:dev --dir=vue-editor
8180
8281
```
8382

84-
### Description
85-
* Follow the JSON Schema specification, only need to give the `Json Schema`, you can generate the corresponding form
86-
* Quickly configure personalized UI views and check error messages, which can be adapted to commonly used UI libraries. The default view of the current version depends on `ElementUi`.
87-
* Uses the [ajv validator](https://github.com/epoberezkin/ajv)
88-
* Design ideas and reference to the schema analysis index [react-jsonschema-form](https://github.com/rjsf-team/react-jsonschema-form)
83+
### 说明
84+
* 遵循 `JSON Schema` 规范,只需要给定 `Json Schema`,即可生成对应的form表单
85+
* 快速配置个性化ui视图和校验错误信息,可适配常用的ui库,目前的版本默认视图依赖 `elementUi`,后续版本会解耦开来,可通过配置适配ElementUi,iView 或者你自己开发的组件库等
86+
* 表单schema校验使用 [ajv](https://github.com/epoberezkin/ajv)
87+
* 设计思想和对schema解析索引参考 [react-jsonschema-form](https://github.com/rjsf-team/react-jsonschema-form)
8988

90-
## Relevant
89+
## 相关资料
9190
[JSON Schema](https://json-schema.org/understanding-json-schema/index.html) |
9291
[Vue](https://cn.vuejs.org/) |
9392
[Element Ui](https://element.eleme.io/)
9493

95-
### Why
96-
Originated from shop decoration scenes, it can also be called front-end visual editing. In order to solve the universality of the component data configuration form, the form is generated through `Json Schema`.
94+
### 为何开发
95+
原本是在很久前公司流产的项目类似淘宝店铺装修,也可以叫做前端可视化编辑。为了解决数据配置表单的通用性,所以使用 `Json Schema` 描述数据结构,动态生成表单。
9796

98-
The advantage of this is to solve the repetitive work of each configuration form, and the server can also maintain the same verification rules as the front-end based on the same schema.
97+
这样做的好处除了解决在每个配置表单的重复工作,服务端也可以基于同一份schema保持和前端一致的校验规则,不过对于使用 vue elementUi并未找到合适库可以直接使用,所以在后面一段时间决定自己实现一个 。
9998

10099
## License
101100
Apache-2.0

README_en.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# vue-json-schema-form
2+
Quickly building HTML form based on `Vue`, `Json Schema` and `ElementUi`.
3+
4+
## Experience quickly
5+
* [Live playground](https://form.lljj.me/ "Vue JSON Schema Form Demo")
6+
* [Document](https://vue-json-schema-form.lljj.me/en/ "Vue JSON Schema Docs")
7+
* [Github](https://github.com/lljj-x/vue-json-schema-form "Vue JSON Schema github")
8+
* [Usage scenario - visual activity editor](https://form.lljj.me/vue-editor.html)
9+
* [Todo](https://vue-json-schema-form.lljj.me/en/guide/todo.html)
10+
11+
![](https://7.luochongfei.top/vue-json-schema-form.gif?1)
12+
13+
``` bash
14+
# npm
15+
npm install --save @lljj/vue-json-schema-form
16+
17+
# yarn
18+
yarn add @lljj/vue-json-schema-form
19+
```
20+
21+
```vue
22+
<template>
23+
<VueForm
24+
v-model="formData"
25+
:schema="schema"
26+
>
27+
</VueForm>
28+
</template>
29+
30+
<script >
31+
import VueForm from '@lljj/vue-json-schema-form';
32+
33+
export default {
34+
name: 'Demo',
35+
components: {
36+
VueForm
37+
},
38+
data() {
39+
return {
40+
formData: {},
41+
schema: {
42+
type: 'object',
43+
required: [
44+
'firstName'
45+
],
46+
properties: {
47+
firstName: {
48+
type: 'string',
49+
title: 'First name',
50+
default: 'Jun'
51+
},
52+
lastName: {
53+
type: 'string',
54+
title: 'Last name'
55+
},
56+
}
57+
}
58+
};
59+
}
60+
};
61+
</script>
62+
```
63+
64+
## Run demo
65+
```ssh
66+
# Install
67+
yarn install
68+
69+
# Run (Run form editor and activity editor at the same time)
70+
# Form editor http://127.0.0.1:8800/
71+
# Activity editor http://127.0.0.1:8800/vue-editor.html
72+
yarn run demo:dev
73+
74+
# Only run form editor
75+
yarn run demo:dev --dir=index
76+
77+
# Only run activity editor
78+
yarn run demo:dev --dir=vue-editor
79+
80+
```
81+
82+
### Description
83+
* Follow the JSON Schema specification, only need to give the `Json Schema`, you can generate the corresponding form
84+
* Quickly configure personalized UI views and check error messages, which can be adapted to commonly used UI libraries. The default view of the current version depends on `ElementUi`.
85+
* Uses the [ajv validator](https://github.com/epoberezkin/ajv)
86+
* Design ideas and reference to the schema analysis index [react-jsonschema-form](https://github.com/rjsf-team/react-jsonschema-form)
87+
88+
## Relevant
89+
[JSON Schema](https://json-schema.org/understanding-json-schema/index.html) |
90+
[Vue](https://cn.vuejs.org/) |
91+
[Element Ui](https://element.eleme.io/)
92+
93+
### Why
94+
Originated from shop decoration scenes, it can also be called front-end visual editing. In order to solve the universality of the component data configuration form, the form is generated through `Json Schema`.
95+
96+
The advantage of this is to solve the repetitive work of each configuration form, and the server can also maintain the same verification rules as the front-end based on the same schema.
97+
98+
## License
99+
Apache-2.0

README_zh-cn.md

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)