瀏覽代碼

Merge branch 'feature-tianyong' into gym-online

TIANYONG 3 月之前
父節點
當前提交
a9896fb526
共有 2 個文件被更改,包括 19 次插入2 次删除
  1. 11 2
      src/state.ts
  2. 8 0
      src/view/selection/index.tsx

+ 11 - 2
src/state.ts

@@ -1210,6 +1210,14 @@ export const handleChangeSection = () => {
     resetBaseRate(state.activeNoteIndex);
     //skipNotePlay(0, true);  取消选段的时候 不跳回开头
     state.sectionFirst = null;
+    // IOS18.1.1浏览器渲染更新有问题,需要手动更新一下
+    const selectionDom = document.getElementById('selectionBox')
+    if (selectionDom) {
+      selectionDom.style.display = 'none';
+      requestAnimationFrame(() => {
+        selectionDom.style.display = 'block';
+      })
+    }
     return;
   }
   state.sectionStatus = true;
@@ -1385,6 +1393,7 @@ export const scrollViewNote = (resetTop?: boolean) => {
   if (!cursorElement || !musicAndSelection) {
     return
   }
+  // console.log('滚动', musicAndSelection?.scrollTop, musicScrollTop)
   if (Math.abs(musicAndSelection?.scrollTop - musicScrollTop) > 30) {
     // 手动滑动谱面,重新播放需要滚动到对应位置
   } else {
@@ -1395,13 +1404,13 @@ export const scrollViewNote = (resetTop?: boolean) => {
     musicScrollTop = (offsetTop - state.headTopHeight - 30) * state.musicZoom
     musicAndSelection.scrollTo({
       top: (offsetTop - state.headTopHeight - 30) * state.musicZoom,
-      behavior: "smooth",
+      behavior: "auto",
     });
   } else {
     musicScrollTop = 0
     musicAndSelection.scrollTo({
       top: 0,
-      behavior: "smooth",
+      behavior: "auto",
     });
   }
 };

+ 8 - 0
src/view/selection/index.tsx

@@ -417,6 +417,14 @@ export default defineComponent({
 												className: "selectionToast",
 											});
 										}
+										// IOS18.1.1浏览器渲染更新有问题,需要手动更新一下
+										const selectionDom = document.getElementById('selectionBox')
+										if (selectionDom) {
+											selectionDom.style.display = 'none';
+											requestAnimationFrame(() => {
+												selectionDom.style.display = 'block';
+											})
+										}							
 									}}></div>
 								</div>
 							)