ソースを参照

feat: 添加时间信息

TIANYONG 1 日 前
コミット
8b8ae21f36

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

@@ -117,6 +117,7 @@ export default defineComponent({
         }
       }
     };
+    console.time('开始加载')
     onBeforeMount(async () => {
       // console.time("渲染加载耗时");
       api_keepScreenLongLight();

+ 1 - 0
src/view/audio-list/index.tsx

@@ -564,6 +564,7 @@ export default defineComponent({
 				// 监听midi播放结束
 				api_cloudplayed(midiPlayEnd);
 			}
+			console.timeEnd('开始加载')
 		});
 		onUnmounted(() => {
 			api_remove_cloudplayed(midiPlayEnd);

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

@@ -74,12 +74,14 @@ export default defineComponent({
 				downloadXmlStr.value = await fetch(state.xmlUrl).then((response) => response.text())
 			}
 			const xmlStr = downloadXmlStr.value;
+			console.time('解析xml')
 			const parseXmlInfo = getCustomInfo(xmlStr);
 			const xml = formatXML(parseXmlInfo.parsedXML);
 			musicData.score = state.isCombineRender ? xml : onlyVisible(xml, state.partIndex);
 			if (state.gradualTimes) {
 				state.gradual = getGradualLengthByXml(xml);
 			}
+			console.timeEnd('解析xml')
 		};
 
 		const init = async () => {

+ 4 - 1
src/view/selection/index.tsx

@@ -247,11 +247,14 @@ export default defineComponent({
 			}
 			return []
 		})
-
+		console.time('dom挂载')
 		onMounted(() => {
+			console.timeEnd('dom挂载')
 			selectData.notes = [];
 			selectData.staves = [];
+			console.time('添加dom时间')
 			calcNoteData();
+			console.timeEnd('添加dom时间')
 			const img: HTMLElement = document.querySelector('#cursorImg-0')!
 			if (metronomeData.cursorMode === 2){
 				img.classList.add('lineHide')