chore: 递增版本号并标记停更版本
- 版本号: 中段递增、末段归零
- README: laravel 与 spring-boot-3 更新状态改为 ❌️
This commit is contained in:
1 parent
dc1436e3e5
commit
3ccbdb7c06
13 files changed
+1235
-687
No files matched your search
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* 路由路径工具
|
||||
*/
|
||||
|
||||
import { isExternal } from "./validate";
|
||||
|
||||
/**
|
||||
* 拼接路由路径
|
||||
*
|
||||
* 外链与绝对路径原样返回,相对路径挂到父级之后;顶级相对路径自动补前导斜杠。
|
||||
*
|
||||
* @param basePath 父级完整路径
|
||||
* @param path 当前段路径
|
||||
*/
|
||||
export function joinRoutePath(basePath: string, path?: string): string {
|
||||
if (!path) return basePath || "/";
|
||||
if (isExternal(path) || path.startsWith("/")) return path;
|
||||
return `${basePath.replace(/\/+$/, "")}/${path}`;
|
||||
}
|
||||
Reference in new issue
Block a user