Browse Source

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

黄琪勇 11 tháng trước cách đây
mục cha
commit
3aa1037107
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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()