From d61f7419baf169f1c18fb1d56f746b1737ec5cc8 Mon Sep 17 00:00:00 2001 From: hxr <1490493387@qq.com> Date: Sun, 19 Nov 2023 00:04:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20ts=20=E7=B1=BB=E5=9E=8B=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: a3426ee43f076f6eb216289fc307cc02a910426a --- src/layout/components/TagsView/index.vue | 2 +- types/router.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 6d5f425..aa6267b 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -185,7 +185,7 @@ function moveToCurrentTag() { if (tag.fullPath !== route.fullPath) { tagsViewStore.updateVisitedView({ name: route.name as string, - title: route.meta.title, + title: route.meta.title || "", path: route.path, fullPath: route.fullPath, affix: route.meta?.affix, diff --git a/types/router.d.ts b/types/router.d.ts index 0b6475b..99e187b 100644 --- a/types/router.d.ts +++ b/types/router.d.ts @@ -5,7 +5,7 @@ declare module "vue-router" { // 可以通过扩展 RouteMeta 接口来输入 meta 字段 interface RouteMeta { /** 菜单名称 */ - title: string; + title?: string; /** 菜单图标 */ icon?: string; /** 菜单是否隐藏 */