perf(projects): perf code

This commit is contained in:
Soybean
2024-03-10 14:36:05 +08:00
parent c05e7ff360
commit dc24a36739
3 changed files with 10 additions and 13 deletions

View File

@ -57,14 +57,9 @@ function updateExpandedKeys() {
}
function handleClickMenu(key: RouteKey) {
const meta = routeStore.getSelectedMenuMetaByKey(key);
if (meta?.fixedQuery) {
routerPushByKey(key, {
query: meta.fixedQuery
});
return;
}
routerPushByKey(key);
const { query } = routeStore.getSelectedMenuMetaByKey(key) || {};
routerPushByKey(key, { query });
}
watch(