|
@@ -606,50 +606,53 @@ export default defineComponent({
|
|
|
}}
|
|
|
>
|
|
|
{/* 返回和标题 */}
|
|
|
- {
|
|
|
- !(state.playState == "play" || followData.start || evaluatingData.startBegin) &&
|
|
|
- <div class={styles.headTopLeftBox}>
|
|
|
- <img src={iconBack} class={['headTopBackBtn', styles.img, !headTopData.showBack && styles.hidenBack]} onClick={handleBack} />
|
|
|
- {
|
|
|
- smoothAnimationState.isShow.value ?
|
|
|
- <div class={[styles.title,isMusicList.value && styles.isMusicList, "driver-8"]} onClick={()=>{
|
|
|
- isMusicList.value && (musicListShow.value = true)
|
|
|
- }}>
|
|
|
- <NoticeBar
|
|
|
- text={state.examSongName}
|
|
|
- background="none"
|
|
|
- />
|
|
|
- </div> :
|
|
|
- isMusicList.value &&
|
|
|
- <img src={listImg} class={[styles.img, styles.listImg, "driver-8"]} onClick={()=>{
|
|
|
- musicListShow.value = true
|
|
|
- }} />
|
|
|
- }
|
|
|
- </div>
|
|
|
- }
|
|
|
- {/* 模式切换 */}
|
|
|
- {
|
|
|
- <div
|
|
|
- id={state.platform === IPlatform.PC ? "teacherTop-0" : "studnetT-0"}
|
|
|
- style={{ display: toggleBtn.value.display ? "" : "none" }}
|
|
|
- class={["driver-9", styles.modeChangeBox, toggleBtn.value.disabled && styles.disabled]}
|
|
|
- onClick={() => {
|
|
|
- handleRessetState();
|
|
|
- headTopData.modeType = "init";
|
|
|
- }}
|
|
|
- >
|
|
|
- <img class={styles.img} src={iconMode} />
|
|
|
- <div class={styles.title}>{state.modeType==="practise" ? '练习模式' : state.modeType==="follow" ? "跟练模式" : state.modeType==="evaluating" ? "评测模式" : ""}</div>
|
|
|
+ {!(state.playState == "play" || followData.start || evaluatingData.startBegin) && (
|
|
|
+ <div class={styles.headTopLeftBox}>
|
|
|
+ <img src={iconBack} class={["headTopBackBtn", styles.img, !headTopData.showBack && styles.hidenBack]} onClick={handleBack} />
|
|
|
+ {smoothAnimationState.isShow.value ? (
|
|
|
+ <div
|
|
|
+ class={[styles.title, isMusicList.value && styles.isMusicList, "driver-8"]}
|
|
|
+ onClick={() => {
|
|
|
+ isMusicList.value && (musicListShow.value = true);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <NoticeBar text={state.examSongName} background="none" />
|
|
|
+ </div>
|
|
|
+ ) : (
|
|
|
+ isMusicList.value && (
|
|
|
+ <img
|
|
|
+ src={listImg}
|
|
|
+ class={[styles.img, styles.listImg, "driver-8"]}
|
|
|
+ onClick={() => {
|
|
|
+ musicListShow.value = true;
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )
|
|
|
+ )}
|
|
|
</div>
|
|
|
- }
|
|
|
+ )}
|
|
|
+ {/* 模式切换 */}
|
|
|
+
|
|
|
+ <div
|
|
|
+ id={state.platform === IPlatform.PC ? "teacherTop-0" : "studnetT-0"}
|
|
|
+ style={{ display: toggleBtn.value.display ? "" : "none" }}
|
|
|
+ class={["driver-9", styles.modeChangeBox, toggleBtn.value.disabled && styles.disabled]}
|
|
|
+ onClick={() => {
|
|
|
+ handleRessetState();
|
|
|
+ headTopData.modeType = "init";
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <img class={styles.img} src={iconMode} />
|
|
|
+ <div class={styles.title}>{state.modeType === "practise" ? "练习模式" : state.modeType === "follow" ? "跟练模式" : state.modeType === "evaluating" ? "评测模式" : ""}</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
{/* 模式提醒 */}
|
|
|
- {
|
|
|
- state.modeType === "practise" &&
|
|
|
- <div class={[styles.modeWarn, "practiseModeWarn", state.platform === IPlatform.PC && state.musicScoreBtnDirection === "left" ? styles.modeWarnRight : ""]}>
|
|
|
- <img src={state.playType === "play" ? headImg("perform1.png") : headImg("sing1.png")} />
|
|
|
- <div>{state.playType === "play" ? "演奏场景" : "演唱场景"}</div>
|
|
|
- </div>
|
|
|
- }
|
|
|
+ {state.modeType === "practise" && (
|
|
|
+ <div class={[styles.modeWarn, "practiseModeWarn", state.platform === IPlatform.PC && state.musicScoreBtnDirection === "left" ? styles.modeWarnRight : ""]}>
|
|
|
+ <img src={state.playType === "play" ? headImg("perform1.png") : headImg("sing1.png")} />
|
|
|
+ <div>{state.playType === "play" ? "演奏场景" : "演唱场景"}</div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
{/* 功能按钮 */}
|
|
|
<div
|
|
|
class={[styles.headRight]}
|
|
@@ -698,24 +701,24 @@ export default defineComponent({
|
|
|
state.playSource = state.music ? "music" : "background";
|
|
|
}
|
|
|
// 有指法并且显示指法的时候 切换到演唱模式 需要影藏指法
|
|
|
- let isRefresh = false
|
|
|
- if(state.isShowFingering && state.fingeringInfo.name && (state.setting.displayFingering || displayFingeringCache)){
|
|
|
- if(state.playType === "sing"){
|
|
|
- state.setting.displayFingering = false
|
|
|
- displayFingeringCache = true
|
|
|
+ let isRefresh = false;
|
|
|
+ if (state.isShowFingering && state.fingeringInfo.name && (state.setting.displayFingering || displayFingeringCache)) {
|
|
|
+ if (state.playType === "sing") {
|
|
|
+ state.setting.displayFingering = false;
|
|
|
+ displayFingeringCache = true;
|
|
|
} else {
|
|
|
- state.setting.displayFingering = displayFingeringCache
|
|
|
- displayFingeringCache = false
|
|
|
+ state.setting.displayFingering = displayFingeringCache;
|
|
|
+ displayFingeringCache = false;
|
|
|
}
|
|
|
// 如果是竖屏指法和一行谱的时候 改变指法值的时候state 会调用刷新 refreshMusicSvg 所以下面不调用
|
|
|
if (state.fingeringInfo.direction === "vertical" && !state.isSingleLine) {
|
|
|
- isRefresh = true
|
|
|
+ isRefresh = true;
|
|
|
}
|
|
|
}
|
|
|
// 有歌词的时候,切换播放模式,需要重新渲染谱面 指法不刷新谱面的时候
|
|
|
if (state.xmlHasLyric && !isRefresh) {
|
|
|
refreshMusicSvg();
|
|
|
- } else if(!isRefresh) {
|
|
|
+ } else if (!isRefresh) {
|
|
|
handlerModeChange(oldPlayType, oldPlaySource, true);
|
|
|
}
|
|
|
showToast({
|
|
@@ -749,7 +752,7 @@ export default defineComponent({
|
|
|
}
|
|
|
handlerModeChange(oldPlayType, oldPlaySource);
|
|
|
showToast({
|
|
|
- message: state.playType === "play" ? (state.playSource === "music"?"已切换为原声":"已切换为伴奏") : (state.playSource === "music"?"已切换为范唱":(state.playSource === "background"?"已切换为伴唱":"已切换为唱名")),
|
|
|
+ message: state.playType === "play" ? (state.playSource === "music" ? "已切换为原声" : "已切换为伴奏") : state.playSource === "music" ? "已切换为范唱" : state.playSource === "background" ? "已切换为伴唱" : "已切换为唱名",
|
|
|
position: "top",
|
|
|
className: "selectionToast",
|
|
|
});
|
|
@@ -878,7 +881,8 @@ export default defineComponent({
|
|
|
<PractiseDriver
|
|
|
statusAll={{
|
|
|
subjectStatus: state.musicRendered && !query.lessonTrainingId && !query.questionId && state.isConcert,
|
|
|
- modelTypeStatus: toggleBtn.value.display
|
|
|
+ modelTypeStatus: toggleBtn.value.display,
|
|
|
+ playType: playTypeBtn.value.display,
|
|
|
}}
|
|
|
/>
|
|
|
)}
|