Browse Source

Merge branch 'gym-online' of http://git.dayaedu.com/tianyong/gym-music-score into hqyDev

黄琪勇 3 months ago
parent
commit
870743d006

+ 4 - 4
dist/instrument.html

@@ -2,7 +2,7 @@
 <html lang="en">
 
 <head>
-  <script type="module" crossorigin src="./js/polyfills-858fb2ee.js"></script>
+  <script type="module" crossorigin src="./js/polyfills-0f8dda44.js"></script>
 
   <meta charset="UTF-8" />
   <meta name="viewport"
@@ -41,7 +41,7 @@
       })
     }
   </script>
-  <script type="module" crossorigin src="./js/instrument-f076f229.js"></script>
+  <script type="module" crossorigin src="./js/instrument-2958d7ec.js"></script>
   <link rel="stylesheet" href="./css/instrument-f4164af0.css">
   <script type="module">import.meta.url;import("_").catch(()=>1);async function* g(){};window.__vite_is_modern_browser=true;</script>
   <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
@@ -65,8 +65,8 @@
     var vConsole = new window.VConsole();
   </script>   -->
   <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
-  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-1f76d399.js"></script>
-  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/instrument-legacy-e5b21d86.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+  <script nomodule crossorigin id="vite-legacy-polyfill" src="./js/polyfills-legacy-7ea27e1e.js"></script>
+  <script nomodule crossorigin id="vite-legacy-entry" data-src="./js/instrument-legacy-2a2ddf2b.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
 </body>
 
 </html>

+ 1 - 1
dist/js/index-88b0e68a.js → dist/js/index-579920f7.js

@@ -1 +1 @@
-import{d as i,g as l,r as d,E as e,o as r,s as c,b as s,M as u}from"./instrument-f076f229.js";const f="_skeleton_vtlsh_1",m="_detail_vtlsh_12",p="_container_vtlsh_20",a={skeleton:f,detail:m,container:p},y=i({name:"music-list",setup(){const n=l(),t=d({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:e.staff,base64:""},{state:!1,name:"首调",type:e.firstTone,base64:""},{state:!1,name:"固定调",type:e.fixedTone,base64:""}]});r(()=>{window.appName="colexiu",c.xmlUrl=n.xmlUrl,t.isLoading=!1});const o=async()=>{console.log("渲染完成")};return()=>s("div",{class:a.detail},[s("div",{id:"scrollContainer",class:[a.container,"hideCursor"]},[!t.isLoading&&s(u,{onRendered:o},null)])])}});export{y as default};
+import{d as i,g as l,r as d,E as e,o as r,s as c,b as s,M as u}from"./instrument-2958d7ec.js";const f="_skeleton_vtlsh_1",m="_detail_vtlsh_12",p="_container_vtlsh_20",a={skeleton:f,detail:m,container:p},y=i({name:"music-list",setup(){const n=l(),t=d({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:e.staff,base64:""},{state:!1,name:"首调",type:e.firstTone,base64:""},{state:!1,name:"固定调",type:e.fixedTone,base64:""}]});r(()=>{window.appName="colexiu",c.xmlUrl=n.xmlUrl,t.isLoading=!1});const o=async()=>{console.log("渲染完成")};return()=>s("div",{class:a.detail},[s("div",{id:"scrollContainer",class:[a.container,"hideCursor"]},[!t.isLoading&&s(u,{onRendered:o},null)])])}});export{y as default};

File diff suppressed because it is too large
+ 0 - 0
dist/js/index-592807b1.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/index-c1d09b80.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/index-cd8df457.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/index-legacy-19204220.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/index-legacy-8e239c95.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/index-legacy-d2b596be.js


+ 1 - 1
dist/js/index-legacy-23545485.js → dist/js/index-legacy-f65aef84.js

@@ -1 +1 @@
-System.register(["./instrument-legacy-e5b21d86.js"],(function(e,t){"use strict";var i,n,a,o,r,s,l,d,c=document.createElement("style");return c.textContent="._skeleton_vtlsh_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:1000;--van-skeleton-paragraph-height: .8rem}._detail_vtlsh_12{width:100vw;height:100vh;overflow:hidden;overflow-y:auto;--header-height: 1.65333rem;background:var(--container-background)}._detail_vtlsh_12 ._container_vtlsh_20{margin:0 .26667rem;border-radius:.26667rem}._detail_vtlsh_12 #musicAndSelection{overflow:initial!important;height:initial!important;max-height:initial!important}\n",document.head.appendChild(c),{setters:[e=>{i=e.d,n=e.g,a=e.r,o=e.E,r=e.o,s=e.s,l=e.b,d=e.M}],execute:function(){const t="_detail_vtlsh_12",c="_container_vtlsh_20";e("default",i({name:"music-list",setup(){const e=n(),i=a({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:o.staff,base64:""},{state:!1,name:"首调",type:o.firstTone,base64:""},{state:!1,name:"固定调",type:o.fixedTone,base64:""}]});r((()=>{window.appName="colexiu",s.xmlUrl=e.xmlUrl,i.isLoading=!1}));const h=async()=>{console.log("渲染完成")};return()=>l("div",{class:t},[l("div",{id:"scrollContainer",class:[c,"hideCursor"]},[!i.isLoading&&l(d,{onRendered:h},null)])])}}))}}}));
+System.register(["./instrument-legacy-2a2ddf2b.js"],(function(e,t){"use strict";var i,n,a,o,r,s,l,d,c=document.createElement("style");return c.textContent="._skeleton_vtlsh_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:1000;--van-skeleton-paragraph-height: .8rem}._detail_vtlsh_12{width:100vw;height:100vh;overflow:hidden;overflow-y:auto;--header-height: 1.65333rem;background:var(--container-background)}._detail_vtlsh_12 ._container_vtlsh_20{margin:0 .26667rem;border-radius:.26667rem}._detail_vtlsh_12 #musicAndSelection{overflow:initial!important;height:initial!important;max-height:initial!important}\n",document.head.appendChild(c),{setters:[e=>{i=e.d,n=e.g,a=e.r,o=e.E,r=e.o,s=e.s,l=e.b,d=e.M}],execute:function(){const t="_detail_vtlsh_12",c="_container_vtlsh_20";e("default",i({name:"music-list",setup(){const e=n(),i=a({isLoading:!0,isProductLoading:!1,product:[{state:!1,name:"五线谱",type:o.staff,base64:""},{state:!1,name:"首调",type:o.firstTone,base64:""},{state:!1,name:"固定调",type:o.fixedTone,base64:""}]});r((()=>{window.appName="colexiu",s.xmlUrl=e.xmlUrl,i.isLoading=!1}));const h=async()=>{console.log("渲染完成")};return()=>l("div",{class:t},[l("div",{id:"scrollContainer",class:[c,"hideCursor"]},[!i.isLoading&&l(d,{onRendered:h},null)])])}}))}}}));

File diff suppressed because it is too large
+ 0 - 0
dist/js/instrument-2958d7ec.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/instrument-legacy-2a2ddf2b.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/modeView-fa49d224.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/modeView-legacy-76473d15.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/polyfills-0f8dda44.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/polyfills-legacy-7ea27e1e.js


+ 2 - 1
src/helpers/calcSpeed.ts

@@ -42,6 +42,7 @@ export const speedInfo: { [key in string]: number } = {
 	slowly: 1.333333333,
 	faster: 1.333333333,
 	"molto allargando": 1.333333333,
+	stringendo: 0.8,
 };
 
 /**
@@ -115,7 +116,7 @@ export type GradualItem = {
  * @param xml 始终按照第一分谱进行减慢速度的计算
  */
 export const getGradualLengthByXml = (xml: string) => {
-	const firstPartXml = onlyVisible(xml, 0)
+	const firstPartXml = onlyVisible(xml, 0, 'calc')
 	const xmlParse = new DOMParser().parseFromString(firstPartXml, "text/xml");
 	const measures = Array.from(xmlParse.querySelectorAll("measure"));
 	const notes = Array.from(xmlParse.querySelectorAll("note"));

+ 21 - 2
src/helpers/formateMusic.ts

@@ -357,7 +357,7 @@ export const isRepeatWord = (text: string): boolean => {
 	return false;
 };
 
-export const onlyVisible = (xml: string, partIndex: number): string => {
+export const onlyVisible = (xml: string, partIndex: number, resourceType?: string): string => {
 	if (!xml) return "";
 	// console.log('原始xml')
 	const detailId = state.examSongId + "";
@@ -493,6 +493,16 @@ export const onlyVisible = (xml: string, partIndex: number): string => {
 
 			// 最后一个小节的结束线元素不在最后 调整
 			if (part && part.getAttribute("id") === id) {
+				if (!resourceType) {
+					const backups = Array.from(part.getElementsByTagName('backup')) || []
+					for (let backup of backups) {
+						// @ts-ignore
+						if (backup && backup?.getElementsByTagName('duration')?.length) {
+							state.isSingleMutliTrack = true;
+							break;
+						}
+					}
+				}
 				const barlines = part.getElementsByTagName("barline");
 				const lastParent = barlines[barlines.length - 1]?.parentElement;
 				if (lastParent?.lastElementChild?.tagName !== "barline") {
@@ -656,6 +666,7 @@ export const formatXML = (xml: string, xmlUrl?: string): string => {
 	}
 
 	const measures = Array.from(xmlParse.getElementsByTagName("measure"));
+	state.firstMeasureNumber = measures[0] ? Number(measures[0].getAttribute('number') || 1) : 1;
 	const minutes: any = xmlParse.getElementsByTagName("per-minute");
 	let speeds: any = []
 	for (const minute of minutes) {
@@ -859,7 +870,7 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 
 	let preNoteEndTime = 0; // 上一个音符的结束时间
 
-	let preNoteMeasureNumber = 0; // 上一个小节的number值
+	let preNoteMeasureNumber: any = null; // 上一个小节的number值
 
 	let currentRealTempo: any = {}; // 当前小节的速度与拍号信息
 
@@ -886,6 +897,12 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 				return trackName?.trim() === firstTrackName
 			});
 		}
+		// 多轨合并显示,或者单轨多声部的情况,需要过滤掉下半边声部的音符
+		if ( ((!state.isCombineRender && state.isSingleMutliTrack) || state.isCombineRender) && iterator.currentVoiceEntries.length) {
+			iterator.currentVoiceEntries = iterator.currentVoiceEntries.filter((item: any) => {
+				return item.ParentVoice.voiceId === 1
+			});
+		}
 		let minIndex = 0, elRealValue = 0
 		for (let index = 0; index < iterator.currentVoiceEntries.length; index++) {
 			const element = iterator.currentVoiceEntries[index];
@@ -898,6 +915,7 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 			if (element.notes[0].length.realValue < elRealValue) {
 				minIndex = index
 			}
+			// console.log(element.notes[0].SourceMeasure.MeasureNumberXML,element.notes[0].playbackInstrumentId,element.ParentVoice.voiceId)
 			elRealValue = element.notes[0].length.realValue
 		}
 		if (minIndex !== 0 && state.isCombineRender && iterator.currentVoiceEntries[minIndex]) {
@@ -981,6 +999,7 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 			const { beatUnit="quarter", dotted=false, tempoInBpm=state.originSpeed } = currentRealTempo
 			const speedBeatUnit = beatUnitTo(beatUnit, dotted)
 			_notes.push({
+				measureNum: note?.sourceMeasure?.MeasureNumberXML,
 				note,
 				iterator: { ...iterator },
 				currentTime,

+ 5 - 3
src/helpers/metronome.ts

@@ -208,7 +208,8 @@ class Metronome {
 			return;
 		}
 		metronomeData.isClick = false;
-		if (currentTime === 0) {
+		// 非选段状态,没播放时,不显示节拍指针
+		if (currentTime === 0 && !state.sectionStatus) {
 			metronomeData.activeMetro = {}
 		}
 	};
@@ -320,7 +321,7 @@ class Metronome {
 			// console.log("🚀 ~ note?.noteElement?.sourceMeasure", note?.noteElement?.sourceMeasure)
 			// console.log("🚀 ~ measureNumberXML", measureNumberXML, note)
 			// console.log("🚀 ~ measureNumberXML", note)
-			const measureListIndex = measureNumberXML - 1;
+			const measureListIndex = state.firstMeasureNumber == 0 ? measureNumberXML : measureNumberXML - 1;
 			// 当渐快渐慢的时候  不播节拍器
 			if(isWithinRange(state.gradual, measureListIndex)){
 				xmlNumber = measureNumberXML;
@@ -460,7 +461,8 @@ class Metronome {
 						left: left?.indexOf("%") > -1 ? `calc(${left})` : left,
 						measureNumberXML: measure.measureNumberXML,
 						isRestFlag: measure.isRestFlag,
-						stepList: measure.stepList
+						stepList: measure.stepList,
+						isPercent: left?.indexOf("%") > -1, // 是否是根据小节宽度等分
 					});
 				}
 			}

+ 5 - 0
src/page-instrument/api.ts

@@ -50,6 +50,11 @@ export const studentQueryUserInfo = async () => {
         id:data.id,
         gender:""
       }
+      if (res.data.specialInstrumentIds.length > 1 && data.extInstrumentNames?.length) {
+        data.extInstrumentNames.forEach((ext: any) => {
+          res.data.specialInstrumentIds.push(ext.instrumentIds)
+        })
+      }
       return res
     }
   } catch (error) {

+ 1 - 0
src/page-instrument/component/the-music-list/list.tsx

@@ -95,6 +95,7 @@ export default defineComponent({
       }
       queryObj.id = item.id
       queryObj["part-index"] = ""
+      queryObj["part-name"] = ""
       location.href =
         location.origin +
         location.pathname +

+ 20 - 6
src/state.ts

@@ -604,6 +604,10 @@ const state = reactive({
   hasFollowResult: false,  
   /** 右上角速度图标,根据当前小节的速度是几分音符的动态变化 */
   speedIcon: 'speed3', // 默认取1/4拍的图片
+  /** xml的第一个measure标签的number */
+  firstMeasureNumber: 1,
+  /** 是否是单声轨多声部的声轨 */
+  isSingleMutliTrack: false,
 });
 const browserInfo = browser();
 let offset_duration = 0;
@@ -1357,6 +1361,7 @@ export const setSection = (start: number, end: number, userSpeed?: number) => {
 export const hanldeDirectSelection = (list: any[]) => {
   if (!Array.isArray(list) || list.length !== 2) return;
   state.sectionStatus = true;
+  metronomeData.activeIndex = null;
   setTimeout(() => {
     state.section = formateSelectMearure(list);
     // 选段完成后,需要根据预报小节的速度,设置右下角显示的速度
@@ -1467,10 +1472,21 @@ const getMusicInfo = async (res: any) => {
   state.isScoreRender = res.data?.isScoreRender
   // 是否默认显示总谱
   state.defaultScoreRender = res.data?.defaultScoreRender
+  /* 获取声轨列表 */
+  let xmlString = await fetch(res.data.xmlFileUrl).then((response) => response.text());
+  xmlString = xmlAddPartName(xmlString);
+  downloadXmlStr.value = xmlString //给musice-score 赋值xmlString 以免加载2次
+  const tracks = xmlToTracks(xmlString) //获取声轨列表  
   // 是否显示节拍器  (管乐迷 默认显示节拍器)
   //state.isMixBeat = res.data?.isMixBeat  
   /* 设置partIndex */
   let partIndexs = query["part-index"] ? query["part-index"].split(",") : ["-1"] // -1为partIndex没有值的时候
+  // 如果传入的是part-name,需要将part-name转换成part-index
+  if (query["part-name"]) {
+    const partValue = decodeURIComponent(query["part-name"]) || ''
+    let nameIdx = tracks.findIndex((item: any) => item == partValue)
+    partIndexs = [nameIdx]
+  }  
   partIndexs = partIndexs.map((indexStr:string) => {
     return parseInt(indexStr)
   }).sort((a, b) => a - b);
@@ -1489,11 +1505,7 @@ const getMusicInfo = async (res: any) => {
   // multiTracksSelection 返回为空,默认代表全部分轨
   state.canSelectTracks = res.data.multiTracksSelection === "null" || res.data.multiTracksSelection === "" || res.data.multiTracksSelection === null ? [] : res.data.multiTracksSelection?.split(',');
   state.canSelectTracks = state.canSelectTracks.map((item: any)=>item.trim())
-  /* 获取声轨列表 */
-  let xmlString = await fetch(res.data.xmlFileUrl).then((response) => response.text());
-  xmlString = xmlAddPartName(xmlString);
-  downloadXmlStr.value = xmlString //给musice-score 赋值xmlString 以免加载2次
-  const tracks = xmlToTracks(xmlString) //获取声轨列表
+
   // 如果是多个分轨合并显示的,需要记录下所选分轨的第一个分轨的名字,渲染计算音符位置的时候需要根据第一个分轨找到对应音符的位置
   if (state.combinePartIndexs.length) {
     (window as any).DYFirstTrackName = tracks[state.combinePartIndexs[0]] || '';
@@ -1521,14 +1533,16 @@ const getMusicInfo = async (res: any) => {
 };
 //获取xml中的音轨数据
 function xmlToTracks(xmlString: string) {
+  //console.time('domparse')
   const xmlParse = new DOMParser().parseFromString(xmlString, "text/xml");
+  //console.timeEnd('domparse')
   const partNames = Array.from(xmlParse.getElementsByTagName('part-name'));
   return partNames.reduce((arr: string[], item) => {
     const textContent = item?.textContent?.trim()
     if (textContent?.toLocaleLowerCase() === "common") {
       (window as any).HasCommonTrack = true;
     }
-    if (textContent != "COMMON" && textContent != "common" && textContent) {
+    if (textContent?.trim()?.toLocaleLowerCase() !== "common" && textContent) {
       arr.push(textContent)
     }
     return arr

+ 2 - 2
src/view/fingering/fingering-config.ts

@@ -352,11 +352,11 @@ export const matchVoicePart = (id: number | string, type: "SINGLE" | "CONCERT"):
         let pitchKey = sKey;
         if (typeof sKey === "string" && isNaN(Number(sKey)) ) {
           pitchKey = pitchKey.toLocaleLowerCase().replace(/ /g, "");
-          pitchKey = pitchKey.replace(/[_0-9]+$/, '');
+          pitchKey = pitchKey.replace(/[_0-9.]+$/, '');
         }
         if (typeof sKey === "string") {
           // 去掉声轨后面的数字
-          code = code.replace(/[_0-9]+$/, '');
+          code = code.replace(/[_0-9.]+$/, '');
         }
         if (pitchKey === code) {
           _track = subject[sKey];

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

@@ -176,7 +176,7 @@ export default defineComponent({
 			if (query.downPng === 'A4') {
 				osmd.EngravingRules.PageTopMargin = 5
 				osmd.setPageFormat('794x1100')
-				osmd.zoom = 0.3;
+				osmd.zoom = query.zoom || 0.3;
 			} else {
 				osmd.zoom = state.zoom;
 			}

+ 1 - 0
src/view/plugins/toggleMusicSheet/index.tsx

@@ -77,6 +77,7 @@ export default defineComponent({
           behaviorId: sessionStorage.getItem('behaviorId') || '',
           _t: new Date().valueOf(),
           'part-index': index,
+          'part-name': ''
         })
       console.log(_url)
       location.href = _url

+ 35 - 5
src/view/selection/index.tsx

@@ -28,8 +28,11 @@ export default defineComponent({
 			notes: [] as any[],
 			staves: [] as any[],
 			measureHeight: 0 as number, // 小节高度
+			// beatWidth: '100%' as string, // 节拍指针占用的宽度,带有拍号的小节,节拍指针占用的宽度需要减去拍号左侧的宽度
+			// beatLeft: 0 as number, // 小节有拍号时,拍号左侧宽度
 		});
-		
+		const beatMeasureWidths: any = {}; // 节拍指针需要占用的宽度
+
 		/** 计算点击层数据 */
 		const calcNoteData = () => {
 			const musicContainer = document.getElementById("musicAndSelection")?.getBoundingClientRect() || {
@@ -112,7 +115,9 @@ export default defineComponent({
 						notesList.push(item.noteId);
 					}
 				}
-		
+				// 如果小节里面有拍号,需要减去拍号左侧的宽度
+				let beatWidth = '100%';
+				let beatLeft = 0;
 				if (!MeasureNumberXMLList.includes(item.MeasureNumberXML)) {
 					if (item.stave) {
 						if (item.stave?.attrs?.id) {
@@ -132,6 +137,14 @@ export default defineComponent({
 							} catch (error) {}
 		
 							const staveBbox = staveEle?.getBoundingClientRect?.() || { x: 0, width: 0, y: 0, height: 0 };
+							const timesignatureDom = staveEle?.querySelector('.vf-timesignature') || staveEle?.querySelector('.vf-keysignature')
+							// 休止符才是根据小节宽度等分
+							if (timesignatureDom && item.measures.length == 1) {
+								const timesignatureBbox = timesignatureDom.getBoundingClientRect()
+								const leftWidth = timesignatureBbox.x + timesignatureBbox.width - staveBbox.x
+								beatLeft = leftWidth
+								beatWidth = `calc(100% - ${leftWidth+'px'})`
+							}
 							if (i === 0) {
 								minMeasureHeigt = staveBbox.height
 							}
@@ -159,6 +172,10 @@ export default defineComponent({
 							selectData.staves.push(noteItem);
 						}
 						MeasureNumberXMLList.push(item.MeasureNumberXML);
+						beatMeasureWidths[item.MeasureNumberXML] = {
+							beatLeft,
+							beatWidth
+						}
 					} else {
 						if (item.multipleRestMeasures) {
 							if (state.isCombineRender) {
@@ -184,6 +201,10 @@ export default defineComponent({
 									};
 									selectData.staves.push(noteItem);
 									MeasureNumberXMLList.push(item.MeasureNumberXML);
+									beatMeasureWidths[item.MeasureNumberXML] = {
+										beatLeft,
+										beatWidth
+									}
 								}
 							} else {
 								const preItem = selectData.staves.find(
@@ -198,6 +219,15 @@ export default defineComponent({
 									};
 									selectData.staves.push(noteItem);
 									MeasureNumberXMLList.push(item.MeasureNumberXML);
+									const preBeatMeasure = beatMeasureWidths[item.MeasureNumberXML-1]
+									beatMeasureWidths[item.MeasureNumberXML] = preBeatMeasure ?
+									{
+										beatLeft: preBeatMeasure.beatLeft,
+										beatWidth: preBeatMeasure.beatWidth
+									} : {
+										beatLeft,
+										beatWidth
+									}
 								}
 							}
 		
@@ -209,7 +239,7 @@ export default defineComponent({
 			if (selectData.staves[0]?.staveBox?.top !== selectData.staves[1]?.staveBox?.top) {
 				selectData.staves[0].staveBox.top = selectData.staves[1]?.staveBox?.top || selectData.staves[0]?.staveBox?.top
 			}
-			console.log("🚀 ~ selectData.notes:", selectData.notes, selectData.staves);
+			console.log("🚀 ~ selectData.notes:", selectData.notes, selectData.staves,beatMeasureWidths,MeasureNumberXMLList);
 		};
 		/** 是否可以点击音符 */
 		const disableClickNote = computed(() => {
@@ -301,7 +331,7 @@ export default defineComponent({
 							metronomeData.cursorMode === 2 &&
 							item.MeasureNumberXML === metronomeData.activeMetro?.measureNumberXML &&
 							state.times[state.activeNoteIndex].MeasureNumberXML === item.MeasureNumberXML;
-							//console.log('显示节拍指针',lineShow,state.times[state.activeNoteIndex].MeasureNumberXML,item.MeasureNumberXML,metronomeData.activeMetro?.measureNumberXML)
+							// console.log('显示节拍指针',lineShow,state.times[state.activeNoteIndex].MeasureNumberXML,item.MeasureNumberXML,metronomeData.activeMetro?.measureNumberXML)
 						return (
 							<>
 								{item.staveBox && (
@@ -324,7 +354,7 @@ export default defineComponent({
 										}}
 									>
 										{lineShow && (
-											<div style={{height: selectData.measureHeight + 'px', position: 'relative'}}>
+											<div style={{height: selectData.measureHeight + 'px', position: 'relative', width: metronomeData.activeMetro.isPercent ? beatMeasureWidths[item.MeasureNumberXML].beatWidth : '100%', left: metronomeData.activeMetro.isPercent ? beatMeasureWidths[item.MeasureNumberXML].beatLeft + 'px' : 0}}>
 												<div 
 												class={[
 													styles.line,

File diff suppressed because it is too large
+ 0 - 0
stats.html


Some files were not shown because too many files changed in this diff