liushengqiang 1 rok temu
rodzic
commit
eb7ea0f341

+ 1 - 1
src/page-instrument/component/the-music-list/list.tsx

@@ -20,7 +20,7 @@ export default defineComponent({
 			rows: 20,
 			musicSheetCategoriesId: state.musicSheetCategoriesId,
 			recentFlag: props.recentFlag ? true : null,
-			excludeMusicId: state.examSongId,
+			excludeMusicId: props.recentFlag ? null : state.examSongId,
 		});
 		const data = reactive({
 			list: [] as any[],

+ 36 - 16
src/page-instrument/view-figner/index.tsx

@@ -1,4 +1,14 @@
-import { PropType, computed, defineComponent, nextTick, onBeforeMount, onMounted, onUnmounted, reactive, ref } from "vue";
+import {
+	PropType,
+	computed,
+	defineComponent,
+	nextTick,
+	onBeforeMount,
+	onMounted,
+	onUnmounted,
+	reactive,
+	ref,
+} from "vue";
 import styles from "./index.module.less";
 import icons from "./image/icons.json";
 import { FIGNER_INSTRUMENT_DATA, IFIGNER_INSTRUMENT_Note } from "/src/view/figner-preview";
@@ -43,6 +53,7 @@ export default defineComponent({
 			notes: [] as IFIGNER_INSTRUMENT_Note[],
 			tones: [] as IFIGNER_INSTRUMENT_Note[],
 			activeTone: {} as IFIGNER_INSTRUMENT_Note,
+			popupActiveTone: {} as IFIGNER_INSTRUMENT_Note,
 			activeToneName: "",
 			soundFonts: {} as any,
 			viewIndex: 0,
@@ -72,6 +83,7 @@ export default defineComponent({
 				data.tones = fignerData.tones || [];
 				if (data.tones.length) {
 					data.activeTone = data.tones[0];
+					data.popupActiveTone = data.tones[0];
 				}
 				data.tips = fignerData.tips || [];
 				setNotes();
@@ -132,7 +144,7 @@ export default defineComponent({
 				data.realKey = 0;
 				data.noteAudio = null as unknown as Howl;
 			}
-		}
+		};
 
 		/** 返回 */
 		const handleBack = () => {
@@ -203,7 +215,7 @@ export default defineComponent({
 		watch(
 			() => pageVisible.value,
 			(val) => {
-				if (val === 'hidden') {
+				if (val === "hidden") {
 					console.log("页面隐藏停止播放");
 					handleStop();
 				}
@@ -216,14 +228,14 @@ export default defineComponent({
 			}
 		};
 
-		const noteBoxRef = ref()
-		const scrollNoteBox = (type: 'left' | 'right') => {
+		const noteBoxRef = ref();
+		const scrollNoteBox = (type: "left" | "right") => {
 			const width = noteBoxRef.value.offsetWidth / 2;
 			(noteBoxRef.value as unknown as HTMLElement).scrollBy({
-				left: type === 'left' ? -width : width,
-				behavior: 'smooth'
-			})
-		}
+				left: type === "left" ? -width : width,
+				behavior: "smooth",
+			});
+		};
 
 		/** 滚轮缩放 */
 		const handleWheel = (e: WheelEvent) => {
@@ -338,10 +350,10 @@ export default defineComponent({
 								</div>
 							</div>
 							<div class={styles.notes}>
-								<Button class={styles.noteBtn} onClick={() => scrollNoteBox('left')}>
+								<Button class={styles.noteBtn} onClick={() => scrollNoteBox("left")}>
 									<Icon name="arrow-left" />
 								</Button>
-								<div class={[styles.noteContent, browsInfo.ios ? '' : styles.noteContentWrap]}>
+								<div class={[styles.noteContent, browsInfo.ios ? "" : styles.noteContentWrap]}>
 									<div ref={noteBoxRef} class={styles.noteBox}>
 										{data.notes.map((note: IFIGNER_INSTRUMENT_Note, index: number) => {
 											const steps = new Array(Math.abs(note.step)).fill(1);
@@ -374,7 +386,7 @@ export default defineComponent({
 										})}
 									</div>
 								</div>
-								<Button class={styles.noteBtn} onClick={() => scrollNoteBox('right')}>
+								<Button class={styles.noteBtn} onClick={() => scrollNoteBox("right")}>
 									<Icon name="arrow" />
 								</Button>
 							</div>
@@ -459,9 +471,9 @@ export default defineComponent({
 											<Button
 												round
 												plain
-												type={data.activeTone.realName === tone.realName ? "primary" : "default"}
+												type={data.popupActiveTone.realName === tone.realName ? "primary" : "default"}
 												onClick={() => {
-													data.activeTone = tone;
+													data.popupActiveTone = tone;
 													setNotes();
 												}}
 											>
@@ -470,7 +482,7 @@ export default defineComponent({
 														全按作
 														<div class={[styles.noteKey, styles.hulusiNoteKey]}>
 															{tone.step > 0 ? <span class={styles.dot}></span> : null}
-															<div class={styles.noteName}>
+															<div class={styles.noteName} style={{ fontSize: "0.25rem" }}>
 																<sup>{tone.mark && (tone.mark === "rise" ? "#" : "b")}</sup>
 																{tone.key}
 															</div>
@@ -492,7 +504,15 @@ export default defineComponent({
 								<Button type="primary" round plain onClick={() => (data.tnoteShow = false)}>
 									取消
 								</Button>
-								<Button type="primary" round onClick={() => (data.tnoteShow = false)}>
+								<Button
+									type="primary"
+									round
+									onClick={() => {
+										data.activeTone = data.popupActiveTone;
+										setNotes();
+										data.tnoteShow = false;
+									}}
+								>
 									确定
 								</Button>
 							</Space>

Plik diff jest za duży
+ 0 - 0
src/view/fingering/fingering-img/pan-flute2/index.json


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików