fix: 完善提示

This commit is contained in:
wanchun 2023-04-11 17:04:36 +08:00
parent a670c5e10e
commit 4fd4abbcf8

View File

@ -55,12 +55,12 @@ const getRoutePath = function (parentRoutePath, fileName, isFile = true) {
}
// /@id.vue -> /:id
if (fileName.startsWith('@')) {
logger.warn(`[WARNING]: ${fileName} is deprecated, please use [slug]`);
logger.warn(`[WARNING]: filename or directory ${fileName} is deprecated, please use [${fileName.replace(/@/, '')}]`);
fileName = fileName.replace(/@/, ':');
}
// /*.vue -> :pathMatch(.*)
if (fileName.includes('*')) {
logger.warn(`[WARNING]: ${fileName} is deprecated, please use [...slug]`);
logger.warn(`[WARNING]: filename or directory ${fileName} is deprecated, please use ${fileName.replace('*', '[...]')}`);
fileName = fileName.replace('*', ':pathMatch(.*)');
}
// /[slug].vue -> /:slug