mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +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