Quellcode durchsuchen

style: 样式修改

TIANYONG vor 11 Monaten
Ursprung
Commit
1d0817f883

+ 1 - 1
src/helpers/customMusicScore.ts

@@ -592,7 +592,7 @@ const transSinglePage = () => {
 	if (state.isSingleLine && !state.isSimplePage) {
 		const svgPage = document?.getElementById('osmdSvgPage1')?.getBoundingClientRect();
 		const staffLine = document?.querySelector('.staffline')?.getBoundingClientRect();
-		if (svgPage && staffLine && svgPage.height > 130) {
+		if (svgPage && staffLine && svgPage.height > 200) {
 			// 需要上移的距离
 			console.log('need',svgPage.height,staffLine.height)
 			const rate = svgPage.height > 400 ? 1.2 : 2;

+ 1 - 0
src/page-instrument/evaluat-model/evaluat-result/index.module.less

@@ -98,6 +98,7 @@
         .scoreSection {
             display: flex;
             align-items: flex-end;
+            justify-content: center;
         }
 
         .text {

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

@@ -228,6 +228,7 @@
             top: -9px;
             display: flex;
             align-items: center;
+            justify-content: center;
             background: #FFC121;
             border-radius: 120px 120px 120px 1px;
             border: 1px solid #FFFFFF;
@@ -362,10 +363,12 @@
     }
     .modeBox {
         width: 100%;
-        margin-top: 90px;
         display: flex;
         justify-content: space-between;
         padding: 0 36px;
+        position: relative;
+        top: 50%;
+        transform: translateY(-50%);
         &.twoModeBox{
             justify-content: center;
             > .modeImg + .modeImg{

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

@@ -66,7 +66,7 @@ export default defineComponent({
 			  if (storeData.isApp && state.enableEvaluation) {
 				// 加载弹窗的开始时间
 				let startTime = +new Date();
-				state.loadingText = '节拍器准备中,请稍等…'
+				state.loadingText = res ? '节拍器准备中,请稍等…' : '节拍器关闭中,请稍等…';
 				state.isLoading = true;
 				const targetSrc = res ? state.beatSong.accompany || state.beatSong.music : state.accompany || state.music;
 				const resData = await api_updateMusicPlayer({

+ 2 - 2
src/page-instrument/view-detail/index.tsx

@@ -271,8 +271,8 @@ export default defineComponent({
         handleInitTick(osmd?.Sheet?.SheetPlaybackSetting?.Rhythm?.Numerator || 4);
       // }
       // api_cloudLoading();
-      state.playBtnDirection = query.imagePos === 'left' ? 'left' : 'right';
-      state.isAttendClass = (query.imagePos === 'left' || query.imagePos === 'right') ? true : false;
+      // state.playBtnDirection = query.imagePos === 'left' ? 'left' : 'right';
+      // state.isAttendClass = (query.imagePos === 'left' || query.imagePos === 'right') ? true : false;
       // if (state.fingeringInfo.direction === "vertical" && state.setting.displayFingering) {
       //   state.musicScoreBtnDirection = state.playBtnDirection === 'right' ? 'left' : 'right';
       // } else {

+ 5 - 0
src/page-instrument/view-evaluat-report/component/share-top/index.module.less

@@ -160,6 +160,11 @@
     }
 }
 
+.padMiddle {
+    .cItem {
+        width: 50px;
+    }
+}
 .right {
     display: flex;
     align-items: center;

+ 6 - 1
src/page-instrument/view-evaluat-report/component/share-top/index.tsx

@@ -81,6 +81,11 @@ export default defineComponent({
       return "video";
     });
 
+    // 资源类型
+    const isPad = computed(() => {
+      return navigator?.userAgent?.includes("UAWEIVRD-W09") || browserInfo?.iPad;
+    });
+
 		const openAudioAndVideo = () => {
 			shareData.show = true;
 			if (shareData.isInitPlyr) return;
@@ -231,7 +236,7 @@ export default defineComponent({
 
           {/* 音准、节奏、完整度纬度 */}
 
-          <div class={styles.middle}>
+          <div class={[styles.middle, isPad.value && styles.padMiddle]}>
             {state.isPercussion ? null : (
               <div onClick={() => handleChange("intonation")} class={[styles.cItem, "evaluting-report-1", itemType.value === "intonation" && styles.active]}>
                 <span class={styles.mScore}>{scoreData.value.intonation}分</span>

+ 2 - 0
src/state.ts

@@ -1665,6 +1665,8 @@ const setState = (data: any, index: number) => {
   } else {
     state.setting.frequency = state.setting.frequency || state.baseFrequency
   }
+  state.playBtnDirection = query.imagePos === 'left' ? 'left' : 'right';
+  state.isAttendClass = (query.imagePos === 'left' || query.imagePos === 'right') ? true : false;
 };
 
 // 多分轨合并显示标示

+ 1 - 0
src/view/music-score/index.tsx

@@ -104,6 +104,7 @@ export default defineComponent({
 				// drawMetronomeMarks: false,
 				// ...this.opotions,
 				colorStemsLikeNoteheads: true, // 是否将音符柄的颜色设置为与它们的音符头相同,默认false
+				// drawingParameters: "compact" // 使用紧凑布局
 			});
 			// osmd.EngravingRules.CompactMode = true // 紧凑模式
 			// osmd.EngravingRules.PageRightMargin = state.isSingleLine ? (window.innerWidth+200)/10 : 2;