Przeglądaj źródła

feat: pc端放大曲谱功能

TIANYONG 5 miesięcy temu
rodzic
commit
131d7e750d

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

@@ -25,7 +25,7 @@ export default defineComponent({
 			screenModelShow: false, // 投屏帮助
 			recommendationShow: false, // 建议
 		});
-        const zoomList = [{name:'原始',value: 0.8},{name:'1.25x',value: 1.25},{name:'1.5x',value: 1.5},{name:'1.75x',value: 1.75}] 
+        const zoomList = [{name:'默认',value: 0.8},{name:'1.25x',value: 1.25},{name:'1.5x',value: 1.5},{name:'1.75x',value: 1.75}] 
 		const parentClassName = "recommenBoxClass_drag";
 		const userId = storeData.user?.id ? String(storeData.user?.id) : "";
 		const positionInfo =
@@ -254,9 +254,9 @@ export default defineComponent({
                             </div> : null
                         }
                         {
-                            state.isCbsView ? 
+                            !state.isCbsView ? 
                             <div class={styles.cellBox}>
-                                <div class={styles.tit}>放大谱面</div>
+                                <div class={styles.tit}>谱面大小</div>
                                 <div class={[styles.radioBox, styles.speBox]}>
                                     {
                                         zoomList.map(item=>{
@@ -269,6 +269,7 @@ export default defineComponent({
                                                 // resetRenderMusicScore(state.musicRenderType)
                                                 const _time = setTimeout(() => {
                                                     state.zoom = item.value as any
+                                                    localStorage.setItem('scoreZoom',String(state.zoom))
                                                     clearTimeout(_time)
                                                     refreshMusicSvg();
                                                 }, 100);

+ 2 - 0
src/state.ts

@@ -1725,6 +1725,8 @@ const setState = (data: any, index: number) => {
   if (state.platform === IPlatform.PC) {
     if (query.zoom <= 1) {
       state.zoom = query.zoom || state.zoom;
+    } else {
+      state.zoom = localStorage.getItem('scoreZoom') ? Number(localStorage.getItem('scoreZoom')) : state.zoom
     }
     state.enableEvaluation = false;
   }