mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-23 23:39:47 +08:00
Merge pull request #352 from Li-0221/main
fix(components): fix homeTab closeRight and disable colseLeft
This commit is contained in:
@ -73,7 +73,8 @@ function getContextMenuDisabledKeys(tabId: string) {
|
||||
const disabledKeys: App.Global.DropdownKey[] = [];
|
||||
|
||||
if (tabStore.isTabRetain(tabId)) {
|
||||
disabledKeys.push('closeCurrent');
|
||||
const homeDisable: App.Global.DropdownKey[] = ['closeCurrent', 'closeLeft'];
|
||||
disabledKeys.push(...homeDisable);
|
||||
}
|
||||
|
||||
return disabledKeys;
|
||||
|
@ -192,6 +192,12 @@ export const useTabStore = defineStore(SetupStoreId.Tab, () => {
|
||||
* @param tabId
|
||||
*/
|
||||
async function clearRightTabs(tabId: string) {
|
||||
const isHomeTab = tabId === homeTab.value?.id;
|
||||
if (isHomeTab) {
|
||||
clearTabs();
|
||||
return;
|
||||
}
|
||||
|
||||
const tabIds = tabs.value.map(tab => tab.id);
|
||||
const index = tabIds.indexOf(tabId);
|
||||
if (index === -1) return;
|
||||
|
Reference in New Issue
Block a user