mo 1 年之前
父节点
当前提交
ca9c2d926e
共有 1 个文件被更改,包括 10 次插入1 次删除
  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();
+              }
+            });
           }
         });