瀏覽代碼

谱面margin设置 字体滚动

黄琪勇 1 年之前
父節點
當前提交
79aa8c27d2

+ 9 - 3
src/page-instrument/header-top/index.module.less

@@ -18,10 +18,16 @@
         height: 32px;
     }
     .title{
+        width: 140px;
         margin-left: 10px;
-        font-weight: 600;
-        font-size: 18px;
-        color: #FFFFFF;
+        :global{
+            .van-notice-bar{
+                padding: 0;
+                font-weight: 600;
+                font-size: 18px;
+                color: #FFFFFF;
+            }
+        }
     }
     .hidenBack {
         opacity: 0;

+ 7 - 3
src/page-instrument/header-top/index.tsx

@@ -3,9 +3,8 @@ import styles from "./index.module.less";
 
 import iconBack from "./image/icon-back.png";
 import iconMode from "./image/mode.png";
-import Title from "./title";
 import { headImg } from "./image";
-import { Badge, Circle, Popover, Popup, showConfirmDialog, showToast } from "vant";
+import { Badge, Circle, Popover, Popup, showConfirmDialog, showToast, NoticeBar } from "vant";
 import Speed from "./speed";
 import { evaluatingData, handleStartEvaluat } from "/src/view/evaluating";
 import Settting from "./settting";
@@ -413,7 +412,12 @@ export default defineComponent({
           {/* 返回和标题 */}
           <div class={styles.headTopLeftBox}>
             <img src={iconBack} class={['headTopBackBtn', styles.img, !headTopData.showBack && styles.hidenBack]} onClick={handleBack} />
-            <div class={styles.title}>{state.examSongName}</div>
+            <div class={styles.title}>
+              <NoticeBar
+                text={state.examSongName}
+                background="none"
+              />
+            </div>
           </div>
           {/* 模式切换 */}
           <div 

+ 0 - 28
src/page-instrument/header-top/title/index.module.less

@@ -1,28 +0,0 @@
-.container {
-  width: 170px;
-  height: 31px;
-  background: transparent;
-  display: flex;
-  align-items: center;
-  border-radius: 18px;
-  padding: 6px 10px;
-
-  .noticeBar {
-    flex: 1;
-    padding: 0;
-  }
-  &.pcContainer {
-    width: 500px;
-  }
-}
-
-.icon {
-  width: 26px;
-  height: 26px;
-  flex-shrink: 0;
-}
-
-.status {
-  margin-left: auto;
-  flex-shrink: 0;
-}

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

@@ -1,36 +0,0 @@
-import { defineComponent } from 'vue'
-import { NoticeBar } from 'vant'
-import styles from './index.module.less'
-import state, { IPlatform } from "/src/state";
-
-import MusicIcon from '../image/music.png'
-import ArrowIcon from '../image/arrow.svg'
-
-export default defineComponent({
-  name: 'detail-title',
-  props: {
-    text: {
-      type: String,
-      default: ''
-    },
-    rightView: {
-      type: Boolean,
-      default: true,
-    },
-    onClick: {
-      type: Function,
-    } as any
-  },
-  render() {
-    return (
-      <div class={[styles.container, state.platform === IPlatform.PC && styles.pcContainer]}>
-        <NoticeBar
-          text={this.text}
-          color="#000"
-          class={styles.noticeBar}
-          background="none"
-        />
-      </div>
-    )
-  }
-})

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

@@ -37,14 +37,13 @@
 
     .container {
         position: sticky;
-        top: 0;
+        top: var(--header-height);
         height: calc(100vh - var(--header-height));
         margin: 0 10px;
         border-radius: 10px;
         transition: height .2s;
         transition: padding-bottom .2s;
         overflow: hidden;
-        //overflow-x: scroll;
     }
     .pcContainer {
         height: calc(100vh - var(--header-height) - var(--pc-header-height));

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

@@ -116,7 +116,7 @@ export default defineComponent({
 			// osmd.EngravingRules.CompactMode = true // 紧凑模式
 			osmd.EngravingRules.PageRightMargin = state.isSingleLine ? (window.innerWidth+200)/10 : 2;
 			osmd.EngravingRules.FixedMeasureWidth = state.isSingleLine ? true : false; // 是否固定小节的宽度(小节同一宽度渲染)
-			osmd.EngravingRules.PageTopMargin = state.platform === IPlatform.PC ? 9 : 10; // 老师端顶部间距
+			osmd.EngravingRules.PageTopMargin = state.platform === IPlatform.PC ? 0 : 1; // 老师端顶部间距
 			osmd.EngravingRules.PageTopMarginNarrow = 3;
 			osmd.EngravingRules.PageLeftMargin = 2;
 			osmd.EngravingRules.BreathMarkDistance = 0.1; // 呼吸标记距离音符的位置,百分比