From 6ad345331d1bced7b402d686867c02cad1747d00 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 11 Apr 2023 16:51:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=80=E5=90=AFTopNav?= =?UTF-8?q?=E5=90=8E=E4=B8=80=E7=BA=A7=E8=8F=9C=E5=8D=95=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=AE=BE=E7=BD=AE=E6=97=A0=E6=95=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98(I6T1DK)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/TopNav/index.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/components/TopNav/index.vue b/ruoyi-ui/src/components/TopNav/index.vue index 5f0edbef..9fb8dd81 100644 --- a/ruoyi-ui/src/components/TopNav/index.vue +++ b/ruoyi-ui/src/components/TopNav/index.vue @@ -127,7 +127,13 @@ export default { window.open(key, "_blank"); } else if (!route || !route.children) { // 没有子路由路径内部打开 - this.$router.push({ path: key }); + const routeMenu = this.childrenMenus.find(item => item.path === key); + if (routeMenu && routeMenu.query) { + let query = JSON.parse(routeMenu.query); + this.$router.push({ path: key, query: query }); + } else { + this.$router.push({ path: key }); + } this.$store.dispatch('app/toggleSideBarHide', true); } else { // 显示左侧联动菜单