mo 1 year ago
parent
commit
21ca277008
1 changed files with 21 additions and 19 deletions
  1. 21 19
      src/components/RouterError/index.tsx

+ 21 - 19
src/components/RouterError/index.tsx

@@ -22,16 +22,17 @@ export default defineComponent({
 
       if (isChunkLoadFailed != -1 && !isOpen) {
         isOpen = true;
-        dialog.warning({
-          title: '更新提示',
-          content: '网站有更新请点击确定刷新页面?',
-          positiveText: '确定',
-          negativeText: '取消',
-          onPositiveClick: () => {
-            router.push(to)
-            showModalMask.value = true
-          }
-        });
+        router.push(to)
+        showModalMask.value = true
+        // dialog.warning({
+        //   title: '更新提示',
+        //   content: '网站有更新请点击确定刷新页面?',
+        //   positiveText: '确定',
+        //   negativeText: '取消',
+        //   onPositiveClick: () => {
+
+        //   }
+        // });
       }
     });
 
@@ -46,15 +47,16 @@ export default defineComponent({
           });
           if (flag) {
             // window.location.reload();
-            dialog.warning({
-              title: '更新提示',
-              content: '网站有更新请点击确定刷新页面?',
-              positiveText: '确定',
-              negativeText: '取消',
-              onPositiveClick: () => {
-                showModalMask.value = true
-              }
-            });
+            showModalMask.value = true
+            // dialog.warning({
+            //   title: '更新提示',
+            //   content: '网站有更新请点击确定刷新页面?',
+            //   positiveText: '确定',
+            //   negativeText: '取消',
+            //   onPositiveClick: () => {
+
+            //   }
+            // });
           }
         });