Ver Fonte

feat: 默认速度逻辑修改

TIANYONG há 1 ano atrás
pai
commit
6ddb136e1d

+ 1 - 0
src/constant/instruments.ts

@@ -155,6 +155,7 @@ const instruments: any = {
 	"Drum Set": "架子鼓",
 	"Hulusi flute": "葫芦丝",
 	Melodica: "口风琴",
+	Nai: "口风琴",
 	"Snare Drum": "小军鼓",
 	Cymbal: "镲",
 	Cymbals: "镲",

+ 1 - 0
src/page-instrument/view-detail/index.module.less

@@ -136,6 +136,7 @@
 .preViewDetail {
     .container {
         height: 100%;
+        padding-bottom: 0 !important;
     }
     :global {
         #osmdCanvasPage1 {

+ 1 - 1
src/page-instrument/view-detail/index.tsx

@@ -142,7 +142,7 @@ export default defineComponent({
       if (state.originSpeed === 0) {
         state.originSpeed = state.speed = (osmd as any).bpm || osmd.Sheet.userStartTempoInBPM || 100;
       }
-      const saveSpeed = (store.get("speeds") || {})[state.examSongId] || (osmd as any).bpm || osmd.Sheet.userStartTempoInBPM;
+      const saveSpeed = (store.get("speeds") || {})[state.examSongId] || state.speed || (osmd as any).bpm || osmd.Sheet.userStartTempoInBPM;
       // 加载本地缓存的速度
       if (saveSpeed) {
         handleSetSpeed(saveSpeed);

+ 4 - 4
src/view/plugins/move-music-score/index.tsx

@@ -146,10 +146,10 @@ export const filterMoveData = async () => {
 				}
 				return item;
 			});
-		if (!list.length) {
-			showToast("请移动元素后再保存");
-			return
-		}
+		// if (!list.length) {
+		// 	showToast("请移动元素后再保存");
+		// 	return
+		// }
 		extStyleConfigJson[moveData.partIndex] = list;
 		console.log("🚀 ~ extStyleConfigJson", extStyleConfigJson)
 		const res = await request.post("/musicSheet/img", {

+ 1 - 0
src/view/plugins/toggleMusicSheet/index.tsx

@@ -21,6 +21,7 @@ export default defineComponent({
 
     const partListNames = computed(() => {
       let partList = state.partListNames || []
+      console.log(777777,state.partListNames)
       partList = partList.filter((item: any) => !item?.toLocaleUpperCase()?.includes('COMMON'))
       const arr =  partList.map((item: any, index: number) => {
         // 该声轨能否被选