From cc4b3e4f0011c550ed4c9167a0cd4c5ab1b8b582 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 19 Jun 2023 17:19:07 +0800 Subject: [PATCH] revert: useGo --- src/hooks/web/usePage.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/hooks/web/usePage.ts b/src/hooks/web/usePage.ts index d8db1f37..4032cc92 100644 --- a/src/hooks/web/usePage.ts +++ b/src/hooks/web/usePage.ts @@ -5,7 +5,6 @@ import { unref } from 'vue' import { useRouter } from 'vue-router' import { REDIRECT_NAME } from '@/router/constant' -import { isUrl } from '@/utils/is' export type PathAsPageEnum = T extends { path: string } ? T & { path: PageEnum } : T export type RouteLocationRawEx = PathAsPageEnum @@ -23,11 +22,7 @@ export function useGo(_router?: Router) { if (!opt) { return } - if (isUrl(opt as string)) { - window.open(opt as string, '_blank', 'noopener=yes') - } else { - isReplace ? replace(opt).catch(handleError) : push(opt).catch(handleError) - } + isReplace ? replace(opt).catch(handleError) : push(opt).catch(handleError) } return go }