|
@@ -216,7 +216,8 @@ export default defineComponent({
|
|
|
// };
|
|
|
|
|
|
// 切换当前模式
|
|
|
- const onChangeFingeringModel = () => {
|
|
|
+ const onChangeFingeringModel = (e: any) => {
|
|
|
+ e.stopPropagation();
|
|
|
//
|
|
|
if (playAction.listenLock) return;
|
|
|
if (playAction.showAnswerLoading) return;
|
|
@@ -479,7 +480,12 @@ export default defineComponent({
|
|
|
// 判断乐器是否移动
|
|
|
const instrumentTranstion = computed(() => {
|
|
|
const transform = data.transform;
|
|
|
- if (transform.scale !== 1 || transform.x !== 0 || transform.y !== 0 || transform.startScale !== 1 || transform.startX !== 0 || transform.startY !== 0) {
|
|
|
+
|
|
|
+ let scale = 1;
|
|
|
+ if (data.subject === "pan-flute") {
|
|
|
+ scale = 0.9;
|
|
|
+ }
|
|
|
+ if (transform.scale !== scale || transform.x !== 0 || transform.y !== 0 || transform.startScale !== scale || transform.startX !== 0 || transform.startY !== 0) {
|
|
|
return true;
|
|
|
} else {
|
|
|
return false;
|
|
@@ -511,6 +517,21 @@ export default defineComponent({
|
|
|
resetMode(true, 0);
|
|
|
handleStop();
|
|
|
gaumntPause();
|
|
|
+
|
|
|
+ // 重置乐器
|
|
|
+ if (res?.data?.data.code) {
|
|
|
+ data.subject = code;
|
|
|
+ data.viewIndex = 0;
|
|
|
+ data.tipShow = false;
|
|
|
+ data.loadingDom = true;
|
|
|
+ fingerData.fingeringInfo = subjectFingering(data.subject);
|
|
|
+ data.activeTone = {} as any;
|
|
|
+ resetElement();
|
|
|
+ // 设置屏幕方向
|
|
|
+ setTimeout(() => {
|
|
|
+ __init();
|
|
|
+ }, 100);
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -937,7 +958,19 @@ export default defineComponent({
|
|
|
const rs: number[] = Array.isArray(relationship[1]) ? relationship[fingerData.relationshipIndex] : relationship;
|
|
|
const canTizhi = Array.isArray(relationship[1]);
|
|
|
return (
|
|
|
- <div class={[styles.fingerBox, state.platform !== IPlatform.PC && !query.modelType && fingerData.fingeringInfo.orientation === 1 ? styles.fingerBottom : styles.fingerRight, data.linkSource === "class" ? styles.linkSourceClass : ""]}>
|
|
|
+ <div
|
|
|
+ class={[styles.fingerBox, state.platform !== IPlatform.PC && !query.modelType && fingerData.fingeringInfo.orientation === 1 ? styles.fingerBottom : styles.fingerRight, data.linkSource === "class" ? styles.linkSourceClass : ""]}
|
|
|
+ onClick={() => {
|
|
|
+ if (data.linkSource === "class") {
|
|
|
+ window.parent.postMessage(
|
|
|
+ {
|
|
|
+ api: "clickViewFigner",
|
|
|
+ },
|
|
|
+ "*"
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ >
|
|
|
<div
|
|
|
class={styles.head}
|
|
|
style={{
|
|
@@ -953,6 +986,7 @@ export default defineComponent({
|
|
|
<div
|
|
|
class={[styles.baseBtn, styles.changeInstrumentBtn]}
|
|
|
onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
//
|
|
|
// 播放音阶时不能切换
|
|
|
if (playStatus.gamut) {
|
|
@@ -1024,11 +1058,22 @@ export default defineComponent({
|
|
|
{playAction.userAnswerStatus === 2 && <div class={[styles.tipsT, styles.playError]}></div>}
|
|
|
{playAction.resetAction && <div class={[styles.tipsT, styles.playTips5]}></div>}
|
|
|
{((data.noteType !== "#c" && (orientationDirection.value === 0 || (orientationDirection.value === 1 && state.platform === IPlatform.PC))) || (orientationDirection.value === 1 && state.platform === IPlatform.APP)) && (
|
|
|
- <Button class={styles.noteBtn} onClick={() => scrollNoteBox("left")}>
|
|
|
+ <Button
|
|
|
+ class={styles.noteBtn}
|
|
|
+ onClick={(e: any) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ scrollNoteBox("left");
|
|
|
+ }}
|
|
|
+ >
|
|
|
<Icon name="arrow-left" />
|
|
|
</Button>
|
|
|
)}
|
|
|
- <div class={[styles.noteContent, data.fingeringMode !== "scaleMode" && orientationDirection.value === 0 && styles.noteContentOther, browsInfo.ios ? "" : styles.noteContentWrap, data.huaweiPad && styles.huaweiPad]}>
|
|
|
+ <div
|
|
|
+ class={[styles.noteContent, data.fingeringMode !== "scaleMode" && orientationDirection.value === 0 && styles.noteContentOther, browsInfo.ios ? "" : styles.noteContentWrap, data.huaweiPad && styles.huaweiPad]}
|
|
|
+ onClick={(e: any) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ }}
|
|
|
+ >
|
|
|
{/* 判断是否为音阶模式 */}
|
|
|
{data.fingeringMode !== "scaleMode" && (
|
|
|
<div draggable={false} class={styles.note} onClick={noteChangeShow}>
|
|
@@ -1107,13 +1152,24 @@ export default defineComponent({
|
|
|
</div>
|
|
|
</div>
|
|
|
{((data.noteType !== "#c" && (orientationDirection.value === 0 || (orientationDirection.value === 1 && state.platform === IPlatform.PC))) || (orientationDirection.value === 1 && state.platform === IPlatform.APP)) && (
|
|
|
- <Button class={styles.noteBtn} onClick={() => scrollNoteBox("right")}>
|
|
|
+ <Button
|
|
|
+ class={styles.noteBtn}
|
|
|
+ onClick={(e: any) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ scrollNoteBox("right");
|
|
|
+ }}
|
|
|
+ >
|
|
|
<Icon name="arrow" />
|
|
|
</Button>
|
|
|
)}
|
|
|
</div>
|
|
|
{data.fingeringMode !== "scaleMode" && (
|
|
|
- <div class={styles.optionBtns}>
|
|
|
+ <div
|
|
|
+ class={styles.optionBtns}
|
|
|
+ onClick={(e: any) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ }}
|
|
|
+ >
|
|
|
<Button class={[styles.oBtn, styles.gamut, playStatus.action && styles.disabled]} round onClick={onGamutPlayOrPause}>
|
|
|
{playStatus.gamut ? "暂停" : "播放音阶"}
|
|
|
</Button>
|
|
@@ -1126,7 +1182,12 @@ export default defineComponent({
|
|
|
</div>
|
|
|
)}
|
|
|
</div>
|
|
|
- <div class={[styles.tips, data.loadingDom ? styles.hiddens : "", data.tipShow ? "" : styles.tipHidden]}>
|
|
|
+ <div
|
|
|
+ class={[styles.tips, data.loadingDom ? styles.hiddens : "", data.tipShow ? "" : styles.tipHidden]}
|
|
|
+ onClick={(e: any) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ }}
|
|
|
+ >
|
|
|
<div class={styles.tipTitle}>
|
|
|
<div class={styles.tipTitleName}>{fingerData.fingeringInfo.code}使用说明</div>
|
|
|
<Button class={styles.tipClose} onClick={() => (data.tipShow = false)}>
|
|
@@ -1165,6 +1226,9 @@ export default defineComponent({
|
|
|
paddingTop: data.paddingTop ? data.paddingTop : "",
|
|
|
paddingLeft: data.paddingLeft ? data.paddingLeft : "",
|
|
|
}}
|
|
|
+ onClick={(e: any) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ }}
|
|
|
>
|
|
|
<div class={styles.rightBtn}>
|
|
|
{data.subject !== "melodica" && data.fingeringMode === "scaleMode" && (
|
|
@@ -1240,7 +1304,14 @@ export default defineComponent({
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <Popup class="tonePopup" v-model:show={data.tnoteShow} position={state.platform !== IPlatform.PC && !query.modelType && fingerData.fingeringInfo.orientation === 1 ? "bottom" : "right"}>
|
|
|
+ <Popup
|
|
|
+ class="tonePopup"
|
|
|
+ v-model:show={data.tnoteShow}
|
|
|
+ position={state.platform !== IPlatform.PC && !query.modelType && fingerData.fingeringInfo.orientation === 1 ? "bottom" : "right"}
|
|
|
+ onClick={(e: any) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ }}
|
|
|
+ >
|
|
|
<div class={styles.tones}>
|
|
|
<div class={styles.toneTitle}>
|
|
|
<div class={styles.tipTitleName}>移调</div>
|
|
@@ -1304,7 +1375,13 @@ export default defineComponent({
|
|
|
</div>
|
|
|
</Popup>
|
|
|
|
|
|
- <Popup v-model:show={data.changeSubjectShow} class={styles.changeSubjectPopup}>
|
|
|
+ <Popup
|
|
|
+ v-model:show={data.changeSubjectShow}
|
|
|
+ class={styles.changeSubjectPopup}
|
|
|
+ onClick={(e: any) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ }}
|
|
|
+ >
|
|
|
<ChangeSubject
|
|
|
subjectList={data.subjects}
|
|
|
subject={data.subject}
|
|
@@ -1328,7 +1405,7 @@ export default defineComponent({
|
|
|
data.changeSubjectShow = false;
|
|
|
// 设置屏幕方向
|
|
|
setTimeout(() => {
|
|
|
- const before = ["hulusi-flute", "piccolo", "baroque-recorder"].includes(originalSubject) ? 1 : 0;
|
|
|
+ const before = ["hulusi-flute", "piccolo", "baroque-recorder"].includes(originalSubject) ? 0 : 0;
|
|
|
if (orientationDirection.value !== before) {
|
|
|
data.paddingTop = "";
|
|
|
data.paddingLeft = "";
|