vue2-client 1.4.64 → 1.5.0
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/CHANGELOG.md +11 -0
- package/package.json +1 -1
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +602 -601
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +713 -782
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +436 -310
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +508 -553
- package/src/base-client/components/common/XAddForm/XAddForm.vue +325 -354
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +24 -74
- package/src/base-client/components/common/XForm/XForm.vue +25 -114
- package/src/base-client/components/common/XForm/XFormItem.vue +485 -538
- package/src/base-client/components/common/XForm/index.md +177 -196
- package/src/base-client/components/common/XFormTable/XFormTable.vue +143 -418
- package/src/base-client/components/common/XTable/XTable.vue +504 -262
- package/src/components/STable/index.js +1 -1
- package/src/config/CreateQueryConfig.js +307 -313
- package/src/layouts/SinglePageView.vue +1 -1
- package/src/layouts/header/HeaderAvatar.vue +61 -60
- package/src/pages/login/Login.vue +48 -33
- package/src/router/guards.js +11 -2
- package/src/utils/indexedDB.js +145 -146
- package/vue.config.js +106 -111
package/vue.config.js
CHANGED
|
@@ -1,111 +1,106 @@
|
|
|
1
|
-
const path = require('path')
|
|
2
|
-
const webpack = require('webpack')
|
|
3
|
-
const ThemeColorReplacer = require('webpack-theme-color-replacer')
|
|
4
|
-
const { getThemeColors, modifyVars } = require('./src/utils/themeUtil')
|
|
5
|
-
const { resolveCss } = require('./src/utils/theme-color-replacer-extend')
|
|
6
|
-
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
|
7
|
-
|
|
8
|
-
const productionGzipExtensions = ['js', 'css']
|
|
9
|
-
const isProd = process.env.NODE_ENV === 'production'
|
|
10
|
-
|
|
11
|
-
const server = 'http://
|
|
12
|
-
// const local = 'http://localhost:8445/webmeter'
|
|
13
|
-
const local = 'http://
|
|
14
|
-
// const local = 'http://localhost:8080'
|
|
15
|
-
|
|
16
|
-
module.exports = {
|
|
17
|
-
devServer: {
|
|
18
|
-
// development server port 8000
|
|
19
|
-
port: 8001,
|
|
20
|
-
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
|
|
21
|
-
proxy: {
|
|
22
|
-
'/rs
|
|
23
|
-
target:
|
|
24
|
-
ws: false,
|
|
25
|
-
changeOrigin: true
|
|
26
|
-
},
|
|
27
|
-
'/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
changeOrigin: true
|
|
31
|
-
},
|
|
32
|
-
'/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
target:
|
|
41
|
-
changeOrigin: true
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
publicPath: process.env.VUE_APP_PUBLIC_PATH,
|
|
108
|
-
outputDir: 'dist',
|
|
109
|
-
assetsDir: 'static',
|
|
110
|
-
productionSourceMap: false
|
|
111
|
-
}
|
|
1
|
+
const path = require('path')
|
|
2
|
+
const webpack = require('webpack')
|
|
3
|
+
const ThemeColorReplacer = require('webpack-theme-color-replacer')
|
|
4
|
+
const { getThemeColors, modifyVars } = require('./src/utils/themeUtil')
|
|
5
|
+
const { resolveCss } = require('./src/utils/theme-color-replacer-extend')
|
|
6
|
+
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
|
7
|
+
|
|
8
|
+
const productionGzipExtensions = ['js', 'css']
|
|
9
|
+
const isProd = process.env.NODE_ENV === 'production'
|
|
10
|
+
|
|
11
|
+
const server = 'http://61.134.55.234:8405'
|
|
12
|
+
// const local = 'http://localhost:8445/webmeter'
|
|
13
|
+
const local = 'http://localhost:8445/webmeter'
|
|
14
|
+
// const local = 'http://localhost:8080'
|
|
15
|
+
|
|
16
|
+
module.exports = {
|
|
17
|
+
devServer: {
|
|
18
|
+
// development server port 8000
|
|
19
|
+
port: 8001,
|
|
20
|
+
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
|
|
21
|
+
proxy: {
|
|
22
|
+
'/rs': {
|
|
23
|
+
target: server,
|
|
24
|
+
ws: false,
|
|
25
|
+
changeOrigin: true
|
|
26
|
+
},
|
|
27
|
+
'/auth': {
|
|
28
|
+
pathRewrite: { '^/auth/': '/rs/auth/' },
|
|
29
|
+
target: local,
|
|
30
|
+
changeOrigin: true
|
|
31
|
+
},
|
|
32
|
+
'/api': {
|
|
33
|
+
pathRewrite: { '^/api/af-system/': '/rs/' },
|
|
34
|
+
// pathRewrite: { '^/api': '/' },
|
|
35
|
+
target: local,
|
|
36
|
+
changeOrigin: true
|
|
37
|
+
},
|
|
38
|
+
'/resource': {
|
|
39
|
+
pathRewrite: { '^/resource': '/' },
|
|
40
|
+
target: 'http://127.0.0.1:4789',
|
|
41
|
+
changeOrigin: true
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
pluginOptions: {
|
|
46
|
+
'style-resources-loader': {
|
|
47
|
+
preProcessor: 'less',
|
|
48
|
+
patterns: [path.resolve(__dirname, './src/theme/theme.less')]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
configureWebpack: config => {
|
|
52
|
+
config.entry.app = ['babel-polyfill', 'whatwg-fetch', './src/main.js']
|
|
53
|
+
config.performance = {
|
|
54
|
+
hints: false
|
|
55
|
+
}
|
|
56
|
+
config.plugins.push(
|
|
57
|
+
new ThemeColorReplacer({
|
|
58
|
+
fileName: 'css/theme-colors-[contenthash:8].css',
|
|
59
|
+
matchColors: getThemeColors(),
|
|
60
|
+
injectCss: true,
|
|
61
|
+
resolveCss
|
|
62
|
+
})
|
|
63
|
+
)
|
|
64
|
+
// Ignore all locale files of moment.js
|
|
65
|
+
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
|
|
66
|
+
// 生产环境下将资源压缩成gzip格式
|
|
67
|
+
if (isProd) {
|
|
68
|
+
// add `CompressionWebpack` plugin to webpack plugins
|
|
69
|
+
config.plugins.push(new CompressionWebpackPlugin({
|
|
70
|
+
algorithm: 'gzip',
|
|
71
|
+
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
|
|
72
|
+
threshold: 10240,
|
|
73
|
+
minRatio: 0.8
|
|
74
|
+
}))
|
|
75
|
+
}
|
|
76
|
+
// if prod, add externals
|
|
77
|
+
// if (isProd) {
|
|
78
|
+
// config.externals = assetsCDN.externals
|
|
79
|
+
// }
|
|
80
|
+
},
|
|
81
|
+
chainWebpack: config => {
|
|
82
|
+
// 生产环境下关闭css压缩的 colormin 项,因为此项优化与主题色替换功能冲突
|
|
83
|
+
if (isProd) {
|
|
84
|
+
config.plugin('optimize-css')
|
|
85
|
+
.tap(args => {
|
|
86
|
+
args[0].cssnanoOptions.preset[1].colormin = false
|
|
87
|
+
return args
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
config.resolve.alias.set('@vue2-client', path.resolve(__dirname, 'src'))
|
|
91
|
+
},
|
|
92
|
+
css: {
|
|
93
|
+
loaderOptions: {
|
|
94
|
+
less: {
|
|
95
|
+
lessOptions: {
|
|
96
|
+
modifyVars: modifyVars(),
|
|
97
|
+
javascriptEnabled: true
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
publicPath: process.env.VUE_APP_PUBLIC_PATH,
|
|
103
|
+
outputDir: 'dist',
|
|
104
|
+
assetsDir: 'static',
|
|
105
|
+
productionSourceMap: false
|
|
106
|
+
}
|