|
@@ -359,7 +359,7 @@ export default defineComponent({
|
|
|
/** 原声按钮 */
|
|
|
const originBtn = computed(() => {
|
|
|
// 没有音源不显示
|
|
|
- if(state.noMusicSource) return { display: false, disabled: false };
|
|
|
+ if (state.noMusicSource) return { display: false, disabled: false };
|
|
|
// 选择模式,跟练模式 不显示
|
|
|
if (headTopData.modeType !== "show" || state.modeType === "follow") return { display: false, disabled: false };
|
|
|
// 评测开始 禁用
|
|
@@ -416,9 +416,9 @@ export default defineComponent({
|
|
|
});
|
|
|
/** 模式切换按钮 */
|
|
|
const toggleBtn = computed(() => {
|
|
|
- if(state.isCombineRender) return { display: false, disabled: false };
|
|
|
+ if (state.isCombineRender) return { display: false, disabled: false };
|
|
|
// 没有音源不显示
|
|
|
- if(state.noMusicSource) return { display: false, disabled: false };
|
|
|
+ if (state.noMusicSource) return { display: false, disabled: false };
|
|
|
// 不是演奏模式 影藏
|
|
|
if (state.playType !== "play") return { display: false, disabled: false };
|
|
|
// 选择模式, url设置模式 不显示
|
|
@@ -435,7 +435,7 @@ export default defineComponent({
|
|
|
/** 播放按钮 */
|
|
|
const playBtn = computed(() => {
|
|
|
// 没有音源不显示
|
|
|
- if(state.noMusicSource) return { display: false, disabled: false };
|
|
|
+ if (state.noMusicSource) return { display: false, disabled: false };
|
|
|
// 选择模式 不显示
|
|
|
if (headTopData.modeType !== "show") return { display: false, disabled: false };
|
|
|
// 评测模式 不显示,跟练模式 不显示
|
|
@@ -451,7 +451,7 @@ export default defineComponent({
|
|
|
/** 重播按钮 */
|
|
|
resetBtn = computed(() => {
|
|
|
// 没有音源不显示
|
|
|
- if(state.noMusicSource) return { display: false, disabled: false };
|
|
|
+ if (state.noMusicSource) return { display: false, disabled: false };
|
|
|
// 选择模式 不显示
|
|
|
if (headTopData.modeType !== "show") return { display: false, disabled: false };
|
|
|
// 评测模式 不显示,跟练模式 不显示
|
|
@@ -587,16 +587,20 @@ export default defineComponent({
|
|
|
onUnmounted(() => {
|
|
|
window.removeEventListener("message", changePlay);
|
|
|
});
|
|
|
- const noticeBarWidth = ref<number>()
|
|
|
- watch(()=>smoothAnimationState.isShow.value, ()=>{
|
|
|
- // NoticeBar能不能滚动
|
|
|
- if((smoothAnimationState.isShow.value || state.isCombineRender) && isMusicList.value){
|
|
|
- nextTick(()=>{
|
|
|
- const widthCon = (document.querySelector("#noticeBarRollDom .van-notice-bar__content") as any)?.offsetWidth || undefined
|
|
|
- noticeBarWidth.value = widthCon
|
|
|
- })
|
|
|
- }
|
|
|
- },{ immediate: true })
|
|
|
+ const noticeBarWidth = ref<number>();
|
|
|
+ watch(
|
|
|
+ () => smoothAnimationState.isShow.value,
|
|
|
+ () => {
|
|
|
+ // NoticeBar能不能滚动
|
|
|
+ if ((smoothAnimationState.isShow.value || state.isCombineRender) && isMusicList.value) {
|
|
|
+ nextTick(() => {
|
|
|
+ const widthCon = (document.querySelector("#noticeBarRollDom .van-notice-bar__content") as any)?.offsetWidth || undefined;
|
|
|
+ noticeBarWidth.value = widthCon;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ { immediate: true }
|
|
|
+ );
|
|
|
// 设置改变触发
|
|
|
watch(state.setting, () => {
|
|
|
console.log(state.setting, "state.setting");
|
|
@@ -647,37 +651,40 @@ export default defineComponent({
|
|
|
}}
|
|
|
>
|
|
|
{/* 返回和标题 */}
|
|
|
- {
|
|
|
- !(state.playState == "play" || followData.start || evaluatingData.startBegin) &&
|
|
|
- <div id="noticeBarRollDom" class={styles.headTopLeftBox}>
|
|
|
- <img src={iconBack} class={['headTopBackBtn', styles.img, !headTopData.showBack && styles.hidenBack]} onClick={handleBack} />
|
|
|
- {
|
|
|
- smoothAnimationState.isShow.value || state.isCombineRender ?
|
|
|
- <div
|
|
|
- style={
|
|
|
- noticeBarWidth.value ? {
|
|
|
- "--noticeBarWidth":noticeBarWidth.value + "px"
|
|
|
- } : {}
|
|
|
- }
|
|
|
- class={[styles.title, "driver-8"]}
|
|
|
- onClick={()=>{
|
|
|
- isMusicList.value && (musicListShow.value = true)
|
|
|
- }}>
|
|
|
- {
|
|
|
- isMusicList.value && <div class={styles.symbolNote}></div>
|
|
|
+ {!(state.playState == "play" || followData.start || evaluatingData.startBegin) && (
|
|
|
+ <div id="noticeBarRollDom" class={styles.headTopLeftBox}>
|
|
|
+ <img src={iconBack} class={["headTopBackBtn", styles.img, !headTopData.showBack && styles.hidenBack]} onClick={handleBack} />
|
|
|
+ {smoothAnimationState.isShow.value || state.isCombineRender ? (
|
|
|
+ <div
|
|
|
+ style={
|
|
|
+ noticeBarWidth.value
|
|
|
+ ? {
|
|
|
+ "--noticeBarWidth": noticeBarWidth.value + "px",
|
|
|
}
|
|
|
- <NoticeBar
|
|
|
- text={state.examSongName}
|
|
|
- background="none"
|
|
|
- />
|
|
|
- </div> :
|
|
|
- isMusicList.value &&
|
|
|
- <img src={listImg} class={[styles.img, styles.listImg, "driver-8"]} onClick={()=>{
|
|
|
- musicListShow.value = true
|
|
|
- }} />
|
|
|
- }
|
|
|
- </div>
|
|
|
- }
|
|
|
+ : {}
|
|
|
+ }
|
|
|
+ class={[styles.title, "headeTopTitleBtn"]}
|
|
|
+ onClick={() => {
|
|
|
+ isMusicList.value && (musicListShow.value = true);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {isMusicList.value && <div class={[styles.symbolNote, "driver-8"]}></div>}
|
|
|
+ <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
|
|
@@ -696,13 +703,12 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
{/* 模式提醒 */}
|
|
|
- {
|
|
|
- state.modeType === "practise" &&
|
|
|
+ {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>
|
|
|
- }
|
|
|
+ <img src={state.playType === "play" ? headImg("perform1.png") : headImg("sing1.png")} />
|
|
|
+ <div>{state.playType === "play" ? "演奏场景" : "演唱场景"}</div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
{/* 功能按钮 */}
|
|
|
<div
|
|
|
class={[styles.headRight]}
|
|
@@ -937,10 +943,12 @@ export default defineComponent({
|
|
|
{state.modeType === "practise" && headTopData.modeType !== "init" && !query.isCbs && state.audioDone && !state.isLoading && !state.isVip && showWebGuide.value && (
|
|
|
<PractiseDriver
|
|
|
statusAll={{
|
|
|
+ playBtnStatus: playBtn.value.display,
|
|
|
subjectStatus: state.musicRendered && !query.lessonTrainingId && !query.questionId && state.isConcert,
|
|
|
modelTypeStatus: toggleBtn.value.display,
|
|
|
playType: playTypeBtn.value.display,
|
|
|
originPlayType: state.playType === "play" ? true : false,
|
|
|
+ originBtnStatus: originBtn.value.display,
|
|
|
backTitle: !(state.playState == "play" || followData.start || evaluatingData.startBegin),
|
|
|
titleType: smoothAnimationState.isShow.value ? "TEXT" : isMusicList.value ? "IMG" : "NONE",
|
|
|
}}
|