fix: 🐛 ts 类型报错问题修复

This commit is contained in:
hxr 2023-11-19 00:04:12 +08:00
parent bd662df7d7
commit a3426ee43f
2 changed files with 2 additions and 2 deletions

View File

@ -185,7 +185,7 @@ function moveToCurrentTag() {
if (tag.fullPath !== route.fullPath) { if (tag.fullPath !== route.fullPath) {
tagsViewStore.updateVisitedView({ tagsViewStore.updateVisitedView({
name: route.name as string, name: route.name as string,
title: route.meta.title, title: route.meta.title || "",
path: route.path, path: route.path,
fullPath: route.fullPath, fullPath: route.fullPath,
affix: route.meta?.affix, affix: route.meta?.affix,

2
types/router.d.ts vendored
View File

@ -5,7 +5,7 @@ declare module "vue-router" {
// 可以通过扩展 RouteMeta 接口来输入 meta 字段 // 可以通过扩展 RouteMeta 接口来输入 meta 字段
interface RouteMeta { interface RouteMeta {
/** 菜单名称 */ /** 菜单名称 */
title: string; title?: string;
/** 菜单图标 */ /** 菜单图标 */
icon?: string; icon?: string;
/** 菜单是否隐藏 */ /** 菜单是否隐藏 */