fix: Fixed tab error,fixex #59 [deploy]
This commit is contained in:
@@ -34,7 +34,8 @@ const {
|
||||
} = useTabbar();
|
||||
|
||||
const menus = computed(() => {
|
||||
const menus = createContextMenus(route);
|
||||
const tab = coreTabbarStore.getTabByPath(currentActive.value);
|
||||
const menus = createContextMenus(tab);
|
||||
return menus.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
|
@@ -182,7 +182,6 @@ export const useCoreTabbarStore = defineStore('core-tabbar', {
|
||||
}
|
||||
await this._bulkCloseByPaths(paths);
|
||||
},
|
||||
|
||||
/**
|
||||
* @zh_CN 关闭右侧标签页
|
||||
* @param tab
|
||||
@@ -251,6 +250,17 @@ export const useCoreTabbarStore = defineStore('core-tabbar', {
|
||||
|
||||
await this.closeTab(this.tabs[index], router);
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据路径获取标签页
|
||||
* @param path
|
||||
* @returns
|
||||
*/
|
||||
getTabByPath(path: string) {
|
||||
return this.getTabs.find(
|
||||
(item) => getTabPath(item) === path,
|
||||
) as TabDefinition;
|
||||
},
|
||||
/**
|
||||
* @zh_CN 新窗口打开标签页
|
||||
* @param tab
|
||||
|
Reference in New Issue
Block a user