commit
49aa7f645c
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue