fix: 修复路径重复拼接的问题 (#319)

This commit is contained in:
悠静萝莉 2022-09-22 13:59:37 +08:00 committed by GitHub
parent 33fa473761
commit 6f98a7958c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ const getMenuList = (list: MenuRoute[], basePath?: string): MenuRoute[] => {
});
return list
.map((item) => {
const path = basePath ? `${basePath}/${item.path}` : item.path;
const path = basePath && !item.path.includes(basePath) ? `${basePath}/${item.path}` : item.path;
return {
path,
title: item.meta?.title,