Browse Source

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

TIANYONG 11 months ago
parent
commit
bfed33832a

+ 1 - 1
src/page-instrument/component/authorName/index.module.less

@@ -1,5 +1,5 @@
 .authorName{
 .authorName{
-    height: 1.8rem;
+    height: 1.8rem; // 与smoothAnimationBox高度对应
 }
 }
 .title{
 .title{
     width: 280px;
     width: 280px;

+ 1 - 0
src/page-instrument/header-top/settting/index.module.less

@@ -256,6 +256,7 @@
                                 font-weight: 600;
                                 font-weight: 600;
                                 font-size: 15px;
                                 font-size: 15px;
                                 color: #1CACF1;
                                 color: #1CACF1;
+                                caret-color: #1cacf1;
                             }
                             }
                         }
                         }
                     }
                     }

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

@@ -87,6 +87,18 @@ export default defineComponent({
                                 </div>
                                 </div>
                         }                        
                         }                        
                         {
                         {
+                            state.isSingleLine && state.modeType === "practise" && !state.isCombineRender && !state.isPercussion && 
+                                <div class={styles.cellBox}>
+                                <div class={styles.tit}>旋律线</div>
+                                    <Switch 
+                                        v-model={smoothAnimationState.isShow.value}
+                                        onChange={(value) => {
+                                            state.melodyLine = value
+                                        }}                                        
+                                    ></Switch>
+                                </div>   
+                        }
+                        {
                             state.modeType === 'practise' && state.mingSong && state.mingSongGirl &&
                             state.modeType === 'practise' && state.mingSong && state.mingSongGirl &&
                             <div class={styles.cellBox}>
                             <div class={styles.cellBox}>
                                 <div class={styles.tit}>唱名类型</div>
                                 <div class={styles.tit}>唱名类型</div>
@@ -104,19 +116,7 @@ export default defineComponent({
                                     }
                                     }
                                 </div>
                                 </div>
                             </div>                     
                             </div>                     
-                        }
-                        {
-                            state.isSingleLine && state.modeType === "practise" && !state.isCombineRender && !state.isPercussion && 
-                                <div class={styles.cellBox}>
-                                <div class={styles.tit}>旋律线</div>
-                                    <Switch 
-                                        v-model={smoothAnimationState.isShow.value}
-                                        onChange={(value) => {
-                                            state.melodyLine = value
-                                        }}                                        
-                                    ></Switch>
-                                </div>   
-                        }                           
+                        }                        
                         {
                         {
                             state.modeType === "evaluating" && 
                             state.modeType === "evaluating" && 
                             <>                       
                             <>                       
@@ -213,9 +213,9 @@ export default defineComponent({
                                                     return
                                                     return
                                                 }
                                                 }
                                                 headTopData.settingMode = false
                                                 headTopData.settingMode = false
-                                                state.isSingleLine = item.value 
                                                 // resetRenderMusicScore(state.musicRenderType)
                                                 // resetRenderMusicScore(state.musicRenderType)
                                                 const _time = setTimeout(() => {
                                                 const _time = setTimeout(() => {
+                                                    state.isSingleLine = item.value 
                                                     clearTimeout(_time)
                                                     clearTimeout(_time)
                                                     refreshMusicSvg();
                                                     refreshMusicSvg();
                                                 }, 100);
                                                 }, 100);
@@ -238,9 +238,9 @@ export default defineComponent({
                                                     return
                                                     return
                                                 }
                                                 }
                                                 headTopData.settingMode = false
                                                 headTopData.settingMode = false
-                                                state.musicRenderType = item.value as any
                                                 // resetRenderMusicScore(state.musicRenderType)
                                                 // resetRenderMusicScore(state.musicRenderType)
                                                 const _time = setTimeout(() => {
                                                 const _time = setTimeout(() => {
+                                                    state.musicRenderType = item.value as any
                                                     clearTimeout(_time)
                                                     clearTimeout(_time)
                                                     refreshMusicSvg();
                                                     refreshMusicSvg();
                                                 }, 100);
                                                 }, 100);

+ 12 - 2
src/page-instrument/view-detail/index.module.less

@@ -36,6 +36,16 @@
         width: 100%;
         width: 100%;
         height: 100%;
         height: 100%;
         object-fit: cover; /* 保持宽高比 */
         object-fit: cover; /* 保持宽高比 */
+        z-index: -1;
+        &.practise{
+            background-color: #213793;
+        }        
+        &.follow{
+            background-color: #114067;
+        }        
+        &.evaluating{
+            background-color: #142979;
+        }
     }
     }
     .headHeight {
     .headHeight {
         position: absolute;
         position: absolute;
@@ -68,8 +78,8 @@
         overflow: hidden;
         overflow: hidden;
         :global{
         :global{
             #musicAndSelection {
             #musicAndSelection {
-                // 其他位置 这个高度留白是36,这里加了一点,让旋律线靠下一点
-                padding-top: 40px;
+                --musicAndSelectionTop: 40px;
+                padding-top: var(--musicAndSelectionTop);
             }
             }
         }
         }
     }
     }

+ 4 - 1
src/page-instrument/view-detail/index.tsx

@@ -526,7 +526,10 @@ export default defineComponent({
             style={{opacity: state.setting.camera && state.modeType === 'evaluating' ? state.setting.cameraOpacity / 100 : 1}} 
             style={{opacity: state.setting.camera && state.modeType === 'evaluating' ? state.setting.cameraOpacity / 100 : 1}} 
             class={styles.pageBg} 
             class={styles.pageBg} 
             src={state.modeType === 'practise' ? bgJsonData.value[1] : state.modeType === 'evaluating' ? bgJsonData.value[2] : state.modeType === 'follow' ? bgJsonData.value[3] : ''} 
             src={state.modeType === 'practise' ? bgJsonData.value[1] : state.modeType === 'evaluating' ? bgJsonData.value[2] : state.modeType === 'follow' ? bgJsonData.value[3] : ''} 
-          /> : null    
+          /> : <div 
+                style={{opacity: state.setting.camera && state.modeType === 'evaluating' ? state.setting.cameraOpacity / 100 : 1}}  
+                class={[styles.pageBg, styles[state.modeType]]} >
+              </div>    
         }
         }
         {
         {
           state.modeType === 'evaluating' ? <>
           state.modeType === 'evaluating' ? <>

+ 3 - 2
src/page-instrument/view-detail/smoothAnimation/index.less

@@ -8,7 +8,8 @@
 #musicAndSelection.singleLineMusicBox{
 #musicAndSelection.singleLineMusicBox{
     .smoothAnimationBox{
     .smoothAnimationBox{
         display: flex;
         display: flex;
-        align-items: center;
+        align-items: flex-end;
+        height: 1.8rem; // 与authorName高度对应
         &.smoothAnimationBoxHide{
         &.smoothAnimationBoxHide{
             opacity: 0;
             opacity: 0;
             visibility: hidden;
             visibility: hidden;
@@ -37,7 +38,7 @@
         position: fixed;
         position: fixed;
         // position: absolute;
         // position: absolute;
         left: 0;
         left: 0;
-        top: 36px;
+        top: var(--musicAndSelectionTop);
         width: 100vw;
         width: 100vw;
     }
     }
 }
 }

+ 5 - 4
src/view/music-score/index.tsx

@@ -211,10 +211,11 @@ export default defineComponent({
 		const refreshMusicScore = async () => {
 		const refreshMusicScore = async () => {
 			console.log('刷新谱面123')
 			console.log('刷新谱面123')
 			isLoadingCss.value = true
 			isLoadingCss.value = true
-			const container = document.getElementById('musicAndSelection'), svgDom = document.getElementById('osmdCanvasPage1'), selectionBox = document.getElementById('selectionBox');
-			if (container && svgDom) {
-				container?.removeChild(svgDom)
-				container?.removeChild(selectionBox)
+			const container = document.getElementById('musicAndSelection'), svgDom = document.getElementById('osmdCanvasPage1'), selectionBox = document.getElementById('selectionBox'), selectionBgBox = document.getElementById('selectionBgBox');
+			if (container) {
+				svgDom && container?.removeChild(svgDom)
+				selectionBox && container?.removeChild(selectionBox)
+				selectionBgBox && container?.removeChild(selectionBgBox)
 			}
 			}
 			state.vfmeasures = [];
 			state.vfmeasures = [];
 			musicData.showSelection = false;
 			musicData.showSelection = false;

+ 2 - 3
src/view/plugins/toggleMusicSheet/choosePartName/index.module.less

@@ -120,12 +120,11 @@
     }
     }
   }
   }
   .button {
   .button {
+    display: block;
+    margin: 10px auto 0;
     cursor: pointer;
     cursor: pointer;
     width: 118px;
     width: 118px;
     height: 40px;
     height: 40px;
-    margin: 10px auto 0;
     z-index: 9;
     z-index: 9;
-    background: url("./imgs/okBtn.png") no-repeat;
-    background-size: 100% 100%;
   }
   }
 }
 }

+ 3 - 2
src/view/plugins/toggleMusicSheet/choosePartName/index.tsx

@@ -5,6 +5,7 @@ import state, { IPlatform } from "/src/state";
 import changeName from "./imgs/changeName.png"
 import changeName from "./imgs/changeName.png"
 import { headImg } from "/src/page-instrument/header-top/image";
 import { headImg } from "/src/page-instrument/header-top/image";
 import { toggleMusicSheet } from "../index"
 import { toggleMusicSheet } from "../index"
+import okBtn from "./imgs/okBtn.png"
 
 
 export default defineComponent({
 export default defineComponent({
   name: 'choosePartName',
   name: 'choosePartName',
@@ -75,7 +76,7 @@ export default defineComponent({
                 selectIndex.value = row.selectedValues[0]
                 selectIndex.value = row.selectedValues[0]
               }}
               }}
             />
             />
-            <div class={styles.button} onClick={() => {
+            <img src={ okBtn } class={styles.button} onClick={() => {
                 myPicker.value.confirm()
                 myPicker.value.confirm()
                 nextTick(()=>{
                 nextTick(()=>{
                   // console.log(1111,selectIndex.value)
                   // console.log(1111,selectIndex.value)
@@ -86,7 +87,7 @@ export default defineComponent({
                   }
                   }
                 })
                 })
               }
               }
-            }></div>
+            }></img>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>