Преглед на файлове

添加额外的关键词

wolyshaw преди 2 години
родител
ревизия
b152ee8a4a
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 6 1
      src/views/accompaniment/modals/form.vue

+ 6 - 1
src/views/accompaniment/modals/form.vue

@@ -888,6 +888,11 @@ const speedInfo = {
   "accel.": 0.8,
   calando: 2,
   "poco accel.": 0.8,
+  'gradually slowing': 1.333333333,
+  'slowing': 1.333333333,
+  'slow': 1.333333333,
+  'slowly': 1.333333333,
+  faster: 1.333333333,
 };
 
 /**
@@ -963,7 +968,7 @@ export function getGradualLengthByXml(xml) {
     }
     if (
       ele.type === "metronome" ||
-      (ele.type === "words" && (textContent === "a tempo" || keys.includes(textContent)) || isLastNoteAndNotClosed)
+      (ele.type === "words" && (textContent.startsWith("a tempo") || keys.includes(textContent)) || isLastNoteAndNotClosed)
     ) {
       const indexOf = gradualNotes.findIndex((item) => item.length === 1);
       if (indexOf > -1 && ele.index > gradualNotes[indexOf]?.[0].start) {