建立生成器功能
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
This commit is contained in:
@@ -44,14 +44,16 @@ function patchRouteItems(route: any, menu: any, parentPath: string) {
|
||||
if (path.length > 0) {
|
||||
path += '/';
|
||||
}
|
||||
if (name !== 'index') {
|
||||
path += name.at(0)?.toUpperCase() + name.substr(1);
|
||||
// 不区分大小写判断 "index",避免服务端返回 "Index"(大写I)时在 Linux 上找不到模块
|
||||
// 统一输出小写 "index" 以匹配 webpack 模块注册路径
|
||||
if (name.toLowerCase() === 'index') {
|
||||
path += 'index';
|
||||
} else {
|
||||
path += name;
|
||||
path += name.at(0)?.toUpperCase() + name.substr(1);
|
||||
}
|
||||
})
|
||||
});
|
||||
if (!path.endsWith('.tsx')) {
|
||||
path += '.tsx'
|
||||
path += '.tsx';
|
||||
}
|
||||
if (route.routes === undefined) {
|
||||
route.routes = [];
|
||||
|
||||
Reference in New Issue
Block a user