zydx-plus 1.19.98 → 1.19.101
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
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<div class="editor-but" v-if="butText !== ''&& readOnly">
|
|
21
21
|
<button class="but" @click="complete">{{ butText }}</button>
|
|
22
22
|
</div>
|
|
23
|
-
<div class="enclosure" v-if="uploadAttData.length > 0">
|
|
23
|
+
<div class="enclosure" v-if="uploadAttData.length > 0 && enclosureShow">
|
|
24
24
|
<p v-if="editorShow">附件列表:</p>
|
|
25
25
|
<div class="enclosure-list" v-for="(item,index) in uploadAttData">
|
|
26
26
|
<div class="enclosure-item">
|
|
@@ -158,6 +158,10 @@ export default {
|
|
|
158
158
|
borderShow: {
|
|
159
159
|
type: Boolean,
|
|
160
160
|
default: true
|
|
161
|
+
},
|
|
162
|
+
enclosureShow: {
|
|
163
|
+
type: Boolean,
|
|
164
|
+
default: true
|
|
161
165
|
}
|
|
162
166
|
},
|
|
163
167
|
emits: ['see','del','complete','update:data'],
|
|
@@ -180,7 +184,7 @@ export default {
|
|
|
180
184
|
Image.configure({
|
|
181
185
|
inline: true,
|
|
182
186
|
HTMLAttributes: {
|
|
183
|
-
|
|
187
|
+
class: 'editor-img'
|
|
184
188
|
}
|
|
185
189
|
}),
|
|
186
190
|
],
|
|
@@ -258,7 +262,7 @@ export default {
|
|
|
258
262
|
},
|
|
259
263
|
tag: 'img',
|
|
260
264
|
node: "element",
|
|
261
|
-
}]
|
|
265
|
+
}],
|
|
262
266
|
}
|
|
263
267
|
]
|
|
264
268
|
this.insertContent(html)
|
|
@@ -267,8 +271,8 @@ export default {
|
|
|
267
271
|
}else {
|
|
268
272
|
this.uploadFile(file,(v === 'uploadAtt')? this.uploadAttachment: this.uploadImage).then(r => {
|
|
269
273
|
if(v === 'uploadAtt') {
|
|
270
|
-
r.data.active = true
|
|
271
|
-
this.uploadAttData.push(r.data)
|
|
274
|
+
r.data.annex.active = true
|
|
275
|
+
this.uploadAttData.push(r.data.annex)
|
|
272
276
|
}else {
|
|
273
277
|
const url = this.uploadImage.url + r.data
|
|
274
278
|
const html = [
|
|
@@ -350,6 +354,9 @@ export default {
|
|
|
350
354
|
</script>
|
|
351
355
|
|
|
352
356
|
<style scoped>
|
|
357
|
+
:deep(.editor-img){
|
|
358
|
+
max-width: 100%;
|
|
359
|
+
}
|
|
353
360
|
.editor-but{
|
|
354
361
|
text-align: right;
|
|
355
362
|
margin: 10px 0;
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
<button class="but-brown" :disabled="pageIndex === pdfPages" :class="{'but-act': pageIndex === pdfPages}" @click="flipRight(pageIndex+=1,false)">下一页</button>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
|
+
<div v-if="loading" class="loading-back">
|
|
29
|
+
<div class="loading-cont">
|
|
30
|
+
<div class="loading">Loading</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
28
33
|
</div>
|
|
29
34
|
</template>
|
|
30
35
|
|
|
@@ -45,7 +50,8 @@ export default {
|
|
|
45
50
|
pages: false,
|
|
46
51
|
pagesData: [],
|
|
47
52
|
opacity: 1,
|
|
48
|
-
id: null
|
|
53
|
+
id: null,
|
|
54
|
+
loading: false
|
|
49
55
|
}
|
|
50
56
|
},
|
|
51
57
|
props: {
|
|
@@ -110,6 +116,7 @@ export default {
|
|
|
110
116
|
},
|
|
111
117
|
readPdf() {
|
|
112
118
|
let that = this
|
|
119
|
+
that.loading = true
|
|
113
120
|
const loadingTask = PdfJs.getDocument(this.source)
|
|
114
121
|
loadingTask.promise.then((pdf) => {
|
|
115
122
|
that.pdfPages = pdf.numPages // 获取pdf文件的总页数
|
|
@@ -127,6 +134,7 @@ export default {
|
|
|
127
134
|
transform: [2, 0, 0, 2, 0, 0]//这里会进行放大,解决模糊问题
|
|
128
135
|
}
|
|
129
136
|
page.render(renderContext)
|
|
137
|
+
that.loading = false
|
|
130
138
|
})
|
|
131
139
|
})
|
|
132
140
|
}
|
|
@@ -179,6 +187,7 @@ export default {
|
|
|
179
187
|
}
|
|
180
188
|
.docView{
|
|
181
189
|
height: 100%;
|
|
190
|
+
position: relative;
|
|
182
191
|
}
|
|
183
192
|
.but-brown{
|
|
184
193
|
background-color: #c64c10;
|
|
@@ -200,4 +209,50 @@ export default {
|
|
|
200
209
|
background-color: #bbbbbb;
|
|
201
210
|
color: #fff;
|
|
202
211
|
}
|
|
212
|
+
.loading-back{
|
|
213
|
+
position: absolute;
|
|
214
|
+
top: 0;
|
|
215
|
+
left: 0;
|
|
216
|
+
right: 0;
|
|
217
|
+
bottom: 0;
|
|
218
|
+
z-index: 100;
|
|
219
|
+
display: flex;
|
|
220
|
+
align-items: center;
|
|
221
|
+
}
|
|
222
|
+
.loading-cont{
|
|
223
|
+
display: inline-block;
|
|
224
|
+
margin: 0 auto;
|
|
225
|
+
}
|
|
226
|
+
.loading {
|
|
227
|
+
display: inline-block;
|
|
228
|
+
font-size: 28px;
|
|
229
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
230
|
+
font-weight: bold;
|
|
231
|
+
color: #fff;
|
|
232
|
+
text-shadow: 0 0 2px #ff3d00, 0 0 1px #ff3d00, 0 0 1px #ff3d00;
|
|
233
|
+
letter-spacing: 2px;
|
|
234
|
+
position: relative;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.loading::after {
|
|
238
|
+
content: "Loading";
|
|
239
|
+
position: absolute;
|
|
240
|
+
left: 0;
|
|
241
|
+
top: 0;
|
|
242
|
+
color: #ff3d00;
|
|
243
|
+
width: 0%;
|
|
244
|
+
height: 100%;
|
|
245
|
+
overflow: hidden;
|
|
246
|
+
animation: loading-animation 6s linear infinite;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
@keyframes loading-animation {
|
|
250
|
+
0% {
|
|
251
|
+
width: 0%;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
100% {
|
|
255
|
+
width: 100%;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
203
258
|
</style>
|