Skip to content

Commit cb5ecf9

Browse files
author
allen
committed
feat: tab优化
1 parent f5bc0a7 commit cb5ecf9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/layout/Header.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ const breadcrumbArr = computed(() => {
2525
2626
// 更新头部tabs
2727
onBeforeRouteUpdate((to, _from, next) => {
28-
const tab = { title: to.meta.title, name: to.name } as App.Tab
29-
addTab(tab)
28+
if (to.meta.title) {
29+
const tab = { title: to.meta.title, name: to.name } as App.Tab
30+
addTab(tab)
31+
}
3032
next()
3133
})
3234

0 commit comments

Comments
 (0)