Ver código fonte

修改判断

lex 9 meses atrás
pai
commit
94f6b86dd5
1 arquivos alterados com 10 adições e 6 exclusões
  1. 10 6
      src/views/co-ai/index.tsx

+ 10 - 6
src/views/co-ai/index.tsx

@@ -127,9 +127,12 @@ export default defineComponent({
           text: '固定调'
         }
       ];
-      // 首调 固定调 并且 不显示可转谱 则不显示五线谱
+
       if (
-        !(['JIAN', 'FIRST'].includes(scoreType) && isConvertibleScore === false)
+        !(
+          ['JIAN', 'FIRST'].includes(scoreType) && isConvertibleScore === false
+        ) &&
+        !(isConvertibleScore === undefined || isConvertibleScore === null)
       ) {
         action.unshift({
           value: 'staff',
@@ -345,12 +348,13 @@ export default defineComponent({
     });
 
     // 判断是否可转谱 - 为空也可以转谱
-    const checkConverTible = (isConvertibleScore: any) => {
+    const checkConverTible = (isConvertibleScore: any, scoreType: string) => {
       if (
         isConvertibleScore ||
         isConvertibleScore === '' ||
         isConvertibleScore === undefined ||
-        isConvertibleScore === null
+        isConvertibleScore === null ||
+        (['JIAN', 'FIRST'].includes(scoreType) && !isConvertibleScore)
       ) {
         return true;
       } else {
@@ -419,7 +423,7 @@ export default defineComponent({
             ? 'first'
             : 'first';
         data.showMusicImg = musicImgType;
-        data.showTransBtn = checkConverTible(isConvertibleScore);
+        data.showTransBtn = checkConverTible(isConvertibleScore, scoreType);
       }
     };
 
@@ -502,7 +506,7 @@ export default defineComponent({
           ? 'first'
           : 'first';
       data.showMusicImg = musicImgType;
-      data.showTransBtn = checkConverTible(isConvertibleScore);
+      data.showTransBtn = checkConverTible(isConvertibleScore, scoreType);
     };
     watch(
       () => data.musicIndex,