refactor(projects): 代码优化

This commit is contained in:
Soybean
2022-05-09 20:46:27 +08:00
parent 92b8406444
commit 3590b65e22
11 changed files with 189 additions and 168 deletions

View File

@ -69,7 +69,8 @@ export const useTabStore = defineStore('tab-store', {
*/
addTab(route: RouteLocationNormalizedLoaded) {
if (!isInTabRoutes(this.tabs, route.path)) {
this.tabs.push(getTabRouteByVueRoute(route));
const tab = getTabRouteByVueRoute(route);
this.tabs.push(tab);
}
},
/**