mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-14 21:36:42 +08:00
去掉打印
This commit is contained in:
@@ -120,15 +120,16 @@ export default {
|
||||
},
|
||||
//加载页面
|
||||
loadInitPdf(url) {
|
||||
//console.log('加载pdf文件:'+url)
|
||||
//if(url && url.indexOf('.pdf')>-1){
|
||||
let loadingTask = pdf.createLoadingTask(url);
|
||||
this.src=loadingTask;
|
||||
loadingTask.promise.then((pdf) =>{
|
||||
this.totalPages=pdf.numPages;
|
||||
if(pdf.numPages>this.initNum){
|
||||
loadingTask.promise.then((pdfrs) =>{
|
||||
this.totalPages=pdfrs.numPages;
|
||||
if(pdfrs.numPages>this.initNum){
|
||||
this.showPages = this.initNum;
|
||||
} else{
|
||||
this.showPages =pdf.numPages;
|
||||
this.showPages =pdfrs.numPages;
|
||||
}
|
||||
}).catch((err) =>{
|
||||
this.$message.error("加载内容失败,请联系管理员");
|
||||
|
||||
Reference in New Issue
Block a user