Commit a80a9135 by vben

fix: Fixed tab error,fixex #59 [deploy]

1 parent 239f681e
......@@ -34,8 +34,8 @@
"devDependencies": {
"@eslint/js": "^9.8.0",
"@types/eslint": "^9.6.0",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"eslint": "^9.8.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-eslint-comments": "^3.2.0",
......
......@@ -28,7 +28,7 @@
}
},
"dependencies": {
"@stylistic/stylelint-plugin": "^2.1.2",
"@stylistic/stylelint-plugin": "^2.1.3",
"stylelint-config-recess-order": "^5.0.1",
"stylelint-scss": "^6.4.1"
},
......
......@@ -68,7 +68,7 @@
"@vue/test-utils": "^2.4.6",
"cross-env": "^7.0.3",
"cspell": "^8.12.1",
"husky": "^9.1.3",
"husky": "^9.1.4",
"is-ci": "^3.0.1",
"jsdom": "^24.1.1",
"rimraf": "^6.0.1",
......
......@@ -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
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!