Jelajahi Sumber

fix: #8720 bug修复

TIANYONG 1 tahun lalu
induk
melakukan
fddb12bf76

+ 1 - 1
src/page-instrument/header-top/index.module.less

@@ -25,7 +25,7 @@
         left: -30px;
         height: 100%;
         width: 50px;
-        background: #fff;
+        background: var(--container-background);
         z-index: 0;
     }
 }

+ 8 - 4
src/view/evaluating/index.tsx

@@ -194,12 +194,16 @@ export const handlePerformDetection = async () => {
 
 /** 记录小节分数 */
 export const addMeasureScore = (measureScore: any, show = true) => {
+	// #8720 bug修复
+	for(let idx in evaluatingData.evaluatings) {
+		evaluatingData.evaluatings[idx].show = false
+	}
 	evaluatingData.evaluatings[measureScore.measureRenderIndex] = {
 		...measureScore,
 		leve: getLeveByScoreMeasure(measureScore.score),
 		show,
 	};
-	// console.log("🚀 ~ measureScore:", evaluatingData.evaluatings[measureScore.measureRenderIndex])
+	// console.log("🚀 ~ measureScore:", evaluatingData.evaluatings)
 };
 
 const handleScoreResult = (res?: IPostMessage) => {
@@ -269,7 +273,7 @@ export const handleStartBegin = async () => {
 	await api_startRecording();
 
 	// 如果开启了摄像头, 开启录制视频
-	if (state.setting.camera && state.setting.saveToAlbum) {
+	if (state.setting.camera) {
 		console.log("开始录制视频");
 		api_startCapture();
 	}
@@ -288,7 +292,7 @@ const playMusic = async () => {
 	check_currentTime();
 
 	// 如果开启了摄像头, 开启录制视频
-	if (state.setting.camera && state.setting.saveToAlbum) {
+	if (state.setting.camera) {
 		console.log("开始录制视频");
 		api_startCapture();
 	}
@@ -345,7 +349,7 @@ export const handleEndEvaluat = (isComplete = false) => {
 	});
 	evaluatingData.isComplete = isComplete;
 	// 如果开启了摄像头, 结束录制视频
-	if (state.setting.camera && state.setting.saveToAlbum) {
+	if (state.setting.camera) {
 		console.log("结束录制视频");
 		api_endCapture();
 	}

+ 6 - 0
src/view/selection/index.tsx

@@ -209,6 +209,12 @@ export default defineComponent({
 			>
 				{selectData.staves.map((item: any) => {
 					const scoreItem = item.id && evaluatingData.evaluatings[item.measureListIndex];
+					// for(let idx in evaluatingData.evaluatings) {
+					// 	const { show, measureIndex } = evaluatingData.evaluatings[idx]
+					// 	if (show && measureIndex !== item.measureListIndex) {
+					// 		evaluatingData.evaluatings[idx].show = false
+					// 	}
+					// }
 					// 高级模式下,显示节拍线
 					// 不是报告模式
 					// 不是多小节休止符