Selaa lähdekoodia

试试再当前页面会不会i触发

1
mo 1 vuosi sitten
vanhempi
commit
db866550e8
1 muutettua tiedostoa jossa 9 lisäystä ja 3 poistoa
  1. 9 3
      src/components/RouterError/index.tsx

+ 9 - 3
src/components/RouterError/index.tsx

@@ -10,7 +10,6 @@ export default defineComponent({
     const router = useRouter();
     const dialog = useDialog();
     let refreshing = false;
-
     const showModalMask = ref(false)
 
 
@@ -23,8 +22,15 @@ export default defineComponent({
       if (isChunkLoadFailed != -1 && !refreshing) {
         refreshing = true;
         console.log('onError刷新');
-        router.push(to)
-        showModalMask.value = true
+        if (window.matchMedia('(display-mode: standalone)').matches) {
+          return
+
+        }else {
+          showModalMask.value = true;
+          router.push(to.path)
+        }
+
+
         // dialog.warning({
         //   title: '更新提示',
         //   content: '网站有更新请点击确定刷新页面?',