修复开启TopNav后一级菜单路由参数设置无效问题(I6T1DK)

This commit is contained in:
RuoYi 2023-04-11 16:51:55 +08:00
parent 5a634a4ecd
commit 6ad345331d
1 changed files with 7 additions and 1 deletions

View File

@ -127,7 +127,13 @@ export default {
window.open(key, "_blank"); window.open(key, "_blank");
} else if (!route || !route.children) { } 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); this.$store.dispatch('app/toggleSideBarHide', true);
} else { } else {
// //