@toolspack/ttd-pdfjs 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ttd-pdfjs.common.js +68 -67
- package/lib/ttd-pdfjs.umd.js +68 -67
- package/lib/ttd-pdfjs.umd.min.js +3 -3
- package/package.json +1 -1
- package/src/packages/pdfjs/PdfView.vue +6 -2
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:page="page" :zoomEnable="zoomEnable" :rotateEnable="rotateEnable"
|
|
6
6
|
@page="onChangePage" @zoom="onScale" @rotate="onRotate"></switch-page>
|
|
7
7
|
</div>
|
|
8
|
-
<div class="pdf-view-area-wapper"
|
|
8
|
+
<div class="pdf-view-area-wapper">
|
|
9
9
|
<div>
|
|
10
10
|
<div
|
|
11
11
|
class="center pdf-view-area"
|
|
@@ -59,6 +59,7 @@ const PDFJS = require('pdfjs-dist')
|
|
|
59
59
|
|
|
60
60
|
const defautScale = 1.0
|
|
61
61
|
// PDFJS.GlobalWorkerOptions.workerSrc = require('pdfjs-dist/legacy/build/pdf.worker.min.js')
|
|
62
|
+
// eslint-disable-next-line
|
|
62
63
|
PDFJS.GlobalWorkerOptions.workerSrc = require('pdfjs-dist/build/pdf.worker.min.js')
|
|
63
64
|
// https://unpkg.com/pdfjs-dist@2.16.105/cmaps/
|
|
64
65
|
// 使用代理的cmaps,会导致加载很慢,改用本地
|
|
@@ -177,7 +178,7 @@ export default {
|
|
|
177
178
|
if (!canvas) {
|
|
178
179
|
return false
|
|
179
180
|
}
|
|
180
|
-
this.style.width = `${viewport.width +
|
|
181
|
+
this.style.width = `${viewport.width + 18}px`;
|
|
181
182
|
this.pdfWidth = `${viewport.width}px`;
|
|
182
183
|
canvas.height = viewport.height
|
|
183
184
|
canvas.width = viewport.width
|
|
@@ -378,6 +379,7 @@ export default {
|
|
|
378
379
|
width: 100%;
|
|
379
380
|
display: flex;
|
|
380
381
|
flex-direction: column;
|
|
382
|
+
box-sizing: border-box;
|
|
381
383
|
min-width: 688px;
|
|
382
384
|
}
|
|
383
385
|
.pdf-view-control {
|
|
@@ -389,10 +391,12 @@ export default {
|
|
|
389
391
|
overflow: auto;
|
|
390
392
|
width: 100%;
|
|
391
393
|
flex-shrink: 0%;
|
|
394
|
+
box-sizing: border-box;
|
|
392
395
|
}
|
|
393
396
|
.pdf-view-area {
|
|
394
397
|
position: relative;
|
|
395
398
|
min-height: 100px;
|
|
399
|
+
box-sizing: border-box;
|
|
396
400
|
.canvasstyle {
|
|
397
401
|
display: block;
|
|
398
402
|
margin: 0 auto;
|