mooho-base-admin-plus 0.1.18 → 0.1.21

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "0.1.18",
4
+ "version": "0.1.21",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "dotnetVersion": "1.3.97",
7
7
  "license": "MIT",
package/src/index.js CHANGED
@@ -18,7 +18,7 @@ import plugins from './plugins';
18
18
  import store from './store';
19
19
 
20
20
  // ViewUIPlus
21
- import { default as ViewUIPlus } from 'view-ui-plus';
21
+ import * as ViewUIPlus from 'view-ui-plus';
22
22
 
23
23
  // 菜单和路由
24
24
  import router from './router';
@@ -119,7 +119,7 @@ const install = function (app) {
119
119
  //if (window) window.$t = (key, value) => i18n.t(key, value);
120
120
 
121
121
  app.use(plugins);
122
- app.use(ViewUIPlus, {
122
+ app.use(ViewUIPlus.default, {
123
123
  i18n
124
124
  });
125
125
 
@@ -1,5 +1,5 @@
1
1
  import { createRouter, createWebHistory, createWebHashHistory, createMemoryHistory } from 'vue-router';
2
- import { default as ViewUIPlus } from 'view-ui-plus';
2
+ import * as ViewUIPlus from 'view-ui-plus';
3
3
  import util from '../libs/util';
4
4
  import Setting from '../setting';
5
5
  import store from '../store/index';
@@ -27,7 +27,7 @@ let inited = false;
27
27
 
28
28
  router.beforeEach(async (to, from, next) => {
29
29
  if (Setting.showProgressBar) {
30
- ViewUIPlus.LoadingBar.start();
30
+ ViewUIPlus.default.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.LoadingBar.finish();
71
+ if (Setting.showProgressBar) ViewUIPlus.default.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
@@ -8,9 +8,9 @@ export default defineConfig({
8
8
  plugins: [vue()],
9
9
  base: Setting.publicPath,
10
10
  build: {
11
+ sourcemap: false, // 输出.map文件
11
12
  outDir: Setting.outputDir,
12
13
  assetsDir: Setting.assetsDir,
13
- minify: 'esbuild',
14
14
  lib: {
15
15
  entry: resolve(__dirname, './src/index.js'),
16
16
  name: 'moohoBaseAdminPlus'
@@ -18,7 +18,9 @@ export default defineConfig({
18
18
  rollupOptions: {
19
19
  context: 'globalThis',
20
20
  //preserveEntrySignatures: 'strict',
21
- external: ['vue', 'view-ui-plus'],
21
+ external: ['vue', 'view-ui-plus', 'lowdb', 'lodash'],
22
+ target: 'esnext',
23
+ minify: 'esbuild',
22
24
  output: [
23
25
  {
24
26
  format: 'umd',
@@ -27,10 +29,10 @@ export default defineConfig({
27
29
  entryFileNames: 'mooho-base-admin-plus.min.js',
28
30
  chunkFileNames: '[name].js',
29
31
  assetFileNames: '[name].[ext]',
30
- namespaceToStringTag: true,
31
- inlineDynamicImports: false,
32
- manualChunks: undefined,
33
- globals: { vue: 'Vue', 'view-ui-plus': 'viewUiPlus' }
32
+ // namespaceToStringTag: true,
33
+ // inlineDynamicImports: false,
34
+ // manualChunks: undefined,
35
+ globals: { vue: 'Vue', 'view-ui-plus': 'viewUiPlus', lowdb: 'lowdb', lodash: 'lodash' }
34
36
  }
35
37
  ]
36
38
  }