From 423f7985b0d21b7f4006048eb19745fbe228951a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=AF=BA?= <1253070437@qq.com> Date: Thu, 28 Sep 2023 01:02:49 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=9B=B4=E6=96=B0=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=88=87=E6=8D=A2=E5=BA=94=E7=94=A8=E6=97=B6=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E8=8F=9C=E5=8D=95=E4=B8=BA=E5=A4=96=E9=93=BE?= =?UTF-8?q?=E6=97=B6404=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snowy-admin-web/src/layout/index.vue | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/snowy-admin-web/src/layout/index.vue b/snowy-admin-web/src/layout/index.vue index fe44c5a2..5364f99d 100644 --- a/snowy-admin-web/src/layout/index.vue +++ b/snowy-admin-web/src/layout/index.vue @@ -224,7 +224,6 @@ }) }) watch(topHeaderThemeColorOpen, (newValue) => { - console.log(topHeaderThemeColorOpen) switchoverTopHeaderThemeColor() }) watch(topHeaderThemeColorSpread, (newValue) => { @@ -236,7 +235,6 @@ } // 切换顶栏颜色 const switchoverTopHeaderThemeColor = () => { - console.log('刷新完之后' + topHeaderThemeColorOpen.value) // 界面顶栏设置颜色 const header = document.getElementById('snowyHeader') topHeaderThemeColorOpen.value @@ -347,13 +345,19 @@ showThis() const menus = moduleMenu.value.filter((item) => item.id === id)[0].children if (menus.length > 0) { - // 将此模块的唯一值加入缓存 - tool.data.set('SNOWY_MENU_MODULE_ID', id) // 正儿八百的菜单 menu.value = filterUrl(menus) - // 然后将其跳转至指定界面,默认始终取排序第一的 - const path = traverseChild(menu.value) - router.push({ path }) + 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) + // 然后将其跳转至指定界面,默认始终取排序第一的 + router.push({ path }) + } } else { message.warning('该模块下无任何菜单') } @@ -375,10 +379,10 @@ if (menu[0].children.length > 0) { return traverseChild(menu[0].children) } else { - return menu[0].path + return menu[0] } } else { - return menu[0].path + return menu[0] } } // 退出最大化