浏览代码

fix: 小节从0开始,多小节合并,评测小节数字显示bug修复

TIANYONG 4 月之前
父节点
当前提交
27307ce082
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      src/page-instrument/evaluat-model/index.tsx
  2. 2 2
      src/state.ts

+ 1 - 1
src/page-instrument/evaluat-model/index.tsx

@@ -446,7 +446,7 @@ export default defineComponent({
       // 非选段状态,从头开始评测,重置速度
       if (!state.sectionStatus && state.section.length === 0) {
         state.activeNoteIndex = 0;
-        state.activeMeasureIndex = 1;
+        state.activeMeasureIndex = state.firstMeasureNumber === 0 ? 0 : 1;
         state.speed = state.times[0].measureSpeed * state.basePlayRate
       }
       initSetPlayRate();

+ 2 - 2
src/state.ts

@@ -1432,13 +1432,13 @@ export const scrollViewNote = (resetTop?: boolean) => {
     musicScrollTop = (offsetTop - state.headTopHeight - 30) * state.musicZoom
     musicAndSelection.scrollTo({
       top: (offsetTop - state.headTopHeight - 30) * state.musicZoom,
-      behavior: "auto",
+      behavior: "smooth",
     });
   } else {
     musicScrollTop = 0
     musicAndSelection.scrollTo({
       top: 0,
-      behavior: "auto",
+      behavior: "smooth",
     });
   }
 };