fix(projects): 修复tab不显示路由首页的问题

This commit is contained in:
Soybean 2022-06-28 07:49:26 +08:00
parent 973ab14442
commit a792bb5cb3

View File

@ -225,7 +225,11 @@ export const useTabStore = defineStore('tab-store', {
if (!isHome) {
const currentTab = getTabRouteByVueRoute(currentRoute);
if (!currentRoute.meta.multiTab) {
tabs.splice(index, 1, currentTab);
if (index > -1) {
tabs.splice(index, 1, currentTab);
} else {
tabs.push(currentTab);
}
} else {
const hasCurrent = isInTabRoutes(tabs, currentRoute.fullPath);
if (!hasCurrent) {