Unsubscribe
This commit is contained in:
@@ -503,7 +503,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
static_data.routes = [...baseroutes, ...adminRoutes, ...arrpagesroute, last]
|
||||
}
|
||||
|
||||
for (const menu of static_data.routes) {
|
||||
/*for (const menu of static_data.routes) {
|
||||
if (menu.active && menu.routes2) {
|
||||
for (const menu2 of menu.routes2) {
|
||||
if (menu2.active && !menu2.noroute) {
|
||||
@@ -511,7 +511,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// Sort array
|
||||
static_data.routes = static_data.routes.sort((a, myb) => a.order - myb.order)
|
||||
@@ -522,19 +522,19 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
|
||||
if ($router) {
|
||||
static_data.routes.forEach((route: any) => {
|
||||
if (!$router.hasRoute(route.name)) {
|
||||
if (!$router.hasRoute(route.name) && !route.noroute) {
|
||||
$router.addRoute(route)
|
||||
}
|
||||
|
||||
if (route.routes2) {
|
||||
for (const route2 of route.routes2) {
|
||||
if (!$router.hasRoute(route2.name)) {
|
||||
if (!$router.hasRoute(route2.name) && !route2.noroute) {
|
||||
$router.addRoute(route2)
|
||||
}
|
||||
|
||||
if (route2.routes2) {
|
||||
for (const route3 of route2.routes2) {
|
||||
if (!$router.hasRoute(route3.name)) {
|
||||
if (!$router.hasRoute(route3.name) && !route3.noroute) {
|
||||
$router.addRoute(route3)
|
||||
}
|
||||
}
|
||||
@@ -1040,7 +1040,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
if (res) {
|
||||
const index = this.mypage.findIndex((rec) => rec.path === path)
|
||||
if (index >= 0) {
|
||||
console.log('load page', path, '...')
|
||||
// console.log('load page', path, '...')
|
||||
this.mypage[index] = res.data.mypage
|
||||
this.mypage[index].loaded = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user