meixioacomponent 0.2.96 → 0.2.97

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": "meixioacomponent",
3
- "version": "0.2.96",
3
+ "version": "0.2.97",
4
4
  "private": false,
5
5
  "author": "YuRi",
6
6
  "main": "lib/meixioacomponent.umd.min.js",
@@ -195,6 +195,7 @@ export default {
195
195
  },
196
196
 
197
197
  async onPasteFile() {
198
+ if (this.uploadLoading) return;
198
199
  const items = (event.clipboardData || window.clipboardData).items;
199
200
  const rowList = [];
200
201
  if (this.fileType == "img") {
@@ -33,6 +33,7 @@ export const baseUploadMixins = {
33
33
  this.$message.error("超出文件上传限制");
34
34
  break;
35
35
  }
36
+ list[i].cb = this.uploadEd;
36
37
  this.module.push(list[i]);
37
38
  }
38
39
  }
@@ -41,15 +42,16 @@ export const baseUploadMixins = {
41
42
  componentConfig.setUploadUrl(uploadPath[0], uploadPath[1]);
42
43
 
43
44
  if (!this.uploadLoading) {
44
- useUpload.toUpload(this.module ? this.module : list, this.uploadEd);
45
+ useUpload.toUpload(
46
+ this.module ? this.module : list,
47
+ this.isGroup ? this.uploadEd : null
48
+ );
45
49
  }
46
50
 
47
51
  this.uploadLoading = true;
48
52
  },
49
53
 
50
54
  uploadEd(list) {
51
- //console.log(list);
52
- //console.log(this.module);
53
55
  this.module = list;
54
56
  this.uploadLoading = false;
55
57
  this.$emit("uploadEd", list);
@@ -124,6 +124,9 @@ export default {
124
124
  .then((uploadEdUrl) => {
125
125
  this.$set(uploadItem, "url", uploadEdUrl);
126
126
  // uploadItem.url = uploadEdUrl;
127
+ if (uploadItem.cb) {
128
+ uploadItem.cb([uploadItem]);
129
+ }
127
130
  this.uploadEd();
128
131
  })
129
132
  .catch((error) => {
@@ -13,7 +13,7 @@ class UseUpload {
13
13
  this.dynamicMount = new DynamicMount({
14
14
  componentProps: {
15
15
  uploadEdEvent: (list) => {
16
- this.uploadEd();
16
+ this.uploadEd(list);
17
17
  if (cb) {
18
18
  cb(list);
19
19
  }
@@ -26,7 +26,7 @@ class UseUpload {
26
26
  }
27
27
  }
28
28
 
29
- uploadEd() {
29
+ uploadEd(list) {
30
30
  setTimeout(() => {
31
31
  let component = this.dynamicMount.getComponent();
32
32
  component.$destroy();