Browse Source

解决初始化的时候 小节初始值下标可能为0的问题

黄琪勇 11 months ago
parent
commit
3aa1037107
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/state.ts

+ 2 - 2
src/state.ts

@@ -382,7 +382,7 @@ const state = reactive({
   /** 激活的note index */
   activeNoteIndex: 0,
   /** 激活的小节 */
-  activeMeasureIndex: 0,
+  activeMeasureIndex: -1,
   /** 选段状态 */
   sectionStatus: false,
   /** 选段数据 */
@@ -1859,7 +1859,7 @@ watch(
 /** 刷新谱面 */
 export const refreshMusicSvg = () => {
   resetBaseRate();
-  state.activeMeasureIndex = 0;
+  state.activeMeasureIndex = -1;
   // 销毁旋律线
   destroySmoothAnimation()
   musicScoreRef.value?.refreshMusicScore()