meixioacomponent 0.2.94 → 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.94",
3
+ "version": "0.2.97",
4
4
  "private": false,
5
5
  "author": "YuRi",
6
6
  "main": "lib/meixioacomponent.umd.min.js",
@@ -15,9 +15,9 @@
15
15
  :multiple="uploadType == 'single' ? false : true"
16
16
  />
17
17
  <base-icon
18
+ :size="`l`"
18
19
  :color="`s`"
19
20
  :event="true"
20
- :size="`l`"
21
21
  class="upload-icon"
22
22
  v-if="!isUploadProImg"
23
23
  @iconClick="clickFile"
@@ -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,23 +33,25 @@ 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
  }
39
40
  const { uploadPath } = this.$props;
40
41
 
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) => {
@@ -26,7 +26,7 @@
26
26
  <div class="item-left" @click="showTableColum(item)">
27
27
  <el-checkbox
28
28
  v-model="item.show"
29
- :disabled="item.lock"
29
+ :disabled="item.lock?true:false"
30
30
  ></el-checkbox>
31
31
  <span class="item-text">{{ item.label }}</span>
32
32
  </div>
@@ -10,10 +10,10 @@ class UseUpload {
10
10
  if (this.dynamicMount) {
11
11
  this.appendUploadItem(uploadList);
12
12
  } else {
13
- this.dynamicmount = new DynamicMount({
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
  }
@@ -22,13 +22,13 @@ class UseUpload {
22
22
  },
23
23
  vueComponent: uploadVue,
24
24
  });
25
- this.dynamicmount.init();
25
+ this.dynamicMount.init();
26
26
  }
27
27
  }
28
28
 
29
- uploadEd() {
29
+ uploadEd(list) {
30
30
  setTimeout(() => {
31
- let component = this.dynamicmount.getComponent();
31
+ let component = this.dynamicMount.getComponent();
32
32
  component.$destroy();
33
33
  this.dynamicMount = null;
34
34
  }, 3000);