mooho-base-admin-plus 0.1.21 → 0.1.24
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/dist/mooho-base-admin-plus.min.js +94 -185
- package/package.json +1 -1
- package/src/libs/util.db.js +11 -9
- package/src/router/index.js +2 -2
- package/vite.config.js +5 -6
package/package.json
CHANGED
package/src/libs/util.db.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import * as low from 'lowdb';
|
|
2
|
-
import * as LocalStorage from 'lowdb/adapters/LocalStorage';
|
|
3
|
-
import Setting from '../setting';
|
|
1
|
+
// import * as low from 'lowdb';
|
|
2
|
+
// import * as LocalStorage from 'lowdb/adapters/LocalStorage';
|
|
3
|
+
// import Setting from '../setting';
|
|
4
4
|
|
|
5
|
-
const adapter = new LocalStorage(`admin-plus-${Setting.appID}`);
|
|
6
|
-
const db = low(adapter);
|
|
5
|
+
// const adapter = new LocalStorage(`admin-plus-${Setting.appID}`);
|
|
6
|
+
// const db = low(adapter);
|
|
7
7
|
|
|
8
|
-
db.defaults({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}).write();
|
|
8
|
+
// db.defaults({
|
|
9
|
+
// sys: {},
|
|
10
|
+
// database: {}
|
|
11
|
+
// }).write();
|
|
12
|
+
|
|
13
|
+
const db = {};
|
|
12
14
|
|
|
13
15
|
export default db;
|
package/src/router/index.js
CHANGED
|
@@ -27,7 +27,7 @@ let inited = false;
|
|
|
27
27
|
|
|
28
28
|
router.beforeEach(async (to, from, next) => {
|
|
29
29
|
if (Setting.showProgressBar) {
|
|
30
|
-
ViewUIPlus.
|
|
30
|
+
ViewUIPlus.LoadingBar.start();
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
if (!inited) {
|
|
@@ -68,7 +68,7 @@ router.beforeEach(async (to, from, next) => {
|
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
router.afterEach(to => {
|
|
71
|
-
if (Setting.showProgressBar) ViewUIPlus.
|
|
71
|
+
if (Setting.showProgressBar) ViewUIPlus.LoadingBar.finish();
|
|
72
72
|
// 多页控制 打开新的页面
|
|
73
73
|
if (!('meta' in to) || (to.meta && !('tabs' in to.meta)) || (to.meta && to.meta.tabs)) {
|
|
74
74
|
store.dispatch('admin/page/open', to);
|
package/vite.config.js
CHANGED
|
@@ -6,21 +6,20 @@ import Setting from './test/setting.env';
|
|
|
6
6
|
// https://vitejs.dev/config/
|
|
7
7
|
export default defineConfig({
|
|
8
8
|
plugins: [vue()],
|
|
9
|
-
|
|
9
|
+
target: 'es2015',
|
|
10
10
|
build: {
|
|
11
11
|
sourcemap: false, // 输出.map文件
|
|
12
12
|
outDir: Setting.outputDir,
|
|
13
13
|
assetsDir: Setting.assetsDir,
|
|
14
|
+
minify: 'terser', // 混淆器,terser构建后文件体积更小
|
|
14
15
|
lib: {
|
|
15
16
|
entry: resolve(__dirname, './src/index.js'),
|
|
16
17
|
name: 'moohoBaseAdminPlus'
|
|
17
18
|
},
|
|
18
19
|
rollupOptions: {
|
|
19
20
|
context: 'globalThis',
|
|
20
|
-
|
|
21
|
-
external: ['vue', 'view-ui-plus'
|
|
22
|
-
target: 'esnext',
|
|
23
|
-
minify: 'esbuild',
|
|
21
|
+
preserveEntrySignatures: 'strict',
|
|
22
|
+
external: ['vue', 'view-ui-plus'],
|
|
24
23
|
output: [
|
|
25
24
|
{
|
|
26
25
|
format: 'umd',
|
|
@@ -32,7 +31,7 @@ export default defineConfig({
|
|
|
32
31
|
// namespaceToStringTag: true,
|
|
33
32
|
// inlineDynamicImports: false,
|
|
34
33
|
// manualChunks: undefined,
|
|
35
|
-
globals: { vue: 'Vue', 'view-ui-plus': 'viewUiPlus'
|
|
34
|
+
globals: { vue: 'Vue', 'view-ui-plus': 'viewUiPlus' }
|
|
36
35
|
}
|
|
37
36
|
]
|
|
38
37
|
}
|