mo 1 year ago
parent
commit
ca9c2d926e
1 changed files with 10 additions and 1 deletions
  1. 10 1
      src/components/RouterError/index.tsx

+ 10 - 1
src/components/RouterError/index.tsx

@@ -43,7 +43,16 @@ export default defineComponent({
             caches.delete(cacheName);
           });
           if (flag) {
-            window.location.reload();
+            // window.location.reload();
+            dialog.warning({
+              title: '更新提示',
+              content: '网站有更新请点击确定刷新页面?',
+              positiveText: '确定',
+              negativeText: '取消',
+              onPositiveClick: () => {
+                window.location.reload();
+              }
+            });
           }
         });