去掉打印

This commit is contained in:
daihh
2022-06-08 17:26:58 +08:00
parent 1d0c0ebe1c
commit ba5fa0738b
2 changed files with 7 additions and 6 deletions

View File

@@ -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("加载内容失败,请联系管理员");