app-form-view 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/css/style.css +157 -206
- package/dist/index.js +563 -2
- package/package.json +7 -5
- package/scripts/rollup.config.base.js +100 -68
- package/scripts/rollup.config.build.js +32 -29
- package/scripts/rollup.config.dev.js +18 -21
- package/scripts/rollup.config.prod.js +12 -2
- package/src/app-index.js +70 -53
- package/src/assets/css/app-form.css +50 -14
- package/src/assets/css/global.css +12 -12
- package/src/assets/scss/_flex.scss +31 -34
- package/src/assets/scss/app-form.scss +184 -1
- package/src/assets/scss/global.scss +179 -1
- package/src/components/appForm/Checkbox.vue +5 -0
- package/src/components/appForm/Input.vue +2 -2
- package/src/components/appForm/SearchApi.vue +1 -1
- package/src/components/appForm/Table.vue +21 -3
- package/src/components/appForm/select.vue +5 -5
- package/src/components/form/SearchSelect.vue +3 -3
- package/src/components/form/Table.vue +1 -1
- package/src/index.js +1 -1
- package/src/views/build/FieldMappingDialog.vue +0 -7
- package/src/views/build/RightPanel.vue +0 -1
- package/src/views/build/index.vue +0 -15
- package/src/views/build/viewAppForm.vue +150 -111
- package/src/views/build/viewForm.vue +2 -2
- package/static/plugins/css/app-form.css +3 -1
- package/static/plugins/scss/app-form.scss +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "app-form-view",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "vue表单组件库",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"license": "ISC",
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@babel/core": "^7.20.7",
|
|
27
|
+
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
|
27
28
|
"@babel/preset-env": "^7.20.2",
|
|
28
29
|
"@rollup/plugin-alias": "^4.0.2",
|
|
29
30
|
"@rollup/plugin-babel": "^6.0.3",
|
|
@@ -35,20 +36,21 @@
|
|
|
35
36
|
"@rollup/plugin-terser": "^0.4.4",
|
|
36
37
|
"@vue/babel-helper-vue-jsx-merge-props": "^1.4.0",
|
|
37
38
|
"@vue/babel-plugin-transform-vue-jsx": "^1.4.0",
|
|
38
|
-
"autoprefixer": "^10.
|
|
39
|
+
"autoprefixer": "^10.5.0",
|
|
39
40
|
"body-parser": "^1.20.2",
|
|
40
41
|
"express": "^4.18.2",
|
|
41
42
|
"glob": "^8.1.0",
|
|
42
43
|
"http-proxy-middleware": "^3.0.5",
|
|
43
44
|
"node-sass": "^6.0.1",
|
|
45
|
+
"postcss": "^8.5.15",
|
|
44
46
|
"rollup": "^2.79.1",
|
|
45
47
|
"rollup-plugin-copy": "^3.5.0",
|
|
46
48
|
"rollup-plugin-filesize": "^9.1.2",
|
|
47
49
|
"rollup-plugin-livereload": "^2.0.5",
|
|
48
|
-
"rollup-plugin-
|
|
50
|
+
"rollup-plugin-scss": "^4.0.1",
|
|
49
51
|
"rollup-plugin-serve": "^2.0.2",
|
|
50
52
|
"rollup-plugin-vue2": "^0.8.1",
|
|
51
|
-
"sass": "^1.
|
|
53
|
+
"sass": "^1.101.0",
|
|
52
54
|
"sass-loader": "^7.0.3",
|
|
53
55
|
"uglify-es": "^3.3.9",
|
|
54
56
|
"vuepress": "^1.9.8",
|
|
@@ -62,7 +64,7 @@
|
|
|
62
64
|
"js-beautify": "^1.15.4",
|
|
63
65
|
"jszip": "^3.10.1",
|
|
64
66
|
"lodash": "^4.17.21",
|
|
65
|
-
"rollup-plugin-
|
|
67
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
66
68
|
"vant": "^2.12.14",
|
|
67
69
|
"vue": "^2.6.14",
|
|
68
70
|
"vue-template-compiler": "^2.6.14",
|
|
@@ -3,81 +3,113 @@ import resolve from "@rollup/plugin-node-resolve"
|
|
|
3
3
|
import commonjs from "@rollup/plugin-commonjs"
|
|
4
4
|
import copy from 'rollup-plugin-copy';
|
|
5
5
|
import json from '@rollup/plugin-json'
|
|
6
|
-
import scss from "rollup-plugin-scss"
|
|
7
6
|
import alias from '@rollup/plugin-alias'
|
|
8
7
|
import vue from 'rollup-plugin-vue2'
|
|
9
8
|
import image from '@rollup/plugin-image'
|
|
10
9
|
import replace from '@rollup/plugin-replace'
|
|
10
|
+
// 新增postcss,移除scss导入
|
|
11
|
+
import postcss from "rollup-plugin-postcss"
|
|
11
12
|
const path = require('path')
|
|
12
13
|
|
|
13
14
|
const customResolver = resolve({
|
|
14
15
|
extensions: ['.mjs', '.js', '.jsx', '.json', '.sass', '.scss']
|
|
15
16
|
});
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
18
|
+
/**
|
|
19
|
+
* 工厂生成基础配置
|
|
20
|
+
* @param {string} cssOutputName css输出完整路径/文件名
|
|
21
|
+
* @returns Rollup基础配置
|
|
22
|
+
*/
|
|
23
|
+
function createBaseConfig(cssOutputName = "form-design.css") {
|
|
24
|
+
return {
|
|
25
|
+
input: "src/index.js",
|
|
26
|
+
external: ['vue', 'vuex', 'element-ui', 'vant'],
|
|
27
|
+
output: {
|
|
28
|
+
globals: {
|
|
29
|
+
vue: 'Vue',
|
|
30
|
+
vuex: 'Vuex',
|
|
31
|
+
'element-ui': 'ELEMENT',
|
|
32
|
+
vant: 'vant'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
plugins: [
|
|
36
|
+
alias({
|
|
37
|
+
entries: [
|
|
38
|
+
{ find: '@', replacement: path.resolve(__dirname, '../src') },
|
|
39
|
+
],
|
|
40
|
+
customResolver
|
|
41
|
+
}),
|
|
42
|
+
replace({
|
|
43
|
+
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
|
|
44
|
+
preventAssignment: true,
|
|
45
|
+
}),
|
|
46
|
+
vue({
|
|
47
|
+
template: {
|
|
48
|
+
compiler: require('vue-template-compiler'),
|
|
49
|
+
compilerOptions: {
|
|
50
|
+
preserveWhitespace: false
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
css: false,
|
|
54
|
+
scoped: true
|
|
55
|
+
}),
|
|
56
|
+
// 替换原来的 scss 插件
|
|
57
|
+
postcss({
|
|
58
|
+
extract: cssOutputName,
|
|
59
|
+
use: ["sass"], // 解析 lang="scss"
|
|
60
|
+
plugins: [
|
|
61
|
+
require("autoprefixer")()
|
|
62
|
+
],
|
|
63
|
+
sourceMap: false
|
|
64
|
+
}),
|
|
65
|
+
resolve({
|
|
66
|
+
extensions: ['.js', '.vue', '.json'],
|
|
67
|
+
preferBuiltins: false
|
|
68
|
+
}),
|
|
69
|
+
commonjs({
|
|
70
|
+
include: "node_modules/**",
|
|
71
|
+
}),
|
|
72
|
+
babel({
|
|
73
|
+
exclude: 'node_modules/**',
|
|
74
|
+
extensions: ['.js', '.vue', '.jsx'],
|
|
75
|
+
babelHelpers: 'bundled',
|
|
76
|
+
presets: [
|
|
77
|
+
[
|
|
78
|
+
'@babel/preset-env',
|
|
79
|
+
{
|
|
80
|
+
targets: {
|
|
81
|
+
ie: 11,
|
|
82
|
+
chrome: 49,
|
|
83
|
+
safari: 10
|
|
84
|
+
},
|
|
85
|
+
modules: false,
|
|
86
|
+
useBuiltIns: false
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
],
|
|
90
|
+
plugins: [
|
|
91
|
+
'@babel/plugin-syntax-jsx',
|
|
92
|
+
'@vue/babel-plugin-transform-vue-jsx',
|
|
93
|
+
'@babel/plugin-proposal-optional-chaining'
|
|
94
|
+
]
|
|
95
|
+
}),
|
|
96
|
+
json(),
|
|
97
|
+
image(),
|
|
98
|
+
copy({
|
|
99
|
+
targets: [
|
|
100
|
+
{
|
|
101
|
+
src: 'node_modules/element-ui/lib/theme-chalk/fonts/*',
|
|
102
|
+
dest: 'dist/fonts'
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
overwrite: true
|
|
106
|
+
})
|
|
107
|
+
],
|
|
108
|
+
onwarn(warning, warn) {
|
|
109
|
+
if (warning.code === 'CIRCULAR_DEPENDENCY') return
|
|
110
|
+
if (warning.message.includes('stream')) return
|
|
111
|
+
warn(warning)
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
export default createBaseConfig;
|
|
@@ -1,54 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
import replace from '@rollup/plugin-replace';
|
|
3
1
|
import path from "path";
|
|
4
2
|
const glob = require("glob")
|
|
5
3
|
const list = {};
|
|
6
|
-
|
|
4
|
+
|
|
5
|
+
function makeList(dirpath, list) {
|
|
7
6
|
const files = glob.sync(dirpath + '/**/app-index.js')
|
|
8
7
|
for (let file of files) {
|
|
9
8
|
const component = 'index'
|
|
10
9
|
list[component] = file
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
}
|
|
14
12
|
makeList('src', list)
|
|
13
|
+
|
|
15
14
|
import filesize from "rollup-plugin-filesize";
|
|
16
15
|
import terser from '@rollup/plugin-terser';
|
|
17
|
-
import
|
|
16
|
+
import createBaseConfig from "./rollup.config.base.js";
|
|
18
17
|
import { name, version } from "../package.json";
|
|
19
|
-
|
|
18
|
+
|
|
20
19
|
const banner =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
`/*!
|
|
21
|
+
* ${name}.js v${version}
|
|
22
|
+
* Released under the MIT License.
|
|
23
|
+
*/`;
|
|
24
|
+
|
|
25
|
+
const external = ['vue', 'element-ui', 'vant', 'vuex'];
|
|
25
26
|
const globals = {
|
|
26
27
|
'vuex': 'Vuex',
|
|
27
28
|
'vue': 'Vue',
|
|
28
29
|
'vant': 'vant',
|
|
29
|
-
'element-ui': 'ELEMENT'
|
|
30
|
-
'util': 'util'
|
|
30
|
+
'element-ui': 'ELEMENT'
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
|
|
33
|
+
// 调用工厂函数,指定css输出路径,不要手动改base原始对象
|
|
34
|
+
const baseConfig = createBaseConfig("css/style.css");
|
|
35
|
+
baseConfig.input = 'src/app-index.js'
|
|
36
|
+
|
|
34
37
|
export default [
|
|
35
|
-
// .js, .cjs.js, .esm.js
|
|
36
38
|
{
|
|
37
39
|
...baseConfig,
|
|
38
40
|
external,
|
|
39
|
-
output:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
output: {
|
|
42
|
+
file: "dist/index.js",
|
|
43
|
+
banner,
|
|
44
|
+
format: 'umd',
|
|
45
|
+
globals,
|
|
46
|
+
name: "AppFormView",
|
|
47
|
+
},
|
|
48
|
+
// 重点:删掉外层的 scss 实例,只追加压缩插件
|
|
49
|
+
plugins: [
|
|
50
|
+
...baseConfig.plugins,
|
|
51
|
+
terser({
|
|
52
|
+
format: { comments: 'all' }
|
|
53
|
+
}),
|
|
54
|
+
filesize()
|
|
50
55
|
],
|
|
51
|
-
plugins: [...baseConfig.plugins, terser(), filesize()],
|
|
52
56
|
}
|
|
53
|
-
];
|
|
54
|
-
|
|
57
|
+
];
|
|
@@ -1,32 +1,29 @@
|
|
|
1
1
|
import livereload from "rollup-plugin-livereload";
|
|
2
|
-
import
|
|
2
|
+
import createBaseConfig from "./rollup.config.base.js";
|
|
3
3
|
import { name } from "../package.json";
|
|
4
4
|
import express from 'express';
|
|
5
5
|
import { createProxyMiddleware } from 'http-proxy-middleware';
|
|
6
|
-
import replace from '@rollup/plugin-replace';
|
|
7
6
|
const glob = require("glob");
|
|
8
7
|
const list = {};
|
|
9
8
|
|
|
10
|
-
//
|
|
11
|
-
|
|
9
|
+
// 移除无用 async
|
|
10
|
+
function makeList(dirpath, list) {
|
|
12
11
|
const files = glob.sync(dirpath + '/**/index.js');
|
|
13
12
|
for (let file of files) {
|
|
14
|
-
// 提取组件路径(如 src/components/button/index.js → button)
|
|
15
13
|
const component = file.split(/[/.]/).slice(-3, -1).join('/');
|
|
16
|
-
list[component] = file;
|
|
14
|
+
list[component] = file;
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
17
|
makeList('src/components/', list);
|
|
20
18
|
|
|
21
|
-
// 启动 Express
|
|
19
|
+
// 启动 Express 开发服务
|
|
22
20
|
const app = express();
|
|
23
|
-
const localIP = 'localhost';
|
|
24
|
-
const proxyTarget = `http://${localIP}:
|
|
21
|
+
const localIP = 'localhost';
|
|
22
|
+
const proxyTarget = `http://${localIP}:8082`;
|
|
25
23
|
|
|
26
|
-
// 静态文件服务
|
|
27
24
|
app.use(express.static('.'));
|
|
28
25
|
|
|
29
|
-
//
|
|
26
|
+
// API 代理
|
|
30
27
|
app.use('/api', createProxyMiddleware({
|
|
31
28
|
target: proxyTarget,
|
|
32
29
|
changeOrigin: true,
|
|
@@ -39,15 +36,17 @@ app.use('/api', createProxyMiddleware({
|
|
|
39
36
|
}
|
|
40
37
|
}));
|
|
41
38
|
|
|
42
|
-
// 修复2:控制台日志显示正确的IP地址(而非localhost)
|
|
43
39
|
app.listen(8006, localIP, () => {
|
|
44
|
-
console.log(`🚀 开发服务器已启动: http://${localIP}:8006`);
|
|
45
|
-
console.log(`🔀 代理配置: /api/* -> ${proxyTarget}/api/*`);
|
|
40
|
+
console.log(`🚀 开发服务器已启动: http://${localIP}:8006`);
|
|
41
|
+
console.log(`🔀 代理配置: /api/* -> ${proxyTarget}/api/*`);
|
|
46
42
|
});
|
|
47
43
|
|
|
44
|
+
// 1. 通过工厂生成全新独立配置,指定开发环境CSS输出路径
|
|
45
|
+
const devBase = createBaseConfig();
|
|
46
|
+
|
|
48
47
|
export default [
|
|
49
48
|
{
|
|
50
|
-
...
|
|
49
|
+
...devBase,
|
|
51
50
|
output: [
|
|
52
51
|
{
|
|
53
52
|
file: `dist/${name}.js`,
|
|
@@ -56,15 +55,13 @@ export default [
|
|
|
56
55
|
},
|
|
57
56
|
],
|
|
58
57
|
plugins: [
|
|
59
|
-
...
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
preventAssignment: true
|
|
63
|
-
}),
|
|
58
|
+
...devBase.plugins,
|
|
59
|
+
// 删除外层 scss、删除外层重复 replace!base 已内置
|
|
60
|
+
// 仅追加开发专属热更新插件
|
|
64
61
|
livereload({
|
|
65
62
|
watch: '.',
|
|
66
63
|
port: 35729,
|
|
67
|
-
host: localIP
|
|
64
|
+
host: localIP
|
|
68
65
|
})
|
|
69
66
|
],
|
|
70
67
|
},
|
|
@@ -3,7 +3,7 @@ import terser from "@rollup/plugin-terser";
|
|
|
3
3
|
import baseConfig from "./rollup.config.base.js";
|
|
4
4
|
import { name as packageName, version } from "../package.json";
|
|
5
5
|
import path from "path";
|
|
6
|
-
|
|
6
|
+
import scss from "rollup-plugin-scss"
|
|
7
7
|
// banner 保持不变
|
|
8
8
|
const banner =
|
|
9
9
|
`${"/*!\n" + " * "}${packageName}.js v${version}\n` +
|
|
@@ -62,12 +62,17 @@ function generateRollupConfigs() {
|
|
|
62
62
|
globals
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
|
-
plugins: [...baseConfig.plugins,
|
|
65
|
+
plugins: [...baseConfig.plugins, scss({
|
|
66
|
+
fileName: "form-design.css",
|
|
67
|
+
failOnError: true,
|
|
68
|
+
//sourceMap: false,
|
|
69
|
+
}), filesize()]
|
|
66
70
|
});
|
|
67
71
|
|
|
68
72
|
// --- 压缩版配置(.min.js)---
|
|
69
73
|
configs.push({
|
|
70
74
|
...baseConfig,
|
|
75
|
+
|
|
71
76
|
input: entryPath, // 动态设置入口文件
|
|
72
77
|
external,
|
|
73
78
|
output: [
|
|
@@ -81,6 +86,11 @@ function generateRollupConfigs() {
|
|
|
81
86
|
],
|
|
82
87
|
plugins: [
|
|
83
88
|
...baseConfig.plugins,
|
|
89
|
+
scss({
|
|
90
|
+
fileName: "form-design.css",
|
|
91
|
+
failOnError: true,
|
|
92
|
+
//sourceMap: false,
|
|
93
|
+
}),
|
|
84
94
|
terser({
|
|
85
95
|
compress: {
|
|
86
96
|
drop_console: false,
|
package/src/app-index.js
CHANGED
|
@@ -1,65 +1,82 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
2
|
import '@/assets/scss/app-form.scss'
|
|
3
|
-
// 只导入自己的组件
|
|
4
3
|
import viewAppForm from '@/views/build/viewAppForm.vue'
|
|
4
|
+
// 全部导入改名
|
|
5
|
+
import _AppForm from '@/components/appForm/Form.vue'
|
|
6
|
+
import _AppFormItem from '@/components/appForm/Formitem.vue'
|
|
7
|
+
import _AppSubRow from '@/components/appForm/SubRow.vue'
|
|
8
|
+
import _AppInput from '@/components/appForm/Input.vue'
|
|
9
|
+
import _AppTextBox from '@/components/appForm/TextBox.vue'
|
|
10
|
+
import _AppInputHidden from '@/components/appForm/InputHidden.vue'
|
|
11
|
+
import _AppSelect from '@/components/appForm/Select.vue'
|
|
12
|
+
import _AppRadio from '@/components/appForm/Radio.vue'
|
|
13
|
+
import _AppCheckbox from '@/components/appForm/Checkbox.vue'
|
|
14
|
+
import _AppDateTimePicker from '@/components/appForm/DateTimePicker.vue'
|
|
15
|
+
import _AppDateTimeRange from '@/components/appForm/DateTimePickers.vue'
|
|
16
|
+
import _AppInputTree from '@/components/appForm/inputTree.vue'
|
|
17
|
+
import _AppInputUpload from '@/components/appForm/InputUpload.vue'
|
|
18
|
+
import _AppSearchSelect from '@/components/appForm/SearchSelect.vue'
|
|
19
|
+
import _AppSearchApi from '@/components/appForm/SearchApi.vue'
|
|
20
|
+
import _AppSubTitle from '@/components/appForm/SubTitle.vue'
|
|
21
|
+
import _AppTable from '@/components/appForm/Table.vue'
|
|
22
|
+
import _AppButton from '@/components/appForm/Button.vue'
|
|
23
|
+
import _AppLayoutBlock from './components/appForm/LayoutBlock.vue'
|
|
5
24
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const innerComponents = [
|
|
29
|
-
AppForm,
|
|
30
|
-
AppFormItem,
|
|
31
|
-
AppSubRow,
|
|
32
|
-
AppInput,
|
|
33
|
-
AppTextBox,
|
|
34
|
-
AppInputHidden,
|
|
35
|
-
AppSelect,
|
|
36
|
-
AppRadio,
|
|
37
|
-
AppCheckbox,
|
|
38
|
-
AppDateTimePicker,
|
|
39
|
-
AppDateTimeRange,
|
|
40
|
-
AppInputTree,
|
|
41
|
-
AppInputUpload,
|
|
42
|
-
AppSearchSelect,
|
|
43
|
-
AppSearchApi,
|
|
44
|
-
AppSubTitle,
|
|
45
|
-
AppTable,
|
|
46
|
-
AppButton,
|
|
47
|
-
AppLayoutBlock
|
|
48
|
-
]
|
|
25
|
+
const components = {
|
|
26
|
+
AppFormView: viewAppForm,
|
|
27
|
+
AppForm: _AppForm,
|
|
28
|
+
AppFormItem: _AppFormItem,
|
|
29
|
+
AppSubRow: _AppSubRow,
|
|
30
|
+
AppInput: _AppInput,
|
|
31
|
+
AppTextBox: _AppTextBox,
|
|
32
|
+
AppInputHidden: _AppInputHidden,
|
|
33
|
+
AppSelect: _AppSelect,
|
|
34
|
+
AppRadio: _AppRadio,
|
|
35
|
+
AppCheckbox: _AppCheckbox,
|
|
36
|
+
AppDateTimePicker: _AppDateTimePicker,
|
|
37
|
+
AppDateTimeRange: _AppDateTimeRange,
|
|
38
|
+
AppInputTree: _AppInputTree,
|
|
39
|
+
AppInputUpload: _AppInputUpload,
|
|
40
|
+
AppSearchSelect: _AppSearchSelect,
|
|
41
|
+
AppSearchApi: _AppSearchApi,
|
|
42
|
+
AppSubTitle: _AppSubTitle,
|
|
43
|
+
AppTable: _AppTable,
|
|
44
|
+
AppButton: _AppButton,
|
|
45
|
+
AppLayoutBlock: _AppLayoutBlock
|
|
46
|
+
}
|
|
49
47
|
|
|
50
|
-
// 安装插件:只对外暴露 viewAppForm
|
|
51
48
|
const install = function (Vue) {
|
|
52
49
|
if (install.installed) return
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
innerComponents.forEach(comp => {
|
|
50
|
+
install.installed = true
|
|
51
|
+
Object.values(components).forEach(comp => {
|
|
56
52
|
Vue.component(comp.name, comp)
|
|
57
53
|
})
|
|
54
|
+
}
|
|
58
55
|
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
const AppFormPlugin = {
|
|
57
|
+
install,
|
|
58
|
+
...components
|
|
61
59
|
}
|
|
60
|
+
export default AppFormPlugin
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
// 现在导出变量名和导入别名不冲突,正常编译
|
|
63
|
+
export const AppFormView = components.AppFormView
|
|
64
|
+
export const AppForm = components.AppForm
|
|
65
|
+
export const AppFormItem = components.AppFormItem
|
|
66
|
+
export const AppSubRow = components.AppSubRow
|
|
67
|
+
export const AppInput = components.AppInput
|
|
68
|
+
export const AppTextBox = components.AppTextBox
|
|
69
|
+
export const AppInputHidden = components.AppInputHidden
|
|
70
|
+
export const AppSelect = components.AppSelect
|
|
71
|
+
export const AppRadio = components.AppRadio
|
|
72
|
+
export const AppCheckbox = components.AppCheckbox
|
|
73
|
+
export const AppDateTimePicker = components.AppDateTimePicker
|
|
74
|
+
export const AppDateTimeRange = components.AppDateTimeRange
|
|
75
|
+
export const AppInputTree = components.AppInputTree
|
|
76
|
+
export const AppInputUpload = components.AppInputUpload
|
|
77
|
+
export const AppSearchSelect = components.AppSearchSelect
|
|
78
|
+
export const AppSearchApi = components.AppSearchApi
|
|
79
|
+
export const AppSubTitle = components.AppSubTitle
|
|
80
|
+
export const AppTable = components.AppTable
|
|
81
|
+
export const AppButton = components.AppButton
|
|
82
|
+
export const AppLayoutBlock = components.AppLayoutBlock
|