mirror of
https://gitee.com/nicefold/seewis-soybean-plus.git
synced 2026-10-14 03:52:28 +08:00
fix(projects): 修复混合左侧混合-顶部优先布局下固定问题
This commit is contained in:
@@ -97,18 +97,16 @@ function useMixMenu() {
|
||||
}
|
||||
|
||||
function getActiveSecondLevelMenuKey() {
|
||||
const keys = selectedKey.value.split('_');
|
||||
const currentKey = selectedKey.value;
|
||||
|
||||
if (keys.length < 2) {
|
||||
setActiveSecondLevelMenuKey('');
|
||||
return;
|
||||
const found = secondLevelMenus.value.find(menu => {
|
||||
if (menu.key === currentKey) return true;
|
||||
return menu.children && findMenuByKey(menu.children, currentKey);
|
||||
});
|
||||
|
||||
if (found) {
|
||||
setActiveSecondLevelMenuKey(found.key);
|
||||
}
|
||||
|
||||
const [firstLevelRouteName, level2SuffixName] = keys;
|
||||
|
||||
const secondLevelRouteName = `${firstLevelRouteName}_${level2SuffixName}`;
|
||||
|
||||
setActiveSecondLevelMenuKey(secondLevelRouteName);
|
||||
}
|
||||
|
||||
const isActiveSecondLevelMenuHasChildren = computed(() => {
|
||||
@@ -122,9 +120,12 @@ function useMixMenu() {
|
||||
});
|
||||
|
||||
function handleSelectSecondLevelMenu(key: RouteKey) {
|
||||
setActiveSecondLevelMenuKey(key);
|
||||
const findItem = secondLevelMenus.value.find(item => item.key === key);
|
||||
const itemHasChildren = Boolean(findItem?.children?.length);
|
||||
|
||||
if (!isActiveSecondLevelMenuHasChildren.value) {
|
||||
if (itemHasChildren) {
|
||||
setActiveSecondLevelMenuKey(key);
|
||||
} else {
|
||||
routerPushByKeyWithMetaQuery(key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
"collapsedWidth": 64,
|
||||
"mixWidth": 90,
|
||||
"mixCollapsedWidth": 64,
|
||||
"mixChildMenuWidth": 200
|
||||
"mixChildMenuWidth": 230
|
||||
},
|
||||
"footer": {
|
||||
"visible": true,
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
"collapsedWidth": 64,
|
||||
"mixWidth": 90,
|
||||
"mixCollapsedWidth": 64,
|
||||
"mixChildMenuWidth": 200
|
||||
"mixChildMenuWidth": 230
|
||||
},
|
||||
"footer": {
|
||||
"visible": true,
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
"collapsedWidth": 64,
|
||||
"mixWidth": 90,
|
||||
"mixCollapsedWidth": 64,
|
||||
"mixChildMenuWidth": 200
|
||||
"mixChildMenuWidth": 230
|
||||
},
|
||||
"footer": {
|
||||
"visible": true,
|
||||
|
||||
@@ -48,7 +48,7 @@ export const themeSettings: App.Theme.ThemeSetting = {
|
||||
collapsedWidth: 64,
|
||||
mixWidth: 90,
|
||||
mixCollapsedWidth: 64,
|
||||
mixChildMenuWidth: 200,
|
||||
mixChildMenuWidth: 230,
|
||||
autoSelectFirstMenu: false
|
||||
},
|
||||
footer: {
|
||||
|
||||
Reference in New Issue
Block a user