zydx-plus 1.19.97 → 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.97",
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>
@@ -25,13 +25,13 @@
25
25
  <div class="tip-input" v-for="(item,index) in inputArr" :key="index">
26
26
  <span v-if="item.name">{{ item.name }}</span>
27
27
  <div style="display: inline-block;" v-if="item.type === 'input'">
28
- <input v-if="!item.number" type="text" :placeholder="item.placeholder"
29
- v-model="item.value" :disabled="item.disabled"/>
30
- <div v-else class="number-input">
28
+ <div v-if="item.number" class="number-input">
31
29
  <input type="number" @keypress="isNumberKey($event,index)"
32
30
  :placeholder="item.placeholder"
33
31
  v-model="item.value" :disabled="item.disabled"/>
34
32
  </div>
33
+ <input v-else type="text" :placeholder="item.placeholder"
34
+ v-model="item.value" :disabled="item.disabled"/>
35
35
  </div>
36
36
  <div style="display: inline-block;">
37
37
  <Select v-if="item.type === 'select'" :options="item.option"
@@ -66,20 +66,6 @@
66
66
  <script>
67
67
  import Select from '../../select/src/select.vue'
68
68
  import Calendar from '../../calendar/src/Calendar'
69
- function isNumberKey(evt) {
70
- var charCode = (evt.which) ? evt.which : event.keyCode;
71
- if (charCode === 46) {
72
- // Check if the text already contains a decimal point
73
- return evt.target.value.indexOf('.') === -1;
74
- } else if (charCode > 31 && (charCode < 48 || charCode > 57))
75
- return false;
76
-
77
- // Check if the first character is zero
78
- return !(evt.target.value === '' && String.fromCharCode(charCode) === '0');
79
-
80
-
81
- }
82
-
83
69
 
84
70
  export default {
85
71
  name: 'zydx-tip-box',
@@ -137,8 +123,10 @@ export default {
137
123
  methods: {
138
124
  isNumberKey(evt,index) {
139
125
  const charCode = (evt.which) ? evt.which : event.keyCode;
126
+ if(this.inputArr[index].value === undefined) return true
127
+ let val = this.inputArr[index].value.toString()
140
128
  if (charCode === 46) {
141
- if (this.inputArr[index].value.indexOf('.') !== -1)
129
+ if (val.indexOf('.') !== -1)
142
130
  evt.preventDefault();
143
131
  else
144
132
  return true;
@@ -148,10 +136,8 @@ export default {
148
136
  if (this.valueState(this.inputArr[index].value) && String.fromCharCode(charCode) === '0')
149
137
  evt.preventDefault();
150
138
  // 判断是否有小数点
151
- if(this.inputArr[index].value === undefined) return true
152
- if (this.inputArr[index].value.indexOf('.') !== -1) {
153
- // 判断小数点的位数
154
- if (this.inputArr[index].value.split('.')[1].length >= 1) {
139
+ if (val.indexOf('.') !== -1) {
140
+ if (val[1].length >= 1) {
155
141
  evt.preventDefault();
156
142
  }
157
143
  }
package/src/index.js CHANGED
@@ -57,7 +57,7 @@ function install(app) {
57
57
  }
58
58
 
59
59
  export default {
60
- version: '1.19.97',
60
+ version: '1.19.99',
61
61
  install,
62
62
  Calendar,
63
63
  Message,