Browse Source

test 下载ppt压缩

cxmo 1 year ago
parent
commit
2e94a76492
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/ppt_manage/newVersion/pptPublish.vue

+ 2 - 2
src/views/ppt_manage/newVersion/pptPublish.vue

@@ -483,7 +483,7 @@ export default {
       //pptx2.writeFile({ fileName: "test.pptx" });//本地测试用
       //直接下载
       if(type==='dowload'){
-        pptx2.writeFile({ fileName: `${this.coverInfo.page.Title||'unname'}.pptx` });
+        pptx2.writeFile({ fileName: `${this.coverInfo.page.Title||'unname'}.pptx`,compression:true });
         return
       }
       this.publishLoading = this.$loading({
@@ -514,7 +514,7 @@ export default {
 
       //console.log('pptx',pptx)
       //根据配置选择是走后端接口上传还是直接前端上传到oss
-      pptx2.write('blob').then((data)=>{
+      pptx2.write({compression:true,outputType:'blob'}).then((data)=>{
         // 1走后端接口上传
         const uploadType=this.$setting.dynamicOutLinks.PptUpdateApi ||
                         this.$store.state.dynamicOutLinks.PptUpdateApi ||