fix(projects): 修复项目配置拷贝功能

This commit is contained in:
Soybean
2022-02-07 23:21:30 +08:00
parent 2c9660fdbf
commit a7a269d6a6
5 changed files with 152 additions and 6 deletions

View File

@ -125,7 +125,7 @@ declare namespace AuthRoute {
type SingleRouteParentPath = KeyToPath<SingleRouteParentKey>;
/** 路由key转换路由path */
type KeyToPath<Key extends RouteKey> = Key extends `${infer Left}_${infer Right}`
type KeyToPath<Key extends string> = Key extends `${infer Left}_${infer Right}`
? KeyToPath<`${Left}/${Right}`>
: `/${Key}`;