fix(breadcrumb): 修复多层级路由指向错误(#749)

This commit is contained in:
悠静萝莉 2024-09-04 16:54:58 +08:00
parent b5d624cd80
commit 257d8f90b8
No known key found for this signature in database
GPG Key ID: 4EDF1CA1CEA8EBCC

View File

@ -27,7 +27,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].to}/${path}` : `/${path}`,
title: route.matched[idx]?.meta?.title ?? path, title: route.matched[idx]?.meta?.title ?? path,
}); });
return breadcrumbArray; return breadcrumbArray;