liushengqiang 2 years ago
parent
commit
9b0de60924

+ 8 - 8
src/page-instrument/view-figner/index.tsx

@@ -85,11 +85,11 @@ export default defineComponent({
 			fingeringInfo: subjectFingering(data.subject),
 		});
 
-		if (!props.isComponent) {
-			if (fingerData.fingeringInfo.orientation === 0) {
-				api_setRequestedOrientation(fingerData.fingeringInfo.orientation);
-			}
-		}
+		// if (!props.isComponent) {
+		// 	if (fingerData.fingeringInfo.orientation === 0) {
+		// 		api_setRequestedOrientation(fingerData.fingeringInfo.orientation);
+		// 	}
+		// }
 
 		const getNotes = () => {
 			const fignerData = FIGNER_INSTRUMENT_DATA[data.subject as keyof typeof FIGNER_INSTRUMENT_DATA];
@@ -182,9 +182,9 @@ export default defineComponent({
 				emit("close");
 				return;
 			} else {
-				if (fingerData.fingeringInfo.orientation === 0) {
-					api_setRequestedOrientation(1);
-				}
+				// if (fingerData.fingeringInfo.orientation === 0) {
+				// 	api_setRequestedOrientation(1);
+				// }
 			}
 			// 不在APP中,
 			if (!storeData.isApp) {

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

@@ -89,6 +89,10 @@ export const mappingVoicePart = (
 		};
 		return subject[id];
 	} else if (soruce === "INSTRUMENT") {
+		let code = id
+		if (typeof code === 'string') {
+			code = code.toLocaleLowerCase().replace(/ /g, '')
+		}
 		const subject: { [_key: string | number]: any } = {
 			flute: 2,
 			clarinet: 4,
@@ -118,7 +122,7 @@ export const mappingVoicePart = (
 			ocarina: "ocarina",
 			nai: "melodica",
 		};
-		return subject[id] || 0;
+		return subject[code] || 0;
 	}
 	return 0;
 };