Răsfoiți Sursa

fix: 接收winopen的返回值

mtruning 3 ani în urmă
părinte
comite
fb89f9b85b
1 a modificat fișierele cu 2 adăugiri și 3 ștergeri
  1. 2 3
      src/utils/router.ts

+ 2 - 3
src/utils/router.ts

@@ -65,8 +65,7 @@ export const routerTurnByPath = (
     fullPath = `${path}/${query.join('/')}`
   }
   if (windowOpen) {
-    openNewWindow(fullPath)
-    return
+    return openNewWindow(fullPath)
   }
   if (isReplace) {
     router.replace({
@@ -110,7 +109,7 @@ export const logout = () => {
  * @param url
  */
 export const openNewWindow = (url: string) => {
-  window.open(url, '_blank')
+  return window.open(url, '_blank')
 }
 
 /**