webpackJsonp([18],{G1yl:function(t,e){},GcQ9:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={data:function(){return{pdfUrl:"../../../static/readme.pdf",scale:1.5,totals:[],pageNum:1,viewHeight:0}},mounted:function(){this.renderPdf(this.scale)},methods:{renderPdf:function(t){var e=this,i=window["pdfjs-dist/build/pdf"];window["pdfjs-dist/web/pdf_viewer"];i.GlobalWorkerOptions.workerSrc="//mozilla.github.io/pdf.js/build/pdf.worker.js",i.getDocument(this.pdfUrl).promise.then(function(i){var n=i.numPages;e.createCanvas(n,"canvas-pdf-");for(var a=function(n){i.getPage(n).then(function(i){document.getElementById("page-"+n);var a=i.getViewport({scale:t}),s=document.getElementById("canvas-pdf-"+n),r=s.getContext("2d");s.height=a.height,s.width=a.width,e.viewHeight=a.height;var o={canvasContext:r,viewport:a};i.render(o).promise.then(function(){return i.getTextContent()})})},s=1;s<=n;s++)a(s)})},createCanvas:function(t){for(var e=1;e<=t;e++)this.totals.push(e)},scrollfun:function(t){var e=t.target.scrollTop;this.pageNum=0===e?1:Math.ceil(e/this.viewHeight)}}},a={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("el-row",[e("el-alert",{attrs:{title:"温馨提示",type:"success"}},[this._t("default",[this._v("\n        本页面为简单 PDF 预览页面。由于 PDF 文件可在浏览器直接打开，故此页面只引入外部文件，并未实际安装相关组件。\n        "),e("br"),this._v("详细使用教程请参考 http://mozilla.github.io/pdf.js/getting_started/\n      ")])],2)],1),this._v(" "),e("el-row",[e("el-scrollbar",[e("div",{staticStyle:{height:"100%"}},this._l(this.totals,function(t){return e("div",{key:t,staticClass:"pdf-box",attrs:{id:"page-"+t}},[e("canvas",{staticClass:"canvas-pdf",attrs:{id:"canvas-pdf-"+t}})])}),0)])],1)],1)},staticRenderFns:[]};var s=i("VU/8")(n,a,!1,function(t){i("G1yl")},"data-v-a2c261ec",null);e.default=s.exports}});