zydx-plus 1.28.129 → 1.28.131
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
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<div class="ed-head-but" v-for="(item,index) in toolbar">
|
|
7
7
|
<button v-if="item.key === 'but'" class="but" @click="item.onClick(item,info)" :style="{color: (item.active)? '#00ff00' :'#000'}">{{ item.title }}</button>
|
|
8
8
|
<label v-else-if="item.key === 'upImg' || item.key === 'uploadAtt'">
|
|
9
|
-
<input type="file" @change="upload($event,item.key)" :accept="(item.key === 'upImg')?'image/*':'
|
|
9
|
+
<input type="file" @change="upload($event,item.key)" :accept="(item.key === 'upImg')?'image/*':'.docx,.pptx,.pdf,.xlsx,.mp3,.mp4'" style="display: none;">
|
|
10
10
|
<span class="but">{{ item.title }}</span>
|
|
11
11
|
</label>
|
|
12
12
|
<button v-else class="but" @click="toolTap(item.key)">{{ item.title }}</button>
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
<canvas :id="id"></canvas>
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
14
|
-
<div class="page-but-left" :style="{cursor: pageIndex === 1?'default':'pointer'}" @click="
|
|
15
|
-
<div class="page-but-right" :style="{cursor: pageIndex === pdfPages?'default':'pointer'}" @click="
|
|
14
|
+
<div class="page-but-left" :style="{cursor: pageIndex === 1?'default':'pointer'}" @click="flipRight(pageIndex-=1,false)"></div>
|
|
15
|
+
<div class="page-but-right" :style="{cursor: pageIndex === pdfPages?'default':'pointer'}" @click="flipLeft(pageIndex+=1,false)"></div>
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
18
18
|
<div class="but-wrap" v-if="butShow">
|
|
19
|
-
<button class="but-brown" :disabled="pageIndex === 1" :class="{'but-act': pageIndex === 1}" @click="
|
|
20
|
-
<button class="but-brown" :disabled="pageIndex === pdfPages" :class="{'but-act': pageIndex === pdfPages}" @click="
|
|
19
|
+
<button class="but-brown" :disabled="pageIndex === 1" :class="{'but-act': pageIndex === 1}" @click="flipRight(pageIndex-=1,false)">上一页</button>
|
|
20
|
+
<button class="but-brown" :disabled="pageIndex === pdfPages" :class="{'but-act': pageIndex === pdfPages}" @click="flipLeft(pageIndex+=1,false)">下一页</button>
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
23
|
<div v-if="loading" class="loading-back">
|
|
@@ -93,13 +93,13 @@ export default {
|
|
|
93
93
|
},
|
|
94
94
|
methods: {
|
|
95
95
|
flipLeft(e,v) {
|
|
96
|
-
if(e
|
|
97
|
-
this.pageIndex =
|
|
96
|
+
if(e >= this.pdfPages) {
|
|
97
|
+
this.pageIndex = this.pdfPages
|
|
98
98
|
return
|
|
99
99
|
}else {
|
|
100
100
|
this.pageIndex = e
|
|
101
101
|
}
|
|
102
|
-
this.oneIndex = '
|
|
102
|
+
this.oneIndex = 'right'
|
|
103
103
|
this.readPdf()
|
|
104
104
|
if(!v) {
|
|
105
105
|
this.$emit('flip', {
|
|
@@ -109,13 +109,13 @@ export default {
|
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
flipRight(e,v) {
|
|
112
|
-
if(e
|
|
113
|
-
this.pageIndex =
|
|
112
|
+
if(e < 1) {
|
|
113
|
+
this.pageIndex = 1
|
|
114
114
|
return
|
|
115
115
|
}else {
|
|
116
116
|
this.pageIndex = e
|
|
117
117
|
}
|
|
118
|
-
this.oneIndex = '
|
|
118
|
+
this.oneIndex = 'left'
|
|
119
119
|
this.readPdf()
|
|
120
120
|
if(!v) {
|
|
121
121
|
this.$emit('flip', {
|
|
@@ -128,7 +128,9 @@ export default {
|
|
|
128
128
|
if(this.source === '' || this.source === undefined || this.source === null) return
|
|
129
129
|
let that = this
|
|
130
130
|
that.loading = true
|
|
131
|
-
that.
|
|
131
|
+
if(that.imgArr[that.pageIndex - 1] !== undefined) {
|
|
132
|
+
that.oneShow = that.pageIndex !== 1
|
|
133
|
+
}
|
|
132
134
|
const loadingTask = PdfJs.getDocument(this.source)
|
|
133
135
|
loadingTask.promise.then((pdf) => {
|
|
134
136
|
that.pdfPages = pdf.numPages // 获取pdf文件的总页数
|
|
@@ -192,7 +192,8 @@ export default {
|
|
|
192
192
|
height: v-bind(height);
|
|
193
193
|
cursor: grabbing;
|
|
194
194
|
gap: 16px;
|
|
195
|
-
border-bottom: v-bind(border)
|
|
195
|
+
border-bottom: v-bind(border);
|
|
196
|
+
position:relative;
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
.tree_text_active {
|
|
@@ -245,6 +246,9 @@ export default {
|
|
|
245
246
|
font-size: 16px;
|
|
246
247
|
line-height: 30px;
|
|
247
248
|
letter-spacing: 0px;
|
|
249
|
+
white-space: nowrap;
|
|
250
|
+
overflow: hidden;
|
|
251
|
+
text-overflow: ellipsis;
|
|
248
252
|
}
|
|
249
253
|
|
|
250
254
|
.children {
|