mo 1 年之前
父节点
当前提交
015a75deea
共有 3 个文件被更改,包括 191 次插入259 次删除
  1. 177 257
      package-lock.json
  2. 12 0
      src/App.tsx
  3. 2 2
      vite.config.ts

文件差异内容过多而无法显示
+ 177 - 257
package-lock.json


+ 12 - 0
src/App.tsx

@@ -82,6 +82,18 @@ export default defineComponent({
       window.open('https://www.google.cn/intl/zh-CN/chrome/');
     };
 
+    const forceSWupdate = () => {
+
+      if ('serviceWorker' in navigator) {
+        console.log(navigator.serviceWorker, ' navigator.serviceWorker')
+        navigator.serviceWorker.getRegistrations().then(function (registrations) {
+          for (let registration of registrations) {
+            registration.update()
+          }
+        })
+      }
+    }
+    forceSWupdate()
     return () => (
       <>
         <NConfigProvider

+ 2 - 2
vite.config.ts

@@ -22,8 +22,8 @@ function resolve(dir: string) {
 }
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
-const proxyUrl = 'https://dev.kt.colexiu.com/';
-// const proxyUrl = 'https://test.lexiaoya.cn';
+// const proxyUrl = 'https://dev.kt.colexiu.com/';
+const proxyUrl = 'https://test.lexiaoya.cn';
 export default defineConfig({
   base: './',
   plugins: [

部分文件因为文件数量过多而无法显示