fix: 修复获取路由参数报错的问题 (#203)

This commit is contained in:
悠静萝莉 2022-07-03 14:57:59 +08:00 committed by GitHub
parent b8997d206c
commit e78d4b6ee1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ const crumbs = computed(() => {
breadcrumbArray.push({ breadcrumbArray.push({
path, path,
to: breadcrumbArray[idx - 1] ? `/${breadcrumbArray[idx - 1].path}/${path}` : `/${path}`, to: breadcrumbArray[idx - 1] ? `/${breadcrumbArray[idx - 1].path}/${path}` : `/${path}`,
title: route.matched[idx].meta.title || path, title: route.matched[idx]?.meta?.title ?? path,
}); });
return breadcrumbArray; return breadcrumbArray;
}, []); }, []);