Pre Merge pull request !20 from 紫星/master

pull/20/MERGE
紫星 2023-06-14 02:11:36 +00:00 committed by Gitee
commit 71c44c8d87
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 5 additions and 1 deletions

View File

@ -22,8 +22,12 @@ export function useGo(_router?: Router) {
if (!opt) {
return
}
if (/^(https?:|mailto:|tel:)/.test(opt as string)) {
window.open(opt as string, '_blank', 'noopener=yes')
} else {
isReplace ? replace(opt).catch(handleError) : push(opt).catch(handleError)
}
}
return go
}