liushengqiang 2 年之前
父节点
当前提交
c5d60dd1a1

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

@@ -334,6 +334,7 @@ export default defineComponent({
 		);
 		/** 指法预览切换 */
 		watch(() => detailData.fingerPreView, () => {
+			console.log(2342)
 			window.parent.postMessage(
 				{
 					api: "api_fingerPreView",
@@ -364,9 +365,13 @@ export default defineComponent({
 			// 	url: url,
 			// 	orientation: state.fingeringInfo.orientation || 0,
 			// });
-			detailData.fingerPreView = true;
+			
 			if (state.playState === 'play') {
 				togglePlay('paused')
+				setTimeout(() => {
+					detailData.fingerPreView = true;
+				}, 500)
+				return
 			}
 		};
 		const handleCloseFignerView = () => {

+ 3 - 0
src/page-instrument/view-figner/index.module.less

@@ -332,6 +332,9 @@
         &.disabled {
             color: rgba(69, 143, 177, .32);
         }
+        &::before{
+            opacity: 0 !important;
+        }
     }
 }
 

+ 2 - 10
src/page-instrument/view-figner/index.tsx

@@ -60,8 +60,6 @@ export default defineComponent({
 			tips: [] as IFIGNER_INSTRUMENT_Note[],
 
 			tnoteShow: false,
-			scrollLeftBtnDisabled: false, // 左按钮
-			scrollRightBtnDisabled: false, // 右按钮
 		});
 		const fingerData = reactive({
 			relationshipIndex: 0,
@@ -225,12 +223,6 @@ export default defineComponent({
 				left: type === 'left' ? -width : width,
 				behavior: 'smooth'
 			})
-			nextTick(() => {
-				setTimeout(() => {
-					data.scrollLeftBtnDisabled = (noteBoxRef.value as unknown as HTMLElement).scrollLeft === 0;
-					data.scrollRightBtnDisabled = (noteBoxRef.value as unknown as HTMLElement).scrollLeft >= (noteBoxRef.value as unknown as HTMLElement).scrollWidth / 2;
-				}, 300)
-			})
 		}
 
 		/** 滚轮缩放 */
@@ -346,7 +338,7 @@ export default defineComponent({
 								</div>
 							</div>
 							<div class={styles.notes}>
-								<Button class={[styles.noteBtn, data.scrollLeftBtnDisabled && styles.disabled]} onClick={() => scrollNoteBox('left')}>
+								<Button class={styles.noteBtn} onClick={() => scrollNoteBox('left')}>
 									<Icon name="arrow-left" />
 								</Button>
 								<div class={[styles.noteContent, browsInfo.ios ? '' : styles.noteContentWrap]}>
@@ -382,7 +374,7 @@ export default defineComponent({
 										})}
 									</div>
 								</div>
-								<Button class={[styles.noteBtn, data.scrollRightBtnDisabled && styles.disabled]} onClick={() => scrollNoteBox('right')}>
+								<Button class={styles.noteBtn} onClick={() => scrollNoteBox('right')}>
 									<Icon name="arrow" />
 								</Button>
 							</div>