Pārlūkot izejas kodu

fix: 渐变小节问题修复

TIANYONG 10 mēneši atpakaļ
vecāks
revīzija
787f3a9645
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 3 3
      src/helpers/calcSpeed.ts

+ 3 - 3
src/helpers/calcSpeed.ts

@@ -160,13 +160,13 @@ export const getGradualLengthByXml = (xml: string) => {
 	// 结尾处手动插入一个音符节点
 	eles.push({
 		ele: notes[notes.length - 1],
-		index: notes.length,
+		index: notes.length-1,
 		noteInMeasureIndex: 0,
 		textContent: "",
 		type: "metronome",
 		allDuration: 1,
-		leftDuration: 1,
-		measureIndex: measures.length,
+		leftDuration: 0,
+		measureIndex: measures.length-1,
 	});
 
 	const gradualNotes: GradualNote[] = [];