refactor: 优化非 CRUD 代码可读性

This commit is contained in:
Ray.Hao
2026-05-26 19:53:23 +08:00
parent 2a538d7da7
commit bd4413b9f0
11 changed files with 89 additions and 52 deletions

View File

@@ -184,7 +184,7 @@ function extractTopMenuPath(path: string): string {
function handleTopMenuSelect(menuPath: string) {
if (menuPath === activeTopMenuPath.value) return;
appStore.activeTopMenu(menuPath);
appStore.setActiveTopMenuPath(menuPath);
permissionStore.setMixLayoutSideMenus(menuPath);
navigateToFirstMenu(permissionStore.mixLayoutSideMenus);
}
@@ -215,7 +215,7 @@ watch(
const isTopMenuChanged = topMenuPath !== activeTopMenuPath.value;
if (isTopMenuChanged) {
appStore.activeTopMenu(topMenuPath);
appStore.setActiveTopMenuPath(topMenuPath);
}
// 切换布局(如左侧 -> 混合activeTopMenuPath 可能已是正确值,