Przeglądaj źródła

Merge branch 'feature-tianyong-newVersion' into ktyq-test-new

TIANYONG 11 miesięcy temu
rodzic
commit
1233de19a3

+ 5 - 0
src/helpers/formateMusic.ts

@@ -672,6 +672,11 @@ export const formatXML = (xml: string, xmlUrl?: string): string => {
 		if (minute.textContent && measureSpeed) {
 			speeds.push(Number(measureSpeed))
 		}
+		// if (hasSpeedDot && measureSpeed) {
+		// 	minute.textContent = measureSpeed
+		// 	const dotDom = minute?.parentElement.querySelector('beat-unit-dot')
+		// 	minute?.parentElement?.removeChild(dotDom)
+		// }
 	}
 	speeds = [...new Set(speeds)]
 	const hasVaryingSpeed = speeds.length > 1 ? true : false

+ 1 - 0
src/state.ts

@@ -2106,6 +2106,7 @@ export const checkMoveNoSave = async () => {
     if (query.isMove) {
       if (moveData.open && undoData.undoList.length) {
         showConfirmDialog({
+          className: "noSaveModal",
           title: "温馨提示",
           message: "您有新的修改还未保存,切换谱面后本次编辑的内容将不会保存",
         }).then(() => {

+ 4 - 0
src/style.css

@@ -123,6 +123,10 @@ body {
   transition: all 0.3s;
 }
 
+.noSaveModal {
+  transform: scale(0.8) translateY(-50%);
+}
+
 /* 引导动画 */
 @keyframes guideKeyframes {
   0% {

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

@@ -173,6 +173,7 @@ export const mappingVoicePart = (id: number | string, soruce: "GYM" | "COLEXIU"
       "Alto Saxophone": 5,
       "Tenor Saxophone": 5,
       "Baritone Saxophone": 5,
+      "Baritone": 15,
       "Trumpet in Bb 1": 12,
       "Trumpet in Bb 2": 12,
       "Horn in F": 13,
@@ -280,6 +281,7 @@ export const matchVoicePart = (id: number | string, type: "SINGLE" | "CONCERT"):
       "Alto Saxophone2": 5,
       "Tenor Saxophone": 5,
       "Baritone Saxophone": 5,
+      "Baritone": 15,
       "Trumpet in Bb 1": 12,
       "Trumpet in Bb 2": 12,
       "Horn in F": 13,

+ 6 - 4
src/view/plugins/move-music-score/index.tsx

@@ -89,6 +89,7 @@ function initSvgId() {
 	});
 	let textIndex = 1;
 	[...vftext].forEach((ele) => {
+		// console.log(ele.textContent,textIndex)
 		setEleId(ele, "text" + textIndex);
 		textIndex++;
 	});
@@ -121,10 +122,10 @@ function setEleId(ele: HTMLElement, eleId: string) {
 	if (!id) {
 		ele.setAttribute("id", eleId);
 	}
-	createModelBox(ele as any);
+	createModelBox(ele as any, eleId as any);
 }
 
-function createModelBox(ele: SVGAElement) {
+function createModelBox(ele: SVGAElement, eleId?: any) {
 	const musicContainer = document.getElementById("musicAndSelection")?.getBoundingClientRect() || { x: 0, y: 0 };
 	const parentLeft = musicContainer.x || 0;
 	const parentTop = musicContainer.y || 0;
@@ -137,7 +138,7 @@ function createModelBox(ele: SVGAElement) {
 	};
 	const type = ele.getAttribute("class");
 	moveData.modelList.push({
-		id: ele.getAttribute("id"),
+		id: eleId || ele.getAttribute("id"),
 		bbox,
 		type,
 		isMove: false,
@@ -173,6 +174,7 @@ const switchMoveState = () => {
 	// 如果编辑过,没有保存,点击取消状态,需要提醒用户是否取消
 	if (moveData.open && undoData.undoList.length) {
 		showConfirmDialog({
+			className: "noSaveModal",
 			title: "温馨提示",
 			message: "您有新的修改还未保存,取消后本次编辑的内容将不会保存",
 		}).then(() => {
@@ -541,7 +543,7 @@ export const renderForMoveData = () => {
 					// index = targetIndex + 1
 					// item.id = `text${index}`
 					index = targetIndex
-					item.id = `text${targetIndex+1}`
+					item.id = `text${targetIndex}`
 				}
 				// console.log(66666666,index)
 				if (index > -1) {

+ 2 - 2
vite.config.ts

@@ -76,9 +76,9 @@ export default defineConfig({
         // target: "https://kt.colexiu.com",
         // target: "https://test.lexiaoya.cn",
         // target: "https://kt.colexiu.com",
-        // target: "https://dev.resource.colexiu.com", // 内容平台开发环境,内容平台开发,需在url链接上加上isCbs=true
+        target: "https://dev.resource.colexiu.com", // 内容平台开发环境,内容平台开发,需在url链接上加上isCbs=true
         // target: "https://test.kt.colexiu.com",
-        target: "https://mec.colexiu.com",
+        // target: "https://mec.colexiu.com",
         changeOrigin: true,
         rewrite: (path) => path.replace(/^\/instrument/, ""),
       },