mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update app.js
This commit is contained in:
parent
26a8ba01ef
commit
457de6c57b
@ -42,7 +42,7 @@ window.appRoot = (function (script) {
|
|||||||
router.beforeEach(function (to, fr, next) {
|
router.beforeEach(function (to, fr, next) {
|
||||||
let name = to.fullPath.replace(/[.\/]+/g, '_');
|
let name = to.fullPath.replace(/[.\/]+/g, '_');
|
||||||
if (router.hasRoute(name)) {
|
if (router.hasRoute(name)) {
|
||||||
console.log('open.load', to.fullPath)
|
console.log('loadPage', to.fullPath)
|
||||||
loading = ElementPlus.ElLoading.service({
|
loading = ElementPlus.ElLoading.service({
|
||||||
lock: true, text: 'Loading', background: 'rgba(0, 0, 0, 0.3)',
|
lock: true, text: 'Loading', background: 'rgba(0, 0, 0, 0.3)',
|
||||||
});
|
});
|
||||||
@ -59,12 +59,8 @@ window.appRoot = (function (script) {
|
|||||||
// 动态注销路由
|
// 动态注销路由
|
||||||
router.afterEach(function (to) {
|
router.afterEach(function (to) {
|
||||||
let name = to.fullPath.replace(/[.\/]+/g, '_');
|
let name = to.fullPath.replace(/[.\/]+/g, '_');
|
||||||
if (router.hasRoute(name)) {
|
if (router.hasRoute(name)) router.removeRoute(name)
|
||||||
router.removeRoute(name)
|
if (loading) loading = loading.close(), null;
|
||||||
}
|
|
||||||
if (loading) {
|
|
||||||
loading = loading.close(), null;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 创建 Vue 应用
|
// 创建 Vue 应用
|
||||||
|
Loading…
x
Reference in New Issue
Block a user