mooho-base-admin-plus 2.10.96 → 2.10.98
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/history.md +3 -1
- package/package/mooho-base-admin-plus.min.esm.js +23641 -34285
- package/package/mooho-base-admin-plus.min.js +88 -155
- package/package/style.css +1 -1
- package/package.json +68 -58
- package/src/components/view/table-filter.vue +1 -1
- package/src/components/view/view-form.vue +4 -3
- package/src/components/view/view-table.vue +1 -1
- package/src/i18n/index.js +17 -17
- package/vite.config.js +125 -99
package/package.json
CHANGED
|
@@ -1,58 +1,68 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mooho-base-admin-plus",
|
|
3
|
-
"description": "MOOHO basic framework for admin by Vue3",
|
|
4
|
-
"version": "2.10.
|
|
5
|
-
"author": "jinyifan <jinyifan@mooho.com.cn>",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"private": false,
|
|
8
|
-
"type": "module",
|
|
9
|
-
"module": "./package/mooho-base-admin-plus.min.js",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
"vue
|
|
57
|
-
|
|
58
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "mooho-base-admin-plus",
|
|
3
|
+
"description": "MOOHO basic framework for admin by Vue3",
|
|
4
|
+
"version": "2.10.98",
|
|
5
|
+
"author": "jinyifan <jinyifan@mooho.com.cn>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"private": false,
|
|
8
|
+
"type": "module",
|
|
9
|
+
"module": "./package/mooho-base-admin-plus.min.js",
|
|
10
|
+
"peerDependencies": {
|
|
11
|
+
"vue": "^3.3.0",
|
|
12
|
+
"vue-router": "^4.0.0",
|
|
13
|
+
"vuex": "^4.0.0",
|
|
14
|
+
"vue-i18n": "^9.0.0",
|
|
15
|
+
"view-ui-plus": "^1.0.0",
|
|
16
|
+
"vuedraggable": "^4.0.0",
|
|
17
|
+
"sortablejs": "^1.0.0"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"postinstall": "node scripts/sync-ckeditor.cjs",
|
|
21
|
+
"dev": "vite --open",
|
|
22
|
+
"build": "vite build",
|
|
23
|
+
"package": "vite build --mode lib"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@fortawesome/fontawesome-free": "^5.13.0",
|
|
27
|
+
"@handsontable/vue3": "^16.1.1",
|
|
28
|
+
"axios": "^1.6.7",
|
|
29
|
+
"ckeditor4": "4.22.1",
|
|
30
|
+
"date-fns": "^2.9.0",
|
|
31
|
+
"echarts": "^5.3.2",
|
|
32
|
+
"file-saver": "^2.0.2",
|
|
33
|
+
"handsontable": "^16.1.1",
|
|
34
|
+
"js-cookie": "^3.0.1",
|
|
35
|
+
"jsencrypt": "^3.3.2",
|
|
36
|
+
"lodash": "^4.17.21",
|
|
37
|
+
"lowdb": "^1.0.0",
|
|
38
|
+
"screenfull": "^4.2.1",
|
|
39
|
+
"sweetalert2": "^9.8.2",
|
|
40
|
+
"view-ui-plus": "^1.0.0",
|
|
41
|
+
"vue-i18n": "^9.1.9",
|
|
42
|
+
"vue-router": "^4.0.14",
|
|
43
|
+
"vuedraggable": "^4.1.0",
|
|
44
|
+
"vuex": "^4.0.2"
|
|
45
|
+
},
|
|
46
|
+
"browserslist": [
|
|
47
|
+
"defaults",
|
|
48
|
+
"> 1%",
|
|
49
|
+
"last 2 versions",
|
|
50
|
+
"not ie <= 8",
|
|
51
|
+
"iOS >= 7",
|
|
52
|
+
"Android >= 4.0"
|
|
53
|
+
],
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"vue": "^3.4.0",
|
|
56
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
57
|
+
"@vue/compiler-sfc": "^3.0.0",
|
|
58
|
+
"@vue/eslint-config-standard": "^4.0.0",
|
|
59
|
+
"eslint-config-prettier": "^8.3.0",
|
|
60
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
61
|
+
"eslint-plugin-vue": "^8.0.3",
|
|
62
|
+
"less": "^2.7.3",
|
|
63
|
+
"less-loader": "^4.1.0",
|
|
64
|
+
"vite": "^5.0.0",
|
|
65
|
+
"vite-plugin-compression": "^0.5.1",
|
|
66
|
+
"vue-template-compiler": "^2.6.14"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -375,7 +375,7 @@
|
|
|
375
375
|
id: parseFloat(key),
|
|
376
376
|
name: value
|
|
377
377
|
});
|
|
378
|
-
} else if (column.dataType == 'Boolean' &&
|
|
378
|
+
} else if (column.dataType == 'Boolean' && column.controlType != 'Select') {
|
|
379
379
|
column.dataSource.push({
|
|
380
380
|
id: key.toUpperCase() == 'TRUE',
|
|
381
381
|
name: value
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
</template>
|
|
190
190
|
<template v-else-if="column.controlType === 'Select'">
|
|
191
191
|
<Select
|
|
192
|
-
:model-value="parseData(data, column.code)"
|
|
192
|
+
:model-value="parseData(data, column.code) == null ? null : parseData(data, column.code).toString()"
|
|
193
193
|
@update:model-value="$event => setData(data, column.code, $event)"
|
|
194
194
|
:disabled="readonly || column.isReadonly"
|
|
195
195
|
:clearable="!(readonly || column.isReadonly)"
|
|
@@ -951,7 +951,8 @@
|
|
|
951
951
|
column.controlType == 'DateTime' ||
|
|
952
952
|
column.controlType == 'Year' ||
|
|
953
953
|
column.controlType == 'Month' ||
|
|
954
|
-
column.controlType == 'DateRange'
|
|
954
|
+
column.controlType == 'DateRange' ||
|
|
955
|
+
(column.controlType == 'Select' && column.dataType == 'Boolean')
|
|
955
956
|
) {
|
|
956
957
|
rules.push({
|
|
957
958
|
pattern: /.+/,
|
|
@@ -1047,7 +1048,7 @@
|
|
|
1047
1048
|
id: parseFloat(key),
|
|
1048
1049
|
name: value
|
|
1049
1050
|
});
|
|
1050
|
-
} else if (column.dataType == 'Boolean') {
|
|
1051
|
+
} else if (column.dataType == 'Boolean' && column.controlType != 'Select') {
|
|
1051
1052
|
column.dataSource.push({
|
|
1052
1053
|
id: key.toUpperCase() == 'TRUE',
|
|
1053
1054
|
name: value
|
|
@@ -1922,7 +1922,7 @@
|
|
|
1922
1922
|
id: parseFloat(key),
|
|
1923
1923
|
name: value
|
|
1924
1924
|
});
|
|
1925
|
-
} else if (column.dataType == 'Boolean') {
|
|
1925
|
+
} else if (column.dataType == 'Boolean' && column.controlType != 'Select') {
|
|
1926
1926
|
row._dataSource[column.code].push({
|
|
1927
1927
|
id: key.toUpperCase() == 'TRUE',
|
|
1928
1928
|
name: value
|
package/src/i18n/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { createI18n } from 'vue-i18n
|
|
2
|
-
//import store from '../store/index';
|
|
3
|
-
//import messages from './locale';
|
|
4
|
-
|
|
5
|
-
//store.dispatch('admin/i18n/getLocale');
|
|
6
|
-
|
|
7
|
-
//const locale = store.state.admin.i18n.locale;
|
|
8
|
-
|
|
9
|
-
export default createI18n({
|
|
10
|
-
allowComposition: true,
|
|
11
|
-
globalInjection: true,
|
|
12
|
-
fallbackWarn: false,
|
|
13
|
-
missingWarn: false,
|
|
14
|
-
legacy: false
|
|
15
|
-
// locale,
|
|
16
|
-
// messages
|
|
17
|
-
});
|
|
1
|
+
import { createI18n } from 'vue-i18n';
|
|
2
|
+
//import store from '../store/index';
|
|
3
|
+
//import messages from './locale';
|
|
4
|
+
|
|
5
|
+
//store.dispatch('admin/i18n/getLocale');
|
|
6
|
+
|
|
7
|
+
//const locale = store.state.admin.i18n.locale;
|
|
8
|
+
|
|
9
|
+
export default createI18n({
|
|
10
|
+
allowComposition: true,
|
|
11
|
+
globalInjection: true,
|
|
12
|
+
fallbackWarn: false,
|
|
13
|
+
missingWarn: false,
|
|
14
|
+
legacy: false
|
|
15
|
+
// locale,
|
|
16
|
+
// messages
|
|
17
|
+
});
|
package/vite.config.js
CHANGED
|
@@ -1,99 +1,125 @@
|
|
|
1
|
-
import { defineConfig } from 'vite';
|
|
2
|
-
import vue from '@vitejs/plugin-vue';
|
|
3
|
-
import { resolve } from 'path';
|
|
4
|
-
import Setting from './test/setting.env';
|
|
5
|
-
import compression from 'vite-plugin-compression';
|
|
6
|
-
|
|
7
|
-
const build = defineConfig({
|
|
8
|
-
define: {
|
|
9
|
-
__VUE_OPTIONS_API__: true,
|
|
10
|
-
__VUE_PROD_DEVTOOLS__: false,
|
|
11
|
-
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
|
12
|
-
},
|
|
13
|
-
plugins: [
|
|
14
|
-
vue(),
|
|
15
|
-
compression({
|
|
16
|
-
algorithm: 'gzip',
|
|
17
|
-
threshold: 10240,
|
|
18
|
-
deleteOriginFile: false
|
|
19
|
-
})
|
|
20
|
-
],
|
|
21
|
-
base: Setting.publicPath,
|
|
22
|
-
build: {
|
|
23
|
-
sourcemap: false, // 输出.map文件
|
|
24
|
-
outDir: Setting.outputDir,
|
|
25
|
-
assetsDir: Setting.assetsDir
|
|
26
|
-
// minify: 'terser', // 混淆器,terser构建后文件体积更小
|
|
27
|
-
},
|
|
28
|
-
resolve: {
|
|
29
|
-
alias: {
|
|
30
|
-
'@': resolve(__dirname, '.', 'src')
|
|
31
|
-
}
|
|
32
|
-
// extensions: ['.js', '.json', '.vue']
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
const lib = defineConfig({
|
|
37
|
-
plugins: [vue()],
|
|
38
|
-
publicDir: '',
|
|
39
|
-
base: Setting.publicPath,
|
|
40
|
-
build: {
|
|
41
|
-
sourcemap: false, // 输出.map文件
|
|
42
|
-
outDir: 'package',
|
|
43
|
-
assetsDir: Setting.assetsDir,
|
|
44
|
-
// minify: 'terser', // 混淆器,terser构建后文件体积更小
|
|
45
|
-
lib: {
|
|
46
|
-
entry: resolve(__dirname, './src/index.js'),
|
|
47
|
-
name: 'moohoBaseAdminPlus'
|
|
48
|
-
},
|
|
49
|
-
rollupOptions: {
|
|
50
|
-
context: 'globalThis',
|
|
51
|
-
preserveEntrySignatures: 'strict',
|
|
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
|
-
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import vue from '@vitejs/plugin-vue';
|
|
3
|
+
import { resolve } from 'path';
|
|
4
|
+
import Setting from './test/setting.env';
|
|
5
|
+
import compression from 'vite-plugin-compression';
|
|
6
|
+
|
|
7
|
+
const build = defineConfig({
|
|
8
|
+
define: {
|
|
9
|
+
__VUE_OPTIONS_API__: true,
|
|
10
|
+
__VUE_PROD_DEVTOOLS__: false,
|
|
11
|
+
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
|
12
|
+
},
|
|
13
|
+
plugins: [
|
|
14
|
+
vue(),
|
|
15
|
+
compression({
|
|
16
|
+
algorithm: 'gzip',
|
|
17
|
+
threshold: 10240,
|
|
18
|
+
deleteOriginFile: false
|
|
19
|
+
})
|
|
20
|
+
],
|
|
21
|
+
base: Setting.publicPath,
|
|
22
|
+
build: {
|
|
23
|
+
sourcemap: false, // 输出.map文件
|
|
24
|
+
outDir: Setting.outputDir,
|
|
25
|
+
assetsDir: Setting.assetsDir
|
|
26
|
+
// minify: 'terser', // 混淆器,terser构建后文件体积更小
|
|
27
|
+
},
|
|
28
|
+
resolve: {
|
|
29
|
+
alias: {
|
|
30
|
+
'@': resolve(__dirname, '.', 'src')
|
|
31
|
+
}
|
|
32
|
+
// extensions: ['.js', '.json', '.vue']
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const lib = defineConfig({
|
|
37
|
+
plugins: [vue()],
|
|
38
|
+
publicDir: '',
|
|
39
|
+
base: Setting.publicPath,
|
|
40
|
+
build: {
|
|
41
|
+
sourcemap: false, // 输出.map文件
|
|
42
|
+
outDir: 'package',
|
|
43
|
+
assetsDir: Setting.assetsDir,
|
|
44
|
+
// minify: 'terser', // 混淆器,terser构建后文件体积更小
|
|
45
|
+
lib: {
|
|
46
|
+
entry: resolve(__dirname, './src/index.js'),
|
|
47
|
+
name: 'moohoBaseAdminPlus'
|
|
48
|
+
},
|
|
49
|
+
rollupOptions: {
|
|
50
|
+
context: 'globalThis',
|
|
51
|
+
preserveEntrySignatures: 'strict',
|
|
52
|
+
/**
|
|
53
|
+
* 源码里存在 `vue-i18n/dist/vue-i18n.cjs.js` 等子路径,仅写 `vue-i18n` 无法 external。
|
|
54
|
+
* 将 vue 生态全部外置,避免 Rollup 把 vue 合成 import X, {…} from "vue"。
|
|
55
|
+
*/
|
|
56
|
+
external: (id) =>
|
|
57
|
+
id === 'vue' ||
|
|
58
|
+
id === 'vue-router' ||
|
|
59
|
+
id === 'vuex' ||
|
|
60
|
+
id === 'view-ui-plus' ||
|
|
61
|
+
id.startsWith('vue-i18n') ||
|
|
62
|
+
id === 'vuedraggable' ||
|
|
63
|
+
id === 'sortablejs',
|
|
64
|
+
output: [
|
|
65
|
+
{
|
|
66
|
+
name: 'mooho-base-admin-plus',
|
|
67
|
+
format: 'umd',
|
|
68
|
+
exports: 'named',
|
|
69
|
+
sourcemap: false,
|
|
70
|
+
entryFileNames: 'mooho-base-admin-plus.min.js',
|
|
71
|
+
chunkFileNames: '[name].js',
|
|
72
|
+
assetFileNames: '[name].[ext]',
|
|
73
|
+
inlineDynamicImports: false,
|
|
74
|
+
manualChunks: undefined,
|
|
75
|
+
globals: {
|
|
76
|
+
vue: 'Vue',
|
|
77
|
+
'view-ui-plus': 'viewUiPlus',
|
|
78
|
+
'vue-i18n': 'VueI18n',
|
|
79
|
+
'vue-router': 'VueRouter',
|
|
80
|
+
vuex: 'Vuex',
|
|
81
|
+
vuedraggable: 'vuedraggable',
|
|
82
|
+
sortablejs: 'Sortable'
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'mooho-base-admin-plus',
|
|
87
|
+
format: 'es',
|
|
88
|
+
exports: 'named',
|
|
89
|
+
interop: 'esModule',
|
|
90
|
+
sourcemap: false,
|
|
91
|
+
entryFileNames: 'mooho-base-admin-plus.min.esm.js',
|
|
92
|
+
chunkFileNames: '[name].js',
|
|
93
|
+
assetFileNames: '[name].[ext]',
|
|
94
|
+
inlineDynamicImports: false,
|
|
95
|
+
manualChunks: undefined,
|
|
96
|
+
globals: {
|
|
97
|
+
vue: 'Vue',
|
|
98
|
+
'view-ui-plus': 'viewUiPlus',
|
|
99
|
+
'vue-i18n': 'VueI18n',
|
|
100
|
+
'vue-router': 'VueRouter',
|
|
101
|
+
vuex: 'Vuex',
|
|
102
|
+
vuedraggable: 'vuedraggable',
|
|
103
|
+
sortablejs: 'Sortable'
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
resolve: {
|
|
110
|
+
alias: {
|
|
111
|
+
'@': resolve(__dirname, '.', 'src')
|
|
112
|
+
}
|
|
113
|
+
// extensions: ['.js', '.json', '.vue']
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
export default ({ mode }) => {
|
|
118
|
+
switch (mode) {
|
|
119
|
+
case 'lib': // 打包库文件
|
|
120
|
+
return lib;
|
|
121
|
+
|
|
122
|
+
default: // 开发模式、生产模式
|
|
123
|
+
return build;
|
|
124
|
+
}
|
|
125
|
+
};
|