mirror of https://github.com/jeecgboot/jeecg-boot
Merge f03107ba53
into fd60e49f5b
commit
fee5ad44c6
|
@ -251,8 +251,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMenuClick(path: string) {
|
function handleMenuClick(path: string, item?: any) {
|
||||||
go(path);
|
// 检查是否有保存的query参数,如果有则携带跳转
|
||||||
|
if (item?.meta?.queryParams) {
|
||||||
|
go({ path, query: item.meta.queryParams } as any);
|
||||||
|
} else {
|
||||||
|
go(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleClickOutside() {
|
function handleClickOutside() {
|
||||||
|
@ -266,7 +271,14 @@
|
||||||
onMouseenter: () => handleModuleClick(item.path, true),
|
onMouseenter: () => handleModuleClick(item.path, true),
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
const children = await getChildrenMenus(item.path);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue