mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-11-12 11:43:42 +08:00
feat(projects): 增加项目文档外链
This commit is contained in:
@@ -47,3 +47,10 @@ export function transformRouteToMenu(routes: RouteRecordRaw[]) {
|
||||
});
|
||||
return globalMenu;
|
||||
}
|
||||
|
||||
/** 判断路由是否为Url链接 */
|
||||
export function isUrl(path: string): boolean {
|
||||
const reg =
|
||||
/(((^https?:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)$/;
|
||||
return reg.test(path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user