Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions jeecgboot-vue3/src/layouts/default/sider/MixSider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,13 @@
}
}

function handleMenuClick(path: string) {
go(path);
function handleMenuClick(path: string, item?: any) {
// 检查是否有保存的query参数,如果有则携带跳转
if (item?.meta?.queryParams) {
go({ path, query: item.meta.queryParams } as any);
} else {
go(path);
}
}

function handleClickOutside() {
Expand All @@ -266,7 +271,14 @@
onMouseenter: () => handleModuleClick(item.path, true),
onClick: async () => {
const children = await getChildrenMenus(item.path);
if (item.path && (!children || children.length === 0)) go(item.path);
if (item.path && (!children || children.length === 0)) {
// 检查是否有保存的query参数
if (item?.meta?.queryParams) {
go({ path: item.path, query: item.meta.queryParams } as any);
} else {
go(item.path);
}
}
},
};
}
Expand Down