From 412221abf74f12702e55388d209c8a51728ec822 Mon Sep 17 00:00:00 2001 From: "X.Mo" Date: Tue, 9 Jul 2024 09:50:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20redirect=20=E5=B1=9E=E6=80=A7=E4=B8=8D?= =?UTF-8?q?=E8=B5=B7=E4=BD=9C=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/columns/ma-columns-menu.vue | 4 ++++ src/layout/components/components/children-menu.vue | 2 ++ src/layout/components/components/sub-menu.vue | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/layout/components/columns/ma-columns-menu.vue b/src/layout/components/columns/ma-columns-menu.vue index 2f1bc6f3..c1321681 100644 --- a/src/layout/components/columns/ma-columns-menu.vue +++ b/src/layout/components/columns/ma-columns-menu.vue @@ -86,6 +86,10 @@ window.open(bigMenu.path) return } + if (bigMenu.redirect) { + router.push(bigMenu.redirect) + return + } if (bigMenu.children.length > 0) { MaMenuRef.value.loadChildMenu(bigMenu) showMenu.value = true diff --git a/src/layout/components/components/children-menu.vue b/src/layout/components/components/children-menu.vue index 51bd9438..f36519e5 100644 --- a/src/layout/components/components/children-menu.vue +++ b/src/layout/components/components/children-menu.vue @@ -51,6 +51,8 @@ const routerPush = (menu) => { if (menu.meta && menu.meta.type === 'L') { window.open(menu.path) + } else if (menu.redirect) { + router.push(menu.redirect) } else { router.push(menu.path) tagStore.addTag({ name: menu.name, title: menu.meta.title, path: menu.path }) diff --git a/src/layout/components/components/sub-menu.vue b/src/layout/components/components/sub-menu.vue index eb9bba35..72c9aa79 100644 --- a/src/layout/components/components/sub-menu.vue +++ b/src/layout/components/components/sub-menu.vue @@ -42,6 +42,8 @@ const routerPush = (menu) => { if (menu.meta && menu.meta.type === 'L') { window.open(menu.path) + } else if (menu.redirect) { + router.push(menu.redirect) } else { router.push(menu.path) tagStore.addTag({ name: menu.name, title: menu.meta.title, path: menu.path })