mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-25 02:58:43 +08:00
parent
e962fa039a
commit
513ccb9543
@ -93,7 +93,6 @@ export const isServer = typeof window === 'undefined';
|
||||
export const isClient = !isServer;
|
||||
|
||||
export function isUrl(path: string): boolean {
|
||||
const reg =
|
||||
/^(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?(\/#\/)?(?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/;
|
||||
const reg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;
|
||||
return reg.test(path);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user