Selaa lähdekoodia

查看作业,修改导出作业名字

11wqe1 8 kuukautta sitten
vanhempi
commit
c481e16abc
1 muutettua tiedostoa jossa 5 lisäystä ja 14 poistoa
  1. 5 14
      src/components/pages/components/worksDetail2.vue

+ 5 - 14
src/components/pages/components/worksDetail2.vue

@@ -1886,19 +1886,9 @@ export default {
         //有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89)
         //当内容未超过pdf一页显示的范围,无需分页
         // if (leftHeight < pageHeight) {
-            pdf.addImage(pageData, 'JPEG', 10, 0, imgWidth-20, imgHeight );
-        // } else {
-        //     while(leftHeight > 0) {
-        //         pdf.addImage(pageData, 'JPEG', 10, position, imgWidth-20, imgHeight)
-        //         leftHeight -= pageHeight;
-        //         position -= 841.89;
-        //         //避免添加空白页
-        //         if(leftHeight > 0) {
-        //             pdf.addPage();
-        //         }
-        //     }
-        // }
-        pdf.save('js.pdf')
+        pdf.addImage(pageData, 'JPEG', 10, 0, imgWidth-20, imgHeight-20 );
+       
+        pdf.save( this.allWorks.course+'-'+ this.allWorks.sName+'.pdf')
 
     })
 
@@ -4638,7 +4628,8 @@ export default {
   background: rgb(255, 255, 255);
   /* padding-right: 10px; */
   /* height: 500px; */
-  height: 100%;
+  /* height: 100%; */
+  min-height: 800px;
 }
 
 .cTitle {