zydx-plus 1.32.244 → 1.32.246
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/package.json
CHANGED
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
<button class="but" @click="imgCancel">取消</button>
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
62
|
-
<div v-if="loading" class="loading-back"
|
|
63
|
-
<div class="loading-cont"
|
|
64
|
-
<div class="loadings">Loading</div
|
|
65
|
-
</div
|
|
66
|
-
</div
|
|
62
|
+
<!-- <div v-if="loading" class="loading-back">-->
|
|
63
|
+
<!-- <div class="loading-cont">-->
|
|
64
|
+
<!-- <div class="loadings">Loading</div>-->
|
|
65
|
+
<!-- </div>-->
|
|
66
|
+
<!-- </div>-->
|
|
67
67
|
<div class="down-html" id="test" v-html="htmlArr2"></div>
|
|
68
68
|
</div>
|
|
69
69
|
</template>
|
|
@@ -308,7 +308,7 @@ export default {
|
|
|
308
308
|
let imgIndex = 0
|
|
309
309
|
const data = document.querySelectorAll('.editing-cont')[0].childNodes[0].childNodes
|
|
310
310
|
for (let i = 0; i < data.length; i++) {
|
|
311
|
-
if(data[i].firstChild
|
|
311
|
+
if(data[i].firstChild?.localName === 'img') {
|
|
312
312
|
that.imgBase64(data[i]).then(res => {
|
|
313
313
|
imgArr.push(res)
|
|
314
314
|
})
|
|
@@ -947,8 +947,8 @@ label {
|
|
|
947
947
|
|
|
948
948
|
.editing-header {
|
|
949
949
|
position: absolute;
|
|
950
|
-
top:
|
|
951
|
-
left:
|
|
950
|
+
top: 0;
|
|
951
|
+
left: 0;
|
|
952
952
|
display: flex;
|
|
953
953
|
z-index: 1;
|
|
954
954
|
}
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
<script>
|
|
32
32
|
import * as PdfJs from 'pdfjs-dist/legacy/build/pdf.js' // 注意导入的写法d
|
|
33
33
|
PdfJs.GlobalWorkerOptions.workerSrc = require('pdfjs-dist/build/pdf.worker.entry')
|
|
34
|
+
const jsdelivr = 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.16.105/cmaps/'
|
|
34
35
|
export default {
|
|
35
36
|
name: "zydx-flip",
|
|
36
37
|
data() {
|
|
@@ -87,12 +88,12 @@ export default {
|
|
|
87
88
|
handler: function (val, oldVal) {
|
|
88
89
|
this.readPdf()
|
|
89
90
|
},
|
|
91
|
+
deep: true,
|
|
90
92
|
immediate: true
|
|
91
93
|
}
|
|
92
94
|
},
|
|
93
95
|
emits: ['flip'],
|
|
94
96
|
mounted() {
|
|
95
|
-
// this.readPdf()
|
|
96
97
|
this.id = 'canvas-wrap' + Math.random().toString(36).substr(2)
|
|
97
98
|
},
|
|
98
99
|
methods: {
|
|
@@ -137,7 +138,7 @@ export default {
|
|
|
137
138
|
}
|
|
138
139
|
const loadingTask = PdfJs.getDocument({
|
|
139
140
|
url: this.source,
|
|
140
|
-
cMapUrl:
|
|
141
|
+
cMapUrl: jsdelivr,
|
|
141
142
|
cMapPacked: true
|
|
142
143
|
})
|
|
143
144
|
loadingTask.promise.then((pdf) => {
|