【更新】修复切换应用时第一个菜单为外链时404问题

pull/141/MERGE
小诺 2023-09-28 01:02:49 +08:00 committed by 俞宝山
parent d00dd22a29
commit 423f7985b0
1 changed files with 13 additions and 9 deletions

View File

@ -224,7 +224,6 @@
}) })
}) })
watch(topHeaderThemeColorOpen, (newValue) => { watch(topHeaderThemeColorOpen, (newValue) => {
console.log(topHeaderThemeColorOpen)
switchoverTopHeaderThemeColor() switchoverTopHeaderThemeColor()
}) })
watch(topHeaderThemeColorSpread, (newValue) => { watch(topHeaderThemeColorSpread, (newValue) => {
@ -236,7 +235,6 @@
} }
// //
const switchoverTopHeaderThemeColor = () => { const switchoverTopHeaderThemeColor = () => {
console.log('刷新完之后' + topHeaderThemeColorOpen.value)
// //
const header = document.getElementById('snowyHeader') const header = document.getElementById('snowyHeader')
topHeaderThemeColorOpen.value topHeaderThemeColorOpen.value
@ -347,13 +345,19 @@
showThis() showThis()
const menus = moduleMenu.value.filter((item) => item.id === id)[0].children const menus = moduleMenu.value.filter((item) => item.id === id)[0].children
if (menus.length > 0) { if (menus.length > 0) {
//
tool.data.set('SNOWY_MENU_MODULE_ID', id)
// //
menu.value = filterUrl(menus) menu.value = filterUrl(menus)
const firstMenu = traverseChild(menu.value)
const path = firstMenu.path
//
if (firstMenu.menuType === 'LINK') {
window.open(path)
} else {
//
tool.data.set('SNOWY_MENU_MODULE_ID', id)
// //
const path = traverseChild(menu.value)
router.push({ path }) router.push({ path })
}
} else { } else {
message.warning('该模块下无任何菜单') message.warning('该模块下无任何菜单')
} }
@ -375,10 +379,10 @@
if (menu[0].children.length > 0) { if (menu[0].children.length > 0) {
return traverseChild(menu[0].children) return traverseChild(menu[0].children)
} else { } else {
return menu[0].path return menu[0]
} }
} else { } else {
return menu[0].path return menu[0]
} }
} }
// 退 // 退