Parcourir la source

feat: 详情页下载图片修改

TIANYONG il y a 2 mois
Parent
commit
40678d2f02
1 fichiers modifiés avec 12 ajouts et 0 suppressions
  1. 12 0
      src/page-instrument/view-detail/index.tsx

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

@@ -217,6 +217,18 @@ export default defineComponent({
       state.osmd = osmd;
       // 预览模式不需要往下执行
       if (state.isPreView) {
+          // 管乐迷曲谱详情页,需要下载A4尺寸的图片
+          setTimeout(() => {
+            if (query.downPng === 'A4' && state.partIndex != 999) {
+              const imgList = getSvgPngToSize(state.osmd)
+              console.log('A4', imgList)
+              window.parent.postMessage({
+                api: 'musicStaffRender',
+                loading: false,
+                osmdImg: imgList
+              }, '*');
+            }
+          }, 100);
         return;
       }
       // 没有设置速度使用读取的速度