Browse Source

feat: 增加自定义小节播放顺序字段:customRepeatStr

TIANYONG 3 months ago
parent
commit
00289403f3
1 changed files with 19 additions and 3 deletions
  1. 19 3
      src/views/music-library/music-sheet/modal/music-operationV2.tsx

+ 19 - 3
src/views/music-library/music-sheet/modal/music-operationV2.tsx

@@ -381,7 +381,8 @@ export default defineComponent({
       fSongList: [] as any, // 范唱列表
       isScoreRender: true, // 总谱渲染
       defaultScoreRender: false, // 演奏是否默认展示总谱渲染
-      scoreAudioFileUrl: null as any // 总谱文件
+      scoreAudioFileUrl: null as any, // 总谱文件
+      customRepeatStr: '' as any, // 自定义小节播放顺序
     })
     const state = reactive({
       loading: false,
@@ -665,7 +666,8 @@ export default defineComponent({
               repeatedBeats: forms.repeatedBeats ? 1 : 0,
               gradualTimes: forms.graduals,
               isEvxml: forms.isEvxml ? 1 : 0,
-              repeatedBeatsToSing: forms.repeatedBeatsToSing ? 1 : 0
+              repeatedBeatsToSing: forms.repeatedBeatsToSing ? 1 : 0,
+              customRepeatStr: forms.customRepeatStr ? forms.customRepeatStr?.trim()?.replace(/,/g, ',') : ''
             }),
             // availableType: forms.availableType,
             sourceType: forms.sourceType,
@@ -1405,6 +1407,7 @@ export default defineComponent({
             forms.repeatedBeats = !!extConfigJson.repeatedBeats
             forms.isEvxml = !!extConfigJson.isEvxml
             forms.repeatedBeatsToSing = !!extConfigJson.repeatedBeatsToSing
+            forms.customRepeatStr = extConfigJson.customRepeatStr?.trim()?.replace(/,/g, ',') || ''
           } catch (error) {}
           forms.evaluationStandard = data.evaluationStandard
           forms.musicSheetExtend = data.musicSheetExtend
@@ -2164,7 +2167,20 @@ export default defineComponent({
                   </NRadioGroup>
                 </NFormItemGi>
               </NGrid>
-            
+
+              <NGrid cols={1}>
+                <NFormItemGi label="自定义小节播放顺序" path="customRepeatStr">
+                  <NInput
+                    placeholder="请输入小节的播放顺序,例如输入:1-10,15-20,则曲谱会按照1-10小节播完后,跳到15小节,播放15-20小节"
+                    type="textarea"
+                    rows={3}
+                    showCount
+                    maxlength={200}
+                    v-model:value={forms.customRepeatStr}
+                  />
+                </NFormItemGi>
+              </NGrid>
+
             <NGrid cols={1}>
               <NFormItemGi
                 label={'切换声轨'}