zydx-plus 1.35.464 → 1.35.466
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
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
<script>
|
|
102
102
|
import * as PdfJs from 'pdfjs-dist/legacy/build/pdf.js'
|
|
103
103
|
import Mess from '../../tipBox/index'
|
|
104
|
+
import {debounce} from '../../utils'
|
|
104
105
|
|
|
105
106
|
PdfJs.GlobalWorkerOptions.workerSrc = require('pdfjs-dist/build/pdf.worker.entry')
|
|
106
107
|
|
|
@@ -1176,7 +1177,7 @@ export default {
|
|
|
1176
1177
|
})
|
|
1177
1178
|
})
|
|
1178
1179
|
},
|
|
1179
|
-
readPdf() {
|
|
1180
|
+
readPdf:debounce(()=> {
|
|
1180
1181
|
let that = this
|
|
1181
1182
|
this.mouse()
|
|
1182
1183
|
pdfs.getPage(that.pageIndex).then(function (page) {
|
|
@@ -1228,8 +1229,8 @@ export default {
|
|
|
1228
1229
|
that.processing()
|
|
1229
1230
|
}, 1000)
|
|
1230
1231
|
})
|
|
1231
|
-
},
|
|
1232
|
-
readDoublePdf()
|
|
1232
|
+
},200),
|
|
1233
|
+
readDoublePdf:debounce(()=>{
|
|
1233
1234
|
let that = this
|
|
1234
1235
|
this.mouse()
|
|
1235
1236
|
this.$nextTick(()=>{
|
|
@@ -1286,7 +1287,7 @@ export default {
|
|
|
1286
1287
|
})
|
|
1287
1288
|
})
|
|
1288
1289
|
})
|
|
1289
|
-
},
|
|
1290
|
+
},200),
|
|
1290
1291
|
generateUniqueKey (){
|
|
1291
1292
|
// Math.random().toString(36).substr(2)
|
|
1292
1293
|
return `${new Date().getTime()}${Math.random().toString(36).substr(2)}`;
|
|
@@ -35,7 +35,7 @@ import '@vue-office/docx/lib/index.css'
|
|
|
35
35
|
import '@vue-office/excel/lib/index.css'
|
|
36
36
|
|
|
37
37
|
import Mess from '../../tipBox/index'
|
|
38
|
-
import {debounce} from "
|
|
38
|
+
import {debounce} from "../../utils";
|
|
39
39
|
let pdfs = null
|
|
40
40
|
export default {
|
|
41
41
|
name: "zydx-read",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<div v-if="isShowsLeft" class="left" ref="leftRef">
|
|
5
5
|
<slot name="left"></slot>
|
|
6
6
|
</div>
|
|
7
|
-
<div v-if="isShowsRight
|
|
7
|
+
<div v-if="isShowsRight && isShowsLeft" class="resize" ref="resizeRef"></div>
|
|
8
8
|
<div v-if="isShowsRight" class="right" ref="rightRef">
|
|
9
9
|
<!-- 右侧内容,默认展示30%,默认最小宽度310px-->
|
|
10
10
|
<slot name="right"></slot>
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
isShowsRight:{
|
|
30
30
|
handler: function (v) {
|
|
31
31
|
setTimeout(() => {
|
|
32
|
-
if(
|
|
32
|
+
if(this.isShowsRight) {
|
|
33
33
|
this.handleResize()
|
|
34
34
|
} else {
|
|
35
35
|
this.$refs.leftRef.style.width = '100%'
|
|
@@ -39,15 +39,15 @@ export default {
|
|
|
39
39
|
immediate: true,
|
|
40
40
|
deep: true
|
|
41
41
|
},
|
|
42
|
-
isShowsLeft:{
|
|
42
|
+
isShowsLeft: {
|
|
43
43
|
handler: function (v) {
|
|
44
44
|
setTimeout(() => {
|
|
45
|
-
if(
|
|
45
|
+
if (this.isShowsLeft) {
|
|
46
46
|
this.handleResize()
|
|
47
47
|
} else {
|
|
48
48
|
this.$refs.rightRef.style.width = '100%'
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
}, 100)
|
|
51
51
|
},
|
|
52
52
|
immediate: true,
|
|
53
53
|
deep: true
|
|
@@ -104,10 +104,8 @@ export default {
|
|
|
104
104
|
box-sizing: border-box;
|
|
105
105
|
}
|
|
106
106
|
.left {
|
|
107
|
-
width:
|
|
108
|
-
background-color: #f1eab3
|
|
109
|
-
border-right: 2px solid #dcdfe6;
|
|
110
|
-
overflow: hidden;
|
|
107
|
+
width: 100%;
|
|
108
|
+
/*background-color: #f1eab3;*/
|
|
111
109
|
}
|
|
112
110
|
.resize {
|
|
113
111
|
position: relative;
|
|
@@ -115,15 +113,14 @@ export default {
|
|
|
115
113
|
cursor: col-resize;
|
|
116
114
|
background-size: cover;
|
|
117
115
|
background-position: center;
|
|
116
|
+
border-right: 2px solid #dcdfe6;
|
|
117
|
+
border-left: 2px solid #dcdfe6;
|
|
118
118
|
}
|
|
119
119
|
.resize:hover {
|
|
120
|
-
/*background-color: #45a3ff;*/
|
|
121
120
|
background-color: white;
|
|
122
121
|
}
|
|
123
122
|
.right {
|
|
124
123
|
width: 310px;
|
|
125
|
-
background-color: #b5ef8f
|
|
126
|
-
border-left: 2px solid #dcdfe6;
|
|
127
|
-
overflow: hidden;
|
|
124
|
+
/* background-color: #b5ef8f;*/
|
|
128
125
|
}
|
|
129
126
|
</style>
|