浏览代码

fix: bug修改

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

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

@@ -543,7 +543,10 @@ export default defineComponent({
             onClose={() => {
               clearTimeout(checkErjiTimer);
               checkErjiTimer = null;
-              evaluatingData.earphoneMode = false;
+              // #11035,可能刚好关闭耳机弹窗的时候,第二次又出现了弹窗
+              setTimeout(() => {
+                evaluatingData.earphoneMode = false;
+              }, 0);
               // handlePerformDetection();
               checkEarphoneStatus("start");
             }}

+ 1 - 1
src/state.ts

@@ -1326,7 +1326,7 @@ function xmlToTracks(xmlString: string) {
   const partNames = Array.from(xmlParse.getElementsByTagName('part-name'));
   return partNames.reduce((arr: string[], item) => {
     const textContent = item?.textContent?.trim()
-    if (textContent !== "COMMON" && textContent) {
+    if (textContent != "COMMON" && textContent != "common" && textContent) {
       arr.push(textContent)
     }
     return arr

+ 1 - 0
src/view/fingering/fingering-config.ts

@@ -340,6 +340,7 @@ export const matchVoicePart = (id: number | string, type: "SINGLE" | "CONCERT"):
         let pitchKey = sKey;
         if (typeof sKey === "string") {
           pitchKey = pitchKey.toLocaleLowerCase().replace(/ /g, "");
+          pitchKey = pitchKey.replace(/[_0-9]+$/, '');
         }
         if (typeof sKey === "string") {
           // 去掉声轨后面的数字