mooho-base-admin-plus 0.1.48 → 0.1.49
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.esm.js +19363 -19302
- package/dist/mooho-base-admin-plus.min.js +18 -18
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/index.js +5 -24
- package/src/libs/request/index.js +1 -2
- package/src/mixins/page.js +1 -1
- package/src/pages/account/login.vue +1 -1
- package/src/router/dynamic.js +69 -0
- package/src/router/index.js +3 -89
- package/src/router/routerFactory.js +84 -0
- package/src/setting.js +2 -2
- package/src/store/modules/admin/modules/account.js +1 -1
- package/src/store/modules/admin/modules/db.js +5 -5
- package/src/store/modules/admin/modules/menu.js +1 -1
- package/src/store/modules/admin/modules/page.js +9 -9
- package/test/main.js +7 -1
- package/.envpr +0 -4
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
//import '@babel/polyfill';
|
|
2
2
|
|
|
3
3
|
// Vue
|
|
4
|
-
import { createApp, h, getCurrentInstance } from 'vue';
|
|
5
4
|
import App from './App.vue';
|
|
6
5
|
|
|
7
6
|
// 设置
|
|
@@ -20,14 +19,16 @@ import store from './store';
|
|
|
20
19
|
// ViewUIPlus
|
|
21
20
|
import ViewUIPlus from 'view-ui-plus';
|
|
22
21
|
|
|
23
|
-
//
|
|
24
|
-
import router from './router';
|
|
22
|
+
// 菜单
|
|
25
23
|
import menuHeader from './menu/header';
|
|
26
24
|
//import menuSider from './menu/sider';
|
|
27
25
|
|
|
28
26
|
// 多语言
|
|
29
27
|
import i18n from './i18n';
|
|
30
28
|
|
|
29
|
+
// 路由工厂
|
|
30
|
+
import createRouter from './router/routerFactory';
|
|
31
|
+
|
|
31
32
|
// 方法
|
|
32
33
|
//import { getHeaderName, getMenuSider, getSiderSubmenu } from './libs/system';
|
|
33
34
|
|
|
@@ -196,24 +197,4 @@ const routeChanged = to => {
|
|
|
196
197
|
|
|
197
198
|
export default API;
|
|
198
199
|
|
|
199
|
-
export {
|
|
200
|
-
pages,
|
|
201
|
-
createApp,
|
|
202
|
-
h,
|
|
203
|
-
getCurrentInstance,
|
|
204
|
-
App,
|
|
205
|
-
router,
|
|
206
|
-
store,
|
|
207
|
-
i18n,
|
|
208
|
-
setting,
|
|
209
|
-
basicLayout,
|
|
210
|
-
lodop,
|
|
211
|
-
request,
|
|
212
|
-
mixinPage,
|
|
213
|
-
modelApi,
|
|
214
|
-
dataSourceApi,
|
|
215
|
-
taskApi,
|
|
216
|
-
util,
|
|
217
|
-
created,
|
|
218
|
-
routeChanged
|
|
219
|
-
};
|
|
200
|
+
export { pages, App, store, i18n, setting, basicLayout, lodop, request, mixinPage, modelApi, dataSourceApi, taskApi, util, createRouter, created, routeChanged };
|
|
@@ -29,7 +29,6 @@ function errorLog(err) {
|
|
|
29
29
|
util.log.error('>>>>>> Error >>>>>>');
|
|
30
30
|
console.log(err);
|
|
31
31
|
}
|
|
32
|
-
|
|
33
32
|
swal.fire({
|
|
34
33
|
title: err.message,
|
|
35
34
|
icon: 'error',
|
|
@@ -108,7 +107,7 @@ service.interceptors.response.use(
|
|
|
108
107
|
},
|
|
109
108
|
error => {
|
|
110
109
|
if (error && error.response && error.response.status === 401) {
|
|
111
|
-
router.push('/login?redirect=' + router.history._startLocation);
|
|
110
|
+
router().push('/login?redirect=' + router().history._startLocation);
|
|
112
111
|
}
|
|
113
112
|
|
|
114
113
|
store.commit('admin/loader/end');
|
package/src/mixins/page.js
CHANGED
|
@@ -106,7 +106,7 @@ export default {
|
|
|
106
106
|
} else {
|
|
107
107
|
// 页面权限点
|
|
108
108
|
//console.log('router.currentRoute', router.currentRoute.value.fullPath);
|
|
109
|
-
let url = router.currentRoute.value.fullPath.substr(1);
|
|
109
|
+
let url = router().currentRoute.value.fullPath.substr(1);
|
|
110
110
|
|
|
111
111
|
if (this.userPermissions[url + '$' + key] == true) {
|
|
112
112
|
return true;
|
package/src/router/dynamic.js
CHANGED
|
@@ -1,8 +1,77 @@
|
|
|
1
|
+
import ViewUIPlus from 'view-ui-plus';
|
|
2
|
+
import util from '../libs/util';
|
|
3
|
+
import Setting from '../setting';
|
|
4
|
+
import store from '../store/index';
|
|
5
|
+
import dynamic from './dynamic';
|
|
1
6
|
import permissionApi from '../api/permission';
|
|
2
7
|
|
|
8
|
+
// 是否初始化
|
|
9
|
+
let inited = false;
|
|
10
|
+
|
|
3
11
|
// 动态路由
|
|
4
12
|
export default {
|
|
5
13
|
async init(router) {
|
|
14
|
+
/**
|
|
15
|
+
* 路由拦截
|
|
16
|
+
* 权限验证
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
router.beforeEach(async (to, from, next) => {
|
|
20
|
+
if (Setting.showProgressBar) {
|
|
21
|
+
ViewUIPlus.LoadingBar.start();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (!inited) {
|
|
25
|
+
// 初始化动态路由
|
|
26
|
+
let dynamicRoutes = await dynamic.init(router);
|
|
27
|
+
let frameInRoutes = router.getRoutes();
|
|
28
|
+
|
|
29
|
+
// 处理路由 得到每一级的路由设置
|
|
30
|
+
store.commit('admin/page/init', [...frameInRoutes, ...dynamicRoutes]);
|
|
31
|
+
inited = true;
|
|
32
|
+
next({
|
|
33
|
+
...to,
|
|
34
|
+
replace: true
|
|
35
|
+
});
|
|
36
|
+
} else {
|
|
37
|
+
// 判断是否需要登录才可以进入
|
|
38
|
+
if (to.matched.some(_ => _.meta.auth)) {
|
|
39
|
+
// 这里依据 token 判断是否登录,可视情况修改
|
|
40
|
+
const token = util.cookies.get('token');
|
|
41
|
+
|
|
42
|
+
if (token && token !== 'undefined') {
|
|
43
|
+
next();
|
|
44
|
+
} else {
|
|
45
|
+
// 没有登录的时候跳转到登录界面
|
|
46
|
+
// 携带上登陆成功之后需要跳转的页面完整路径
|
|
47
|
+
next({
|
|
48
|
+
name: 'login',
|
|
49
|
+
query: {
|
|
50
|
+
redirect: to.fullPath
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
// 不需要身份校验 直接通过
|
|
56
|
+
next();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
router.afterEach(to => {
|
|
62
|
+
if (Setting.showProgressBar) ViewUIPlus.LoadingBar.finish();
|
|
63
|
+
// 多页控制 打开新的页面
|
|
64
|
+
if (!('meta' in to) || (to.meta && !('tabs' in to.meta)) || (to.meta && to.meta.tabs)) {
|
|
65
|
+
store.dispatch('admin/page/open', to);
|
|
66
|
+
}
|
|
67
|
+
// 更改标题
|
|
68
|
+
util.title({
|
|
69
|
+
title: to.meta.title
|
|
70
|
+
});
|
|
71
|
+
// 返回页面顶端
|
|
72
|
+
window.scrollTo(0, 0);
|
|
73
|
+
});
|
|
74
|
+
|
|
6
75
|
let pages = router.pages;
|
|
7
76
|
let layout = router.layout;
|
|
8
77
|
|
package/src/router/index.js
CHANGED
|
@@ -1,89 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import Setting from '../setting';
|
|
5
|
-
import store from '../store/index';
|
|
6
|
-
import dynamic from './dynamic';
|
|
7
|
-
|
|
8
|
-
console.log('import.meta.env', import.meta.env, import.meta.env.BASE_URL);
|
|
9
|
-
console.log('window.$env', window.$env);
|
|
10
|
-
|
|
11
|
-
// 根目录
|
|
12
|
-
let base = import.meta.env.VITE_APP_BASE_PATH;
|
|
13
|
-
if (!base) {
|
|
14
|
-
base = '';
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
console.log('base', base);
|
|
18
|
-
|
|
19
|
-
// 导出路由 在 main.js 里使用
|
|
20
|
-
const router = createRouter({
|
|
21
|
-
history: Setting.routerMode === 'history' ? createWebHistory(base) : Setting.routerMode === 'hash' ? createWebHashHistory(base) : createMemoryHistory(base),
|
|
22
|
-
routes: []
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// 是否初始化
|
|
26
|
-
let inited = false;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* 路由拦截
|
|
30
|
-
* 权限验证
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
router.beforeEach(async (to, from, next) => {
|
|
34
|
-
if (Setting.showProgressBar) {
|
|
35
|
-
ViewUIPlus.LoadingBar.start();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (!inited) {
|
|
39
|
-
// 初始化动态路由
|
|
40
|
-
let dynamicRoutes = await dynamic.init(router);
|
|
41
|
-
let frameInRoutes = router.getRoutes();
|
|
42
|
-
|
|
43
|
-
// 处理路由 得到每一级的路由设置
|
|
44
|
-
store.commit('admin/page/init', [...frameInRoutes, ...dynamicRoutes]);
|
|
45
|
-
inited = true;
|
|
46
|
-
next({
|
|
47
|
-
...to,
|
|
48
|
-
replace: true
|
|
49
|
-
});
|
|
50
|
-
} else {
|
|
51
|
-
// 判断是否需要登录才可以进入
|
|
52
|
-
if (to.matched.some(_ => _.meta.auth)) {
|
|
53
|
-
// 这里依据 token 判断是否登录,可视情况修改
|
|
54
|
-
const token = util.cookies.get('token');
|
|
55
|
-
|
|
56
|
-
if (token && token !== 'undefined') {
|
|
57
|
-
next();
|
|
58
|
-
} else {
|
|
59
|
-
// 没有登录的时候跳转到登录界面
|
|
60
|
-
// 携带上登陆成功之后需要跳转的页面完整路径
|
|
61
|
-
next({
|
|
62
|
-
name: 'login',
|
|
63
|
-
query: {
|
|
64
|
-
redirect: to.fullPath
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
} else {
|
|
69
|
-
// 不需要身份校验 直接通过
|
|
70
|
-
next();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
router.afterEach(to => {
|
|
76
|
-
if (Setting.showProgressBar) ViewUIPlus.LoadingBar.finish();
|
|
77
|
-
// 多页控制 打开新的页面
|
|
78
|
-
if (!('meta' in to) || (to.meta && !('tabs' in to.meta)) || (to.meta && to.meta.tabs)) {
|
|
79
|
-
store.dispatch('admin/page/open', to);
|
|
80
|
-
}
|
|
81
|
-
// 更改标题
|
|
82
|
-
util.title({
|
|
83
|
-
title: to.meta.title
|
|
84
|
-
});
|
|
85
|
-
// 返回页面顶端
|
|
86
|
-
window.scrollTo(0, 0);
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
export default router;
|
|
1
|
+
export default () => {
|
|
2
|
+
return window.$router;
|
|
3
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { createRouter, createWebHistory, createWebHashHistory, createMemoryHistory } from 'vue-router';
|
|
2
|
+
import ViewUIPlus from 'view-ui-plus';
|
|
3
|
+
import util from '../libs/util';
|
|
4
|
+
import Setting from '../setting';
|
|
5
|
+
import store from '../store/index';
|
|
6
|
+
import dynamic from './dynamic';
|
|
7
|
+
|
|
8
|
+
const createMyRouter = base => {
|
|
9
|
+
const router = createRouter({
|
|
10
|
+
history: Setting.routerMode === 'history' ? createWebHistory(base) : setting.routerMode === 'hash' ? createWebHashHistory(base) : createMemoryHistory(base),
|
|
11
|
+
routes: []
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// 设置资源根目录
|
|
15
|
+
Setting.rootPath = base == '' || base == null ? '/static/' : '/' + base + '/static/';
|
|
16
|
+
|
|
17
|
+
// 是否初始化
|
|
18
|
+
let inited = false;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 路由拦截
|
|
22
|
+
* 权限验证
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
router.beforeEach(async (to, from, next) => {
|
|
26
|
+
if (Setting.showProgressBar) {
|
|
27
|
+
ViewUIPlus.LoadingBar.start();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (!inited) {
|
|
31
|
+
// 初始化动态路由
|
|
32
|
+
let dynamicRoutes = await dynamic.init(router);
|
|
33
|
+
let frameInRoutes = router.getRoutes();
|
|
34
|
+
|
|
35
|
+
// 处理路由 得到每一级的路由设置
|
|
36
|
+
store.commit('admin/page/init', [...frameInRoutes, ...dynamicRoutes]);
|
|
37
|
+
inited = true;
|
|
38
|
+
next({
|
|
39
|
+
...to,
|
|
40
|
+
replace: true
|
|
41
|
+
});
|
|
42
|
+
} else {
|
|
43
|
+
// 判断是否需要登录才可以进入
|
|
44
|
+
if (to.matched.some(_ => _.meta.auth)) {
|
|
45
|
+
// 这里依据 token 判断是否登录,可视情况修改
|
|
46
|
+
const token = util.cookies.get('token');
|
|
47
|
+
|
|
48
|
+
if (token && token !== 'undefined') {
|
|
49
|
+
next();
|
|
50
|
+
} else {
|
|
51
|
+
// 没有登录的时候跳转到登录界面
|
|
52
|
+
// 携带上登陆成功之后需要跳转的页面完整路径
|
|
53
|
+
next({
|
|
54
|
+
name: 'login',
|
|
55
|
+
query: {
|
|
56
|
+
redirect: to.fullPath
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
// 不需要身份校验 直接通过
|
|
62
|
+
next();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
router.afterEach(to => {
|
|
68
|
+
if (Setting.showProgressBar) ViewUIPlus.LoadingBar.finish();
|
|
69
|
+
// 多页控制 打开新的页面
|
|
70
|
+
if (!('meta' in to) || (to.meta && !('tabs' in to.meta)) || (to.meta && to.meta.tabs)) {
|
|
71
|
+
store.dispatch('admin/page/open', to);
|
|
72
|
+
}
|
|
73
|
+
// 更改标题
|
|
74
|
+
util.title({
|
|
75
|
+
title: to.meta.title
|
|
76
|
+
});
|
|
77
|
+
// 返回页面顶端
|
|
78
|
+
window.scrollTo(0, 0);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
return router;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export default createMyRouter;
|
package/src/setting.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Admin Plus 业务配置
|
|
3
3
|
* */
|
|
4
4
|
|
|
5
|
-
const basePath = import.meta.env.VITE_APP_BASE_PATH;
|
|
5
|
+
//const basePath = import.meta.env.VITE_APP_BASE_PATH;
|
|
6
6
|
|
|
7
7
|
const Setting = {
|
|
8
8
|
/**
|
|
@@ -13,7 +13,7 @@ const Setting = {
|
|
|
13
13
|
// 项目的 ID
|
|
14
14
|
appID: 'app',
|
|
15
15
|
// 根目录
|
|
16
|
-
rootPath: basePath == '' || basePath == null ? '/static/' : '/' + basePath + '/static/',
|
|
16
|
+
//rootPath: basePath == '' || basePath == null ? '/static/' : '/' + basePath + '/static/',
|
|
17
17
|
// 网页标题的后缀,不需要设置为 false 或空
|
|
18
18
|
titleSuffix: 'Admin Plus',
|
|
19
19
|
// 路由模式,可选值为 history 或 hash
|
|
@@ -130,7 +130,7 @@ export default {
|
|
|
130
130
|
util.db.get(
|
|
131
131
|
pathInit({
|
|
132
132
|
dbName: 'database',
|
|
133
|
-
path: `$page.${router.app.$route[basis]}`,
|
|
133
|
+
path: `$page.${router().app.$route[basis]}`,
|
|
134
134
|
user,
|
|
135
135
|
defaultValue: {}
|
|
136
136
|
})
|
|
@@ -150,7 +150,7 @@ export default {
|
|
|
150
150
|
util.db.get(
|
|
151
151
|
pathInit({
|
|
152
152
|
dbName: 'database',
|
|
153
|
-
path: `$page.${router.app.$route[basis]}`,
|
|
153
|
+
path: `$page.${router().app.$route[basis]}`,
|
|
154
154
|
user,
|
|
155
155
|
validator: () => false,
|
|
156
156
|
defaultValue: {}
|
|
@@ -172,7 +172,7 @@ export default {
|
|
|
172
172
|
util.db.get(
|
|
173
173
|
pathInit({
|
|
174
174
|
dbName: 'database',
|
|
175
|
-
path: `$page.${router.app.$route[basis]}.$data`,
|
|
175
|
+
path: `$page.${router().app.$route[basis]}.$data`,
|
|
176
176
|
user,
|
|
177
177
|
validator: () => false,
|
|
178
178
|
defaultValue: cloneDeep(instance.$data)
|
|
@@ -196,7 +196,7 @@ export default {
|
|
|
196
196
|
.get(
|
|
197
197
|
pathInit({
|
|
198
198
|
dbName: 'database',
|
|
199
|
-
path: `$page.${router.app.$route[basis]}.$data`,
|
|
199
|
+
path: `$page.${router().app.$route[basis]}.$data`,
|
|
200
200
|
user,
|
|
201
201
|
defaultValue: cloneDeep(instance.$data)
|
|
202
202
|
})
|
|
@@ -218,7 +218,7 @@ export default {
|
|
|
218
218
|
util.db.get(
|
|
219
219
|
pathInit({
|
|
220
220
|
dbName: 'database',
|
|
221
|
-
path: `$page.${router.app.$route[basis]}.$data`,
|
|
221
|
+
path: `$page.${router().app.$route[basis]}.$data`,
|
|
222
222
|
user,
|
|
223
223
|
validator: () => false,
|
|
224
224
|
defaultValue: {}
|
|
@@ -317,7 +317,7 @@ export default {
|
|
|
317
317
|
//setNativeMenuHeader(res.header);
|
|
318
318
|
setNativeMenuSider(menu);
|
|
319
319
|
if (loadMenu) {
|
|
320
|
-
const to = loadMenu === true ? router.currentRoute.value : loadMenu;
|
|
320
|
+
const to = loadMenu === true ? router().currentRoute.value : loadMenu;
|
|
321
321
|
dispatch('setMenuList', to);
|
|
322
322
|
}
|
|
323
323
|
|
|
@@ -264,7 +264,7 @@ export default {
|
|
|
264
264
|
params,
|
|
265
265
|
query
|
|
266
266
|
};
|
|
267
|
-
router.push(routerObj, () => {});
|
|
267
|
+
router().push(routerObj, () => {});
|
|
268
268
|
}
|
|
269
269
|
// end
|
|
270
270
|
resolve();
|
|
@@ -288,8 +288,8 @@ export default {
|
|
|
288
288
|
state.opened.splice(1, currentIndex - 1).forEach(({ name }) => commit('keepAliveRemove', name));
|
|
289
289
|
}
|
|
290
290
|
state.current = pageAim;
|
|
291
|
-
if (router.currentRoute.value.fullPath !== pageAim) {
|
|
292
|
-
router.push(pageAim);
|
|
291
|
+
if (router().currentRoute.value.fullPath !== pageAim) {
|
|
292
|
+
router().push(pageAim);
|
|
293
293
|
}
|
|
294
294
|
// 持久化
|
|
295
295
|
await dispatch('opened2db');
|
|
@@ -314,8 +314,8 @@ export default {
|
|
|
314
314
|
state.opened.splice(currentIndex + 1).forEach(({ name }) => commit('keepAliveRemove', name));
|
|
315
315
|
// 设置当前的页面
|
|
316
316
|
state.current = pageAim;
|
|
317
|
-
if (router.currentRoute.value.fullPath !== pageAim) {
|
|
318
|
-
router.push(pageAim);
|
|
317
|
+
if (router().currentRoute.value.fullPath !== pageAim) {
|
|
318
|
+
router().push(pageAim);
|
|
319
319
|
}
|
|
320
320
|
// 持久化
|
|
321
321
|
await dispatch('opened2db');
|
|
@@ -345,8 +345,8 @@ export default {
|
|
|
345
345
|
}
|
|
346
346
|
// 设置新的页面
|
|
347
347
|
state.current = pageAim;
|
|
348
|
-
if (router.currentRoute.value.fullPath !== pageAim) {
|
|
349
|
-
router.push(pageAim);
|
|
348
|
+
if (router().currentRoute.value.fullPath !== pageAim) {
|
|
349
|
+
router().push(pageAim);
|
|
350
350
|
}
|
|
351
351
|
// 持久化
|
|
352
352
|
await dispatch('opened2db');
|
|
@@ -365,8 +365,8 @@ export default {
|
|
|
365
365
|
// 持久化
|
|
366
366
|
await dispatch('opened2db');
|
|
367
367
|
// 关闭所有的标签页后需要判断一次现在是不是在首页
|
|
368
|
-
if (router.currentRoute.value.name !== 'index') {
|
|
369
|
-
router.push(
|
|
368
|
+
if (router().currentRoute.value.name !== 'index') {
|
|
369
|
+
router().push(
|
|
370
370
|
{
|
|
371
371
|
name: 'index'
|
|
372
372
|
},
|
package/test/main.js
CHANGED
|
@@ -2,8 +2,14 @@ if (!!window.ActiveXObject || 'ActiveXObject' in window) {
|
|
|
2
2
|
alert('本系统不支持ie,请使用Chrome、Firefox、Edge等现代浏览器访问!');
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
import { createApp, h, getCurrentInstance } from 'vue';
|
|
6
|
+
|
|
5
7
|
// 基础框架
|
|
6
|
-
import moohoBaseAdminPlus, { pages,
|
|
8
|
+
import moohoBaseAdminPlus, { pages, App, store, i18n, basicLayout, createRouter, created, routeChanged } from '../src';
|
|
9
|
+
|
|
10
|
+
// 创建路由
|
|
11
|
+
const router = createRouter(import.meta.env.VITE_APP_BASE_PATH);
|
|
12
|
+
window.$router = router;
|
|
7
13
|
|
|
8
14
|
// 固定路由
|
|
9
15
|
import routes from './router/routes';
|
package/.envpr
DELETED