Skip to content

Commit d327842

Browse files
committed
init
0 parents  commit d327842

File tree

196 files changed

+9974
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+9974
-0
lines changed

.browserslistrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> 1%
2+
last 2 versions

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
insert_final_newline = false
15+
trim_trailing_whitespace = false

.eslintrc.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
extends: ['plugin:vue/recommended', 'eslint:recommended', 'airbnb-base'],
7+
rules: {
8+
'linebreak-style': 0,
9+
'no-console': 'off',
10+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
11+
'vue/no-unused-components': 0,
12+
'no-unused-vars': 0,
13+
'import/order': 0,
14+
'import/extensions': 0,
15+
'import/no-unresolved': 0,
16+
'comma-dangle': [2, 'never'],
17+
semi: [2, 'never'],
18+
'no-unused-expressions': 0,
19+
'no-plusplus': 0,
20+
'import/prefer-default-export': 0,
21+
'no-use-before-define': 0,
22+
'no-param-reassign': 0,
23+
'no-underscore-dangle': 0,
24+
'arrow-parens': [2, 'as-needed'],
25+
'vue/max-attributes-per-line': 0,
26+
'max-len': [
27+
1,
28+
{
29+
code: 120
30+
}
31+
],
32+
'no-eval': 0,
33+
'no-multi-assign': 0,
34+
'prefer-rest-params': 0,
35+
'vue/require-prop-types': 0,
36+
'no-restricted-globals': 0
37+
},
38+
parserOptions: {
39+
parser: 'babel-eslint'
40+
},
41+
globals: {
42+
location: false
43+
}
44+
}

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
/src/components/parser/lib
5+
/src/components/render/lib
6+
7+
# local env files
8+
.env.local
9+
.env.*.local
10+
11+
# Log files
12+
npm-debug.log*
13+
yarn-debug.log*
14+
yarn-error.log*
15+
16+
# Editor directories and files
17+
.idea
18+
.vscode
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw?
24+
25+
.prettierrc
26+
27+
package-lock.json
28+
yarn.lock

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 fuzui
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<h1 align="center">Form Generator Antdv</h1>
2+
3+
> Ant Design Vue表单设计及代码生成器
4+
5+
<p align="center">
6+
<a href="https://gitee.com/fuzui/form-generator-antdv" target="_blank"><img src="https://gitee.com/fuzui/form-generator-antdv/badge/star.svg?theme=dark" alt="Build Status"></a>&nbsp;
7+
<a href="https://github.com/fuzui/form-generator-antdv" target="_blank"><img src="https://img.shields.io/github/stars/fuzui/form-generator-antdv.svg?style=social" alt="Build Status"></a>&nbsp;
8+
<a href="https://github.com/vueComponent/ant-design-vue" target="_blank"><img src="https://img.shields.io/badge/Ant Design Vue-1.7.8-brightgreen" alt="Build Status"></a>
9+
</p>
10+
11+
12+
------------------------------
13+
14+
## 简介
15+
16+
**Form Generator Antdv**,由[form-generator](https://github.com/JakHuang/form-generator)搬运而来。form-generator是一个优秀的Element UI表单设计及代码生成器,此项目将其改为Ant Design Vue。
17+
18+
> 目前支持所有表单类组件(Data Entry),支持布局类组件:Grid 栅格,通用类组件:Button 按钮。
19+
>
20+
> 可将生成的代码直接运行在基于Ant Design Vue的vue项目中;也可导出JSON表单,使用配套的解析器将JSON解析成真实的表单。
21+
22+
* 预览:[https://fga.setworld.net/](https://fga.setworld.net/)
23+
24+
* form-generator:[https://github.com/JakHuang/form-generator](https://github.com/JakHuang/form-generator)
25+
26+
* Ant Design Vue文档:[https://www.antdv.com/docs/vue/introduce-cn/](https://www.antdv.com/docs/vue/introduce-cn/)
27+
28+
## JSON解析器
29+
30+
将保存在数据库中的JSON表单,解析成真实的表单
31+
在线示例: [https://fga.setworld.net/#/parser](https://fga.setworld.net/#/parser)
32+
33+
```
34+
// 安装
35+
npm i form-gen-antdv-parser
36+
```
37+
38+
[更多信息](https://github.com/fuzui/form-generator-antdv/tree/master/src/components/parser)
39+
40+
## 开始使用
41+
1. 环境准备
42+
* 安装[node](http://nodejs.org/)[git](https://git-scm.com/)
43+
44+
2. 安装
45+
46+
```shell
47+
git clone git@gitee.com:fuzui/form-generator-antdv.git
48+
```
49+
50+
51+
52+
```shell
53+
git clone git@github.com:fuzui/form-generator-antdv.git
54+
```
55+
56+
3. 本地开发
57+
58+
进入项目根目录
59+
60+
```shell
61+
npm install
62+
```
63+
64+
> 若耗时太长可使用`npm install --registry=https://registry.npm.taobao.org`
65+
66+
```shell
67+
npm run serve
68+
```
69+
70+
> 打开浏览器访问 [http://localhost:8080](http://localhost:8080/)
71+
72+
4. 构建
73+
74+
```shell
75+
npm run build
76+
```
77+
78+
## 文档
79+
如需开发或想要了解,可以去查阅[form-generator](https://github.com/JakHuang/form-generator)文档,其作者[JakHuang](https://github.com/JakHuang)描述的很全,向其表示由衷感谢。
80+
81+
## 致谢
82+
83+
* [form-generator](https://github.com/JakHuang/form-generator) Element UI表单设计及代码生成器
84+
* [Ant Design Vue](https://github.com/vueComponent/ant-design-vue/) An enterprise-class UI components based on Ant Design and Vue
85+
* [Ant Design Vue Pro](https://github.com/vueComponent/ant-design-vue-pro) Use Ant Design Vue like a Pro
86+
87+
> 参考了其图标选择器与国际化实现
88+
89+
## 联系
90+
91+
如果您发现了什么bug,或者有什么界面建议或意见,
92+
93+
欢迎 [issue](https://github.com/fuzui/form-generator-antdv/issues)
94+
95+
## 界面展示
96+
![](https://oss.fuzui.net/img/202202120318359.png)

babel.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/cli-plugin-babel/preset'
4+
]
5+
}

package.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "form-generator-antdv",
3+
"version": "1.0.0",
4+
"private": true,
5+
"scripts": {
6+
"build": "vue-cli-service build",
7+
"build:report": "vue-cli-service build --report",
8+
"build:render": "vue-cli-service build --target lib --name form-gen-antdv-render --dest ./src/components/render/lib/ ./src/components/render/render.js",
9+
"build:parser": "vue-cli-service build --target lib --name form-gen-antdv-parser --dest ./src/components/parser/lib/ ./src/components/parser/index.js",
10+
"lint": "vue-cli-service lint",
11+
"dev": "vue-cli-service serve"
12+
},
13+
"dependencies": {
14+
"@babel/parser": "^7.7.4",
15+
"ant-design-vue": "^1.7.8",
16+
"axios": ">=0.21.1",
17+
"clipboard": "^2.0.4",
18+
"core-js": "^3.6.5",
19+
"file-saver": "^2.0.2",
20+
"moment": "^2.29.1",
21+
"store": "^2.0.12",
22+
"throttle-debounce": "^2.1.0",
23+
"vue": "^2.6.14",
24+
"vue-i18n": "^8.17.4",
25+
"vue-svg-component-runtime": "^1.0.1",
26+
"vuedraggable": "^2.23.2",
27+
"vuex": "^3.6.2"
28+
},
29+
"devDependencies": {
30+
"@vue/cli-plugin-babel": "^4.0.4",
31+
"@vue/cli-plugin-eslint": "^4.0.4",
32+
"@vue/cli-service": "^4.0.4",
33+
"@vue/cli-plugin-vuex": "^4.0.4",
34+
"babel-eslint": "^10.1.0",
35+
"eslint": "^5.16.0",
36+
"eslint-config-airbnb-base": "^14.0.0",
37+
"eslint-plugin-import": "^2.20.0",
38+
"eslint-plugin-vue": "^5.2.3",
39+
"sass": "^1.23.7",
40+
"sass-loader": "^8.0.0",
41+
"svg-sprite-loader": "^4.1.6",
42+
"vue-svg-icon-loader": "^2.1.1",
43+
"vue-template-compiler": "^2.6.11",
44+
"webpack": "^4.46.0"
45+
},
46+
"homepage": "https://fga.setworld.net"
47+
}

public/index.html

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<!DOCTYPE html>
2+
<html lang="zh">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width,initial-scale=0,maximum-scale=0,user-scalable=yes,shrink-to-fit=no">
8+
<link rel="icon" href="<%= BASE_URL %>logo.png">
9+
<title>form-generator</title>
10+
<style>
11+
.pre-loader {
12+
position: absolute;
13+
top: calc(50% - 32px);
14+
left: calc(50% - 32px);
15+
width: 64px;
16+
height: 64px;
17+
border-radius: 50%;
18+
perspective: 800px;
19+
}
20+
.pre-loader .inner {
21+
position: absolute;
22+
box-sizing: border-box;
23+
width: 100%;
24+
height: 100%;
25+
border-radius: 50%;
26+
}
27+
.pre-loader .inner.one {
28+
left: 0%;
29+
top: 0%;
30+
-webkit-animation: rotate-one 1s linear infinite;
31+
animation: rotate-one 1s linear infinite;
32+
border-bottom: 3px solid #bc9048;
33+
}
34+
.pre-loader .inner.two {
35+
right: 0%;
36+
top: 0%;
37+
-webkit-animation: rotate-two 1s linear infinite;
38+
animation: rotate-two 1s linear infinite;
39+
border-right: 3px solid #74aeff;
40+
}
41+
.pre-loader .inner.three {
42+
right: 0%;
43+
bottom: 0%;
44+
-webkit-animation: rotate-three 1s linear infinite;
45+
animation: rotate-three 1s linear infinite;
46+
border-top: 3px solid #caef74;
47+
}
48+
@keyframes rotate-one {
49+
0% {
50+
-webkit-transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
51+
transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
52+
}
53+
100% {
54+
-webkit-transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
55+
transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
56+
}
57+
}
58+
@keyframes rotate-two {
59+
0% {
60+
-webkit-transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
61+
transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
62+
}
63+
100% {
64+
-webkit-transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
65+
transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
66+
}
67+
}
68+
@keyframes rotate-three {
69+
0% {
70+
-webkit-transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
71+
transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
72+
}
73+
100% {
74+
-webkit-transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
75+
transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
76+
}
77+
}
78+
</style>
79+
<link href="https://lib.baomitu.com/ant-design-vue/1.7.8/antd.min.css" rel="stylesheet">
80+
<link href="https://lib.baomitu.com/monaco-editor/0.19.3/min/vs/editor/editor.main.css" rel="stylesheet">
81+
<script src="https://lib.baomitu.com/moment.js/2.29.1/moment.min.js"></script>
82+
<script src="https://lib.baomitu.com/moment.js/2.29.1/locale/zh-cn.min.js"></script>
83+
<script src="https://lib.baomitu.com/moment.js/2.29.1/locale/es-us.min.js"></script>
84+
<script src="https://lib.baomitu.com/vue/2.6.11/vue<%= process.env.NODE_ENV === 'production' ? '.min' : ''%>.js"></script>
85+
<script src="https://lib.baomitu.com/vue-router/3.1.3/vue-router.min.js"></script>
86+
<script src="https://lib.baomitu.com/vuex/3.6.2/vuex.min.js"></script>
87+
<script src="https://lib.baomitu.com/ant-design-vue/1.7.8/antd.js"></script>
88+
89+
</head>
90+
91+
<body>
92+
<noscript>
93+
<strong>抱歉,javascript被禁用,请开启后重试。</strong>
94+
</noscript>
95+
<div id="app"></div>
96+
<div class="pre-loader" id="pre-loader">
97+
<div class="inner one"></div>
98+
<div class="inner two"></div>
99+
<div class="inner three"></div>
100+
</div>
101+
</body>
102+
103+
</html>
Binary file not shown.

public/libs/monaco-editor/vs/base/worker/workerMain.js

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)