Prechádzať zdrojové kódy

Merge branch 'feature-tianyong-newVersion' of http://git.dayaedu.com/liushengqiang/music-score into hqyDevNewVersion

黄琪勇 11 mesiacov pred
rodič
commit
542cc123c2

+ 0 - 1
src/page-instrument/header-top/index.tsx

@@ -53,7 +53,6 @@ export const headTopData = reactive({
     }
     if (value === "practise") {
       // state.playIngSpeed = state.speed
-      smoothAnimationState.isShow.value = state.setting.melodyLine;
     }
     if (value === "evaluating") {
       // 如果延迟检测资源还在加载中,给出提示

+ 5 - 2
src/page-instrument/header-top/modeView.tsx

@@ -107,7 +107,7 @@ export default defineComponent({
           src={backImg}
           class={styles.back}
           onClick={() => {
-            smoothAnimationState.isShow.value = state.setting.melodyLine;
+            smoothAnimationState.isShow.value = state.melodyLine;
             // 返回的时候 跳转到之前记录的模式
             if(headTopData.oldModeType !== "practise"){
               headTopData.handleChangeModeType(headTopData.oldModeType)
@@ -117,7 +117,10 @@ export default defineComponent({
         />
         <img src={nameImg} class={styles.name} />
         <div class={[styles.modeBox, ((!state.isPercussion && !state.enableEvaluation) || (state.isPercussion && state.enableEvaluation) || (state.isPercussion && !state.enableEvaluation)) && styles.twoModeBox]}>
-          <Vue3Lottie ref={modeImgDom1} class={styles.modeImg} animationData={lxMode} autoPlay={false} loop={true} onClick={() => headTopData.handleChangeModeType("practise")}></Vue3Lottie>
+          <Vue3Lottie ref={modeImgDom1} class={styles.modeImg} animationData={lxMode} autoPlay={false} loop={true} onClick={() => {
+            smoothAnimationState.isShow.value = state.melodyLine;
+            headTopData.handleChangeModeType("practise")
+            } }></Vue3Lottie>
           {!state.isPercussion && <Vue3Lottie ref={modeImgDom2} class={styles.modeImg} animationData={glMode} autoPlay={false} loop={true} onClick={() => headTopData.handleChangeModeType("follow")}></Vue3Lottie>}
           {state.enableEvaluation && <Vue3Lottie ref={modeImgDom3} class={styles.modeImg} animationData={pcMode} autoPlay={false} loop={true} onClick={() => headTopData.handleChangeModeType("evaluating")}></Vue3Lottie>}
         </div>

+ 1 - 1
src/page-instrument/header-top/settting/index.tsx

@@ -69,7 +69,7 @@ export default defineComponent({
                                     <Switch 
                                         v-model={smoothAnimationState.isShow.value}
                                         onChange={(value) => {
-                                            state.setting.melodyLine = value
+                                            state.melodyLine = value
                                         }}                                        
                                     ></Switch>
                                 </div>   

+ 2 - 2
src/state.ts

@@ -425,8 +425,6 @@ const state = reactive({
     reactionTimeMs: 0,
     /** 节拍器音量 */
     beatVolume: 50,
-    /** 旋律线开关 */
-    melodyLine: true,
   },
   /** 后台设置的基准评测频率 */
   baseFrequency: 440,
@@ -551,6 +549,8 @@ const state = reactive({
   isCreateImg: false,
   /** 切换谱面后,作业选段是否需要刷新 */
   workSectionNeedReset: false,
+  /** 旋律线开关 */
+  melodyLine: true,
 });
 const browserInfo = browser();
 let offset_duration = 0;