Browse Source

Merge branch 'iteration-20250110-last' into jenkins

lex-xin 5 months ago
parent
commit
e4bcd45f18

+ 1 - 1
public/version.json

@@ -1 +1 @@
-{"version":1737369359399}
+{"version":1737412282162}

+ 6 - 1
src/components/layout/guide-section/guide-drag.ts

@@ -180,8 +180,12 @@ export default function useDrag(
       // 初始化pos值
       window.addEventListener('resize', refreshPos);
       window.addEventListener('fullscreenchange', onFullscreenchange);
-      console.log('first - show', boxClass);
       nextTick(() => {
+        document
+          .querySelectorAll(`.${boxClass} .dragDirectionPoint`)
+          .forEach((value: Element) => {
+            value.remove();
+          });
         const layoutTopHeight =
           document.querySelector('.layoutTop')?.clientHeight || 0;
         baseSize.layoutTopHeight = Math.ceil(layoutTopHeight);
@@ -396,6 +400,7 @@ export default function useDrag(
     baseSize.defaultWidth = initSize?.width || 400;
     baseSize.defaultHeight = initSize?.height || 640;
     isResizeBlocked = false;
+
     dragShow.value = false;
   }
 

+ 1 - 1
src/components/layout/guide-section/index.tsx

@@ -61,7 +61,7 @@ export default defineComponent({
       previewShow,
       {
         resizeDirection: [true, true, true, true, true, true, true, true],
-        minHeight: 392,
+        minHeight: 391.5,
         minWidth: 600,
         defaultPosition: 'center',
         width: 1000,

+ 8 - 8
src/router/router-guards.ts

@@ -39,14 +39,14 @@ export function createRouterGuards(router: Router) {
         : ('音乐数字课堂' as string);
     }
 
-    // if ('serviceWorker' in navigator) {
-    //   console.log(caches.keys(), 'caches.keys()');
-    //   caches.keys().then(function (cacheNames) {
-    //     cacheNames.forEach(function (cacheName) {
-    //       caches.delete(cacheName);
-    //     });
-    //   });
-    // }
+    if ('serviceWorker' in navigator) {
+      // console.log(caches.keys(), 'caches.keys()');
+      caches.keys().then(function (cacheNames) {
+        cacheNames.forEach(function (cacheName) {
+          caches.delete(cacheName);
+        });
+      });
+    }
     if (!isChrome()) {
       return;
     }

+ 1 - 1
vite.config.ts

@@ -68,7 +68,7 @@ export default defineConfig(() => {
         includeAssets: ['./logo.png'],
         workbox: {
           skipWaiting: false, // 强制跳过等待
-          clientsClaim: false
+          clientsClaim: false // 让新的 Service Worker 立即控制所有页面
         },
         manifest: {
           name: '酷乐秀-音乐数字课堂',