feat(Menu.vue): 菜单路由添加外链支持

This commit is contained in:
郝先瑞
2022-02-18 00:05:43 +08:00
parent 29dbc48589
commit 4f29e83215
3 changed files with 30 additions and 7 deletions

View File

@@ -6,7 +6,8 @@
* @param {string} path
* @returns {Boolean}
*/
export function isExternal(path : string) {
return /^(https?:|mailto:|tel:)/.test(path)
export function isExternal(path: string) {
const isExternal = /^(https?:|http?:|mailto:|tel:)/.test(path)
return isExternal
}