Przeglądaj źródła

feat: 指法优化

TIANYONG 1 rok temu
rodzic
commit
c03078b37e

+ 5 - 0
src/state.ts

@@ -837,6 +837,11 @@ const setState = (data: any, index: number) => {
   state.fingeringInfo = subjectFingering(code);
   console.log("🚀 ~ state.fingeringInfo:", code, state.fingeringInfo, state.trackId, state.track);
 
+  // 如果切换的声轨没有指法,择指法开关置灰并且不可点击
+  if (!state.fingeringInfo.name && state.setting.displayFingering) {
+    state.setting.displayFingering = false
+  }
+
   // 检测是否原音和伴奏都有
   if (!state.music || !state.accompany) {
     state.playSource = state.music ? "music" : "background";

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

@@ -255,6 +255,7 @@ export const matchVoicePart = (id: number | string, type: "SINGLE" | "CONCERT"):
       "Flute 1": 2,
       "Flute 2": 2,
       Oboe: 1,
+      "Clarinet in Bb": 4,
       "Clarinet in Bb 1": 4,
       "Clarinet in Bb 2": 4,
       "Alto Clarinet in Eb": 4,

+ 2 - 2
src/view/plugins/toggleMusicSheet/choosePartName/index.tsx

@@ -21,7 +21,7 @@ export default defineComponent({
     const columns = computed(() => {
       return partListNames.value
     })
-    console.log(partListNames.value, partIndex.value, selectIndex.value, columns.value, 999999)
+    // console.log(partListNames.value, partIndex.value, selectIndex.value, columns.value, 999999)
     /**
      * 默认选中的
      * picker组件,3.x的版本可以使用defaultIndex,4.x的版本只能使用v-model传递
@@ -29,7 +29,7 @@ export default defineComponent({
     const selValues = ref([partIndex.value]);
     const myPicker = ref();
     onMounted(() => {
-			console.log(myPicker.value)
+			// console.log(myPicker.value,99999,selValues.value,props.partIndex)
 		});
     return () => (
       <div class={styles.container}>

+ 4 - 2
src/view/plugins/toggleMusicSheet/index.tsx

@@ -38,8 +38,10 @@ export default defineComponent({
 
     const trackIdx: any = computed(() => {
       if (partListNames && partListNames.value.length) {
-        // console.log(3333,partListNames)
-        return partListNames.value.findIndex((item: any) => item.value == state.partIndex)
+        
+        const idx = partListNames.value.find((item: any) => item.value == state.partIndex).value
+        console.log(3333,idx)
+        return idx
       } else {
         return 0
       }