chore: 增加提示

This commit is contained in:
dap 2024-06-26 11:59:41 +08:00
parent ad991e248a
commit 762ebd4ede

View File

@ -200,7 +200,13 @@ function duplicateRouteChecker(localRoutes: Route[], routes: Route[]) {
allRoutes.forEach((route) => { allRoutes.forEach((route) => {
const name = route.name.toString(); const name = route.name.toString();
if (name && nameList.includes(name)) { if (name && nameList.includes(name)) {
console.error(`路由名称: [${name}] 重复, 会造成 404`); const message = `路由名称: [${name}] 重复, 会造成 404`;
console.error(message);
ElNotification({
title: '路由名称重复',
message,
type: 'error'
});
return; return;
} }
nameList.push(route.name.toString()); nameList.push(route.name.toString());