diff --git a/src/hooks/web/usePage.ts b/src/hooks/web/usePage.ts index 4032cc92..27349fa1 100644 --- a/src/hooks/web/usePage.ts +++ b/src/hooks/web/usePage.ts @@ -22,7 +22,11 @@ export function useGo(_router?: Router) { if (!opt) { return } - isReplace ? replace(opt).catch(handleError) : push(opt).catch(handleError) + 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 }