zydx-plus 1.19.98 → 1.19.99

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.19.98",
3
+ "version": "1.19.99",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -180,7 +180,7 @@ export default {
180
180
  Image.configure({
181
181
  inline: true,
182
182
  HTMLAttributes: {
183
- width: '100%'
183
+ class: 'editor-img'
184
184
  }
185
185
  }),
186
186
  ],
@@ -258,7 +258,7 @@ export default {
258
258
  },
259
259
  tag: 'img',
260
260
  node: "element",
261
- }]
261
+ }],
262
262
  }
263
263
  ]
264
264
  this.insertContent(html)
@@ -267,8 +267,8 @@ export default {
267
267
  }else {
268
268
  this.uploadFile(file,(v === 'uploadAtt')? this.uploadAttachment: this.uploadImage).then(r => {
269
269
  if(v === 'uploadAtt') {
270
- r.data.active = true
271
- this.uploadAttData.push(r.data)
270
+ r.data.annex.active = true
271
+ this.uploadAttData.push(r.data.annex)
272
272
  }else {
273
273
  const url = this.uploadImage.url + r.data
274
274
  const html = [
@@ -350,6 +350,9 @@ export default {
350
350
  </script>
351
351
 
352
352
  <style scoped>
353
+ :deep(.editor-img){
354
+ max-width: 100%;
355
+ }
353
356
  .editor-but{
354
357
  text-align: right;
355
358
  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>
package/src/index.js CHANGED
@@ -57,7 +57,7 @@ function install(app) {
57
57
  }
58
58
 
59
59
  export default {
60
- version: '1.19.98',
60
+ version: '1.19.99',
61
61
  install,
62
62
  Calendar,
63
63
  Message,