Skip to content

Commit 6811d65

Browse files
zxydaisyzhangxiaoyu06
andauthored
feat: support description component (#1)
* feat: support description component * feat: support component validate * feat: support custiomized attr * feat: add test editor * feat: add editor public * doc: update readme * feat: keep old attr type & add compType * feat: add compType * feat: support input list * feat: support value of checkboxs is Array * feat: support date time range * feat: support address * feat: support image select * feat: test component with v-model * feat: test read upload files in array * feat: remove useless & add placeholder * feat: add max & min maxLength & minLength * feat: update config for publish Co-authored-by: zhangxiaoyu06 <zhangxiaoyu06@corp.netease.com>
1 parent e3ba8bf commit 6811d65

File tree

65 files changed

+3639
-177
lines changed

Some content is hidden

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

65 files changed

+3639
-177
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"no-alert": [0],
99
"function-paren-newline": [0],
1010
"vue/html-indent": [0],
11-
"vue/no-unused-vars": [0]
11+
"vue/no-unused-vars": [0],
12+
"vue/no-unused-components": [0]
1213
}
1314
}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ dist-raw/
88
dist-doc-entry/
99
screenshots/
1010

11-
public/
11+
public/*
1212
/cloud-ui-flowable/
1313

1414
# 加了lock有时忘记更新,会导致出问题
1515
package-lock.json
1616
yarn.lock
1717

1818
.vscode
19+
editor/node_modules
20+
.history

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ bin/find-by-re ./src '<u-input[\s\S]{0,300}close'
6464

6565
开发
6666

67+
预览组件的配置效果
68+
```
69+
cd editor
70+
yarn
71+
yarn serve
72+
````
73+
6774
### npm run build:docs
6875
6976
构建文档

editor/.gitignore

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

editor/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# editor
2+
3+
## Project setup
4+
```
5+
yarn install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
yarn serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
yarn build
16+
```
17+
18+
### Lints and fixes files
19+
```
20+
yarn lint
21+
```
22+
23+
### Customize configuration
24+
See [Configuration Reference](https://cli.vuejs.org/config/).

editor/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+
}

editor/editor.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
3+
4+
5+
组件的设置的配置 api.yaml 的内容需要通过一定的转化才能显示在编辑和预览页面,具体可以参考 editor 目录下的组件的使用例子

editor/package.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "editor",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint"
9+
},
10+
"dependencies": {
11+
"cloud-ui.vusion": "^0.11.19",
12+
"core-js": "^3.6.5",
13+
"extract-css": "^2.0.0",
14+
"extract-css-loader": "^0.0.1",
15+
"icon-font-plugin": "^0.0.7",
16+
"vue": "^2.6.11",
17+
"vue-cli-plugin-vusion": "^0.12.27",
18+
"yaml-loader": "^0.6.0"
19+
},
20+
"devDependencies": {
21+
"@vue/cli-plugin-babel": "~4.5.0",
22+
"@vue/cli-plugin-eslint": "~4.5.0",
23+
"@vue/cli-service": "~4.5.0",
24+
"babel-eslint": "^10.1.0",
25+
"eslint": "^6.7.2",
26+
"eslint-plugin-vue": "^6.2.2",
27+
"vue-template-compiler": "^2.6.11"
28+
},
29+
"eslintConfig": {
30+
"root": true,
31+
"env": {
32+
"node": true
33+
},
34+
"extends": [
35+
"plugin:vue/essential",
36+
"eslint:recommended"
37+
],
38+
"parserOptions": {
39+
"parser": "babel-eslint"
40+
},
41+
"rules": {}
42+
},
43+
"browserslist": [
44+
"> 1%",
45+
"last 2 versions",
46+
"not dead"
47+
]
48+
}

editor/public/favicon.ico

4.19 KB
Binary file not shown.

editor/public/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title><%= htmlWebpackPlugin.options.title %></title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
14+
<div id="app"></div>
15+
<!-- built files will be auto injected -->
16+
</body>
17+
</html>

0 commit comments

Comments
 (0)