meixioacomponent 2.0.44 → 2.0.46
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/lib/components/index.d.ts.map +1 -1
- package/lib/config/use/UseUpload.d.ts.map +1 -1
- package/lib/config/use/UseUpload.js +13 -13
- package/lib/meixioacomponent.common.js +179 -116
- package/lib/meixioacomponent.umd.js +179 -116
- package/lib/meixioacomponent.umd.min.js +2 -2
- package/lib/style/tableStyle.less +5 -5
- package/package.json +1 -1
- package/packages/components/base/baseText/index.vue +20 -12
- package/packages/components/base/baseToggle/toggle.vue +59 -13
- package/packages/components/base/baseUpload/mixins.js +1 -0
- package/packages/components/base/baseUploadTemplate/index.vue +0 -1
- package/packages/components/base/upload/upload.vue +46 -45
- package/packages/components/index.ts +0 -2
- package/packages/components/proPageTable/oa_pro_table.vue +12 -13
- package/packages/components/searchHeader/searchHeader.vue +2 -2
- package/packages/components/style/tableStyle.less +5 -5
- package/packages/config/use/UseUpload.js +13 -14
- package/packages/config/use/UseUpload.ts +13 -13
- package/packages/utils/upload.js +1 -0
|
@@ -7,21 +7,21 @@
|
|
|
7
7
|
text-overflow: ellipsis;
|
|
8
8
|
font-weight: var(--font-weight-m);
|
|
9
9
|
color: var(--font-color-d) !important;
|
|
10
|
-
font-size: var(--font-size-
|
|
10
|
+
font-size: var(--font-size-l) !important;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.warn {
|
|
14
|
-
font-size: var(--font-size-
|
|
14
|
+
font-size: var(--font-size-l) !important;
|
|
15
15
|
color: var(--color-warn) !important;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.error {
|
|
19
|
-
font-size: var(--font-size-
|
|
19
|
+
font-size: var(--font-size-l) !important;
|
|
20
20
|
color: var(--color-error) !important;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.success {
|
|
24
|
-
font-size: var(--font-size-
|
|
24
|
+
font-size: var(--font-size-l) !important;
|
|
25
25
|
color: var(--color-success) !important;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
.primary,
|
|
30
30
|
.fun, .handle-primary {
|
|
31
31
|
color: var(--color-primary) !important;
|
|
32
|
-
font-size: var(--font-size-
|
|
32
|
+
font-size: var(--font-size-l) !important;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.fun, .handle-primary {
|
package/package.json
CHANGED
|
@@ -10,8 +10,21 @@
|
|
|
10
10
|
{{ filterContent() }}
|
|
11
11
|
</div>
|
|
12
12
|
<div v-else-if="type==='money'" :class="[type]">
|
|
13
|
-
<t-statistic
|
|
13
|
+
<t-statistic
|
|
14
|
+
:value="parseFloat(content)" prefix="¥" trend="increase"/>
|
|
14
15
|
</div>
|
|
16
|
+
|
|
17
|
+
<div v-else-if="type==='money+'" :class="[type]">
|
|
18
|
+
<t-statistic
|
|
19
|
+
:color="parseFloat(content)>0?'var(--color-error)': 'var(--font-color-d)'"
|
|
20
|
+
:value="parseFloat(content)" prefix="¥" trend="increase"/>
|
|
21
|
+
</div>
|
|
22
|
+
<div v-else-if="type==='money-'" :class="[type]">
|
|
23
|
+
<t-statistic
|
|
24
|
+
:color="parseFloat(content)<0?'var(--color-success)':'var(--font-color-d)'"
|
|
25
|
+
:value="parseFloat(content)" prefix="¥" trend="increase"/>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
15
28
|
<div v-else-if="type==='number'" :class="[type]">
|
|
16
29
|
{{ filterContent() }}
|
|
17
30
|
</div>
|
|
@@ -19,13 +32,8 @@
|
|
|
19
32
|
<div v-else class="default">
|
|
20
33
|
{{ filterContent() }}
|
|
21
34
|
</div>
|
|
22
|
-
|
|
23
35
|
</div>
|
|
24
|
-
|
|
25
|
-
|
|
26
36
|
<div v-else class="empty">暂无数据</div>
|
|
27
|
-
|
|
28
|
-
|
|
29
37
|
</template>
|
|
30
38
|
|
|
31
39
|
|
|
@@ -135,7 +143,7 @@ export default {
|
|
|
135
143
|
|
|
136
144
|
.base-text-wrap {
|
|
137
145
|
width: fit-content;
|
|
138
|
-
font-size: var(--font-size-
|
|
146
|
+
font-size: var(--font-size-l);
|
|
139
147
|
|
|
140
148
|
.default {
|
|
141
149
|
overflow: hidden;
|
|
@@ -150,11 +158,11 @@ export default {
|
|
|
150
158
|
justify-content: flex-start;
|
|
151
159
|
}
|
|
152
160
|
|
|
153
|
-
.time, .number, .money {
|
|
161
|
+
.time, .number, .money, .money +, .money- {
|
|
154
162
|
font-family: TCloudNumber !important;
|
|
155
163
|
}
|
|
156
164
|
|
|
157
|
-
.money {
|
|
165
|
+
.money, .money +, .money- {
|
|
158
166
|
font-weight: var(--font-weight-kg);
|
|
159
167
|
}
|
|
160
168
|
|
|
@@ -164,7 +172,7 @@ export default {
|
|
|
164
172
|
}
|
|
165
173
|
|
|
166
174
|
/deep/ .t-statistic-content-value {
|
|
167
|
-
font-size: var(--font-size-
|
|
175
|
+
font-size: var(--font-size-l) !important;
|
|
168
176
|
font-family: TCloudNumber !important;
|
|
169
177
|
}
|
|
170
178
|
|
|
@@ -172,7 +180,7 @@ export default {
|
|
|
172
180
|
|
|
173
181
|
.handle {
|
|
174
182
|
color: var(--color-primary) !important;
|
|
175
|
-
font-size: var(--font-size-
|
|
183
|
+
font-size: var(--font-size-l) !important;
|
|
176
184
|
cursor: pointer;
|
|
177
185
|
|
|
178
186
|
&:hover {
|
|
@@ -183,6 +191,6 @@ export default {
|
|
|
183
191
|
|
|
184
192
|
.empty {
|
|
185
193
|
color: var(--font-color-ds);
|
|
186
|
-
font-size: var(--font-size-
|
|
194
|
+
font-size: var(--font-size-l);
|
|
187
195
|
}
|
|
188
196
|
</style>
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
<t-radio-group
|
|
3
|
+
ref="tRadioGroupRef"
|
|
4
|
+
v-model="module" :disabled="disabled" variant="primary-filled" :size="componentSize">
|
|
5
|
+
<t-radio-button
|
|
6
|
+
:disabled="item.disabled"
|
|
7
|
+
v-for="(item, index) in toggleList"
|
|
8
|
+
:key="index"
|
|
9
|
+
:value="item.value">{{ item.label }}
|
|
10
|
+
</t-radio-button>
|
|
11
|
+
</t-radio-group>
|
|
10
12
|
</template>
|
|
11
13
|
|
|
12
14
|
<script>
|
|
15
|
+
const checkedClassName = 't-is-checked';
|
|
16
|
+
const radioButtonClassName = 't-radio-button';
|
|
17
|
+
const blockClassName = 't-radio-group__bg-block'
|
|
18
|
+
|
|
13
19
|
import {TransomComponentSize} from "../../../utils/utils";
|
|
14
20
|
|
|
15
21
|
export default {
|
|
@@ -24,6 +30,7 @@ export default {
|
|
|
24
30
|
},
|
|
25
31
|
toggleList: {
|
|
26
32
|
require: true,
|
|
33
|
+
type: Array,
|
|
27
34
|
},
|
|
28
35
|
size: {
|
|
29
36
|
type: String,
|
|
@@ -49,32 +56,71 @@ export default {
|
|
|
49
56
|
computed: {
|
|
50
57
|
module: {
|
|
51
58
|
set(val) {
|
|
52
|
-
const {beforeHandle,toggleList} = this.$props
|
|
53
|
-
const index =
|
|
54
|
-
|
|
59
|
+
const {beforeHandle, toggleList} = this.$props
|
|
60
|
+
const index = toggleList.findIndex(item => {
|
|
61
|
+
return item.value === val
|
|
62
|
+
});
|
|
63
|
+
const item = toggleList[index];
|
|
55
64
|
if (beforeHandle) {
|
|
56
65
|
beforeHandle(() => {
|
|
57
66
|
this.setModule(item)
|
|
58
67
|
this.$emit('input', val)
|
|
68
|
+
this.onRadioChange(val);
|
|
59
69
|
}, item)
|
|
60
70
|
} else {
|
|
61
71
|
this.$emit('input', val)
|
|
62
72
|
this.setModule(item)
|
|
73
|
+
this.onRadioChange(val);
|
|
63
74
|
}
|
|
64
75
|
},
|
|
65
76
|
get() {
|
|
66
77
|
return this.$props.value
|
|
67
78
|
},
|
|
68
79
|
},
|
|
69
|
-
componentSize(){
|
|
80
|
+
componentSize() {
|
|
70
81
|
return TransomComponentSize(this.$props.size);
|
|
71
|
-
|
|
72
82
|
}
|
|
73
83
|
},
|
|
84
|
+
mounted() {
|
|
85
|
+
this.$nextTick(() => {
|
|
86
|
+
this.onRadioChange(this.module)
|
|
87
|
+
})
|
|
88
|
+
},
|
|
89
|
+
updated() {
|
|
90
|
+
this.onRadioChange(this.module)
|
|
91
|
+
},
|
|
74
92
|
methods: {
|
|
75
93
|
setModule(item) {
|
|
76
94
|
this.$emit('handletoggle', item)
|
|
77
95
|
},
|
|
96
|
+
onRadioChange(value) {
|
|
97
|
+
if (this.$props.toggleList.length !== 2) return;
|
|
98
|
+
this.$nextTick(() => {
|
|
99
|
+
const toggleIndex = this.$props.toggleList.findIndex(item => {
|
|
100
|
+
return item.value === value;
|
|
101
|
+
})
|
|
102
|
+
if (toggleIndex > -1) {
|
|
103
|
+
const el = this.$refs.tRadioGroupRef.$el;
|
|
104
|
+
if (el) {
|
|
105
|
+
const buttonList = el.querySelectorAll(`.${radioButtonClassName}`);
|
|
106
|
+
const checkEl = el.querySelector(`.${checkedClassName}`);
|
|
107
|
+
if (buttonList) {
|
|
108
|
+
for (let i = 0; i < buttonList.length; i++) {
|
|
109
|
+
const item = buttonList[i];
|
|
110
|
+
item.style.setProperty('color', `var(--font-color-m)`)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (checkEl) {
|
|
114
|
+
checkEl.style.setProperty('color', `${this.$props.toggleTextColor[toggleIndex]} !important`)
|
|
115
|
+
}
|
|
116
|
+
const blockEl = el.querySelector(`.${blockClassName}`);
|
|
117
|
+
if (blockEl) {
|
|
118
|
+
blockEl.style.setProperty('background-color', `${this.$props.toggleColor[toggleIndex]} !important`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
})
|
|
123
|
+
}
|
|
78
124
|
},
|
|
79
125
|
}
|
|
80
126
|
</script>
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
<div class="upload-content">
|
|
25
25
|
<uploadItemVue
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
v-for="(item, index) in filterArray"
|
|
27
|
+
:key="index"
|
|
28
|
+
:item="item"
|
|
29
|
+
@deleteAppendixItem="deleteAppendixItem"
|
|
30
30
|
></uploadItemVue>
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
import uploadItemVue from "./uploadItem.vue";
|
|
37
37
|
//
|
|
38
38
|
import Upload from "../../../utils/upload";
|
|
39
|
-
import {ArrowDownIcon,ArrowUpIcon,CloseIcon} from "tdesign-icons-vue"
|
|
39
|
+
import {ArrowDownIcon, ArrowUpIcon, CloseIcon} from "tdesign-icons-vue"
|
|
40
40
|
|
|
41
41
|
export default {
|
|
42
42
|
name: "upload",
|
|
@@ -89,13 +89,13 @@ export default {
|
|
|
89
89
|
completed() {
|
|
90
90
|
let uploadArray = this.uploadArray;
|
|
91
91
|
return (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
uploadArray?.filter((item) => {
|
|
93
|
+
return item.process === 100;
|
|
94
|
+
}).length / uploadArray?.length
|
|
95
95
|
);
|
|
96
96
|
},
|
|
97
97
|
totalStyle() {
|
|
98
|
-
return {
|
|
98
|
+
return {width: `${this.completed * 100}%`};
|
|
99
99
|
},
|
|
100
100
|
},
|
|
101
101
|
methods: {
|
|
@@ -139,27 +139,26 @@ export default {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
this.$set(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
142
|
+
uploadItem,
|
|
143
|
+
"upload",
|
|
144
|
+
new Upload({
|
|
145
|
+
file: uploadItem.file,
|
|
146
|
+
uploadProgressFn: (process) => {
|
|
147
|
+
uploadItem.process = process;
|
|
148
|
+
},
|
|
149
|
+
})
|
|
150
150
|
);
|
|
151
151
|
|
|
152
152
|
uploadItem.upload
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
});
|
|
153
|
+
.start(this.$props.isOss)
|
|
154
|
+
.then((uploadEdUrl) => {
|
|
155
|
+
this.$set(uploadItem, "url", uploadEdUrl);
|
|
156
|
+
this.uploadEd();
|
|
157
|
+
})
|
|
158
|
+
.catch((error) => {
|
|
159
|
+
this.$set(uploadItem, "url", "cancel");
|
|
160
|
+
this.uploadEd(error);
|
|
161
|
+
});
|
|
163
162
|
}
|
|
164
163
|
},
|
|
165
164
|
|
|
@@ -174,21 +173,22 @@ export default {
|
|
|
174
173
|
cancelButtonText: "取消",
|
|
175
174
|
type: "warning",
|
|
176
175
|
})
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
176
|
+
.then(() => {
|
|
177
|
+
this.uploadArray.forEach((item) => {
|
|
178
|
+
if (item.upload?.state === 0) {
|
|
179
|
+
item.upload.cancel();
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
this.uploadEd();
|
|
183
|
+
})
|
|
184
|
+
.catch(() => {
|
|
182
185
|
});
|
|
183
|
-
this.uploadEd();
|
|
184
|
-
})
|
|
185
|
-
.catch(() => {});
|
|
186
186
|
} else {
|
|
187
187
|
this.uploadEd();
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
190
|
|
|
191
|
-
judgeUploadMapItemUploaded() {
|
|
191
|
+
judgeUploadMapItemUploaded(statusOfError = false) {
|
|
192
192
|
this.uploadArrayMap.forEach((value, key) => {
|
|
193
193
|
let uploadArr = this.uploadArrayMap.get(key);
|
|
194
194
|
|
|
@@ -197,14 +197,14 @@ export default {
|
|
|
197
197
|
});
|
|
198
198
|
// 判断群组是否上传了 只需要执行数组的第一个就行了
|
|
199
199
|
if (flag) {
|
|
200
|
-
uploadArr[0]?.cb(uploadArr);
|
|
200
|
+
uploadArr[0]?.cb(statusOfError ? statusOfError : uploadArr);
|
|
201
201
|
}
|
|
202
202
|
});
|
|
203
203
|
},
|
|
204
204
|
|
|
205
205
|
uploadEd(statusOfError = false) {
|
|
206
206
|
let uploadArray = this.uploadArray;
|
|
207
|
-
this.judgeUploadMapItemUploaded();
|
|
207
|
+
this.judgeUploadMapItemUploaded(statusOfError);
|
|
208
208
|
let flag = uploadArray.every((item) => {
|
|
209
209
|
return !item.upload || item.upload.state !== 0 || item.url === "cancel";
|
|
210
210
|
});
|
|
@@ -216,7 +216,7 @@ export default {
|
|
|
216
216
|
});
|
|
217
217
|
|
|
218
218
|
this.$props.uploadEdEvent(
|
|
219
|
-
|
|
219
|
+
statusOfError ? statusOfError : uploadArray
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
@@ -228,12 +228,13 @@ export default {
|
|
|
228
228
|
cancelButtonText: "取消",
|
|
229
229
|
type: "warning",
|
|
230
230
|
})
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
231
|
+
.then(() => {
|
|
232
|
+
if (item.upload?.state === 0) {
|
|
233
|
+
item.upload.cancel();
|
|
234
|
+
}
|
|
235
|
+
})
|
|
236
|
+
.catch(() => {
|
|
237
|
+
});
|
|
237
238
|
},
|
|
238
239
|
|
|
239
240
|
uploadFailed() {
|
|
@@ -156,8 +156,6 @@ const install = (Vue) => {
|
|
|
156
156
|
componentConfig.createDialogCacheWrap();
|
|
157
157
|
componentConfig.eventBus = new componentConfig.Vue();
|
|
158
158
|
proTableLocalConfigManage.initByProTableLocalConfigManage();
|
|
159
|
-
|
|
160
|
-
|
|
161
159
|
};
|
|
162
160
|
//
|
|
163
161
|
if (typeof window !== "undefined" && window[`Vue`]) {
|
|
@@ -233,6 +233,8 @@ import TableCheckControl from "./TableCheckControl";
|
|
|
233
233
|
import proTableLocalConfigManage from "../../config/ProTableLocalConfigManage/ProTableLocalConfigManage";
|
|
234
234
|
import {TransomTableCheckConfig, TransomTableConfig} from "../../utils/utils";
|
|
235
235
|
|
|
236
|
+
|
|
237
|
+
const tableContentClassName = 't-table__content';
|
|
236
238
|
export default {
|
|
237
239
|
name: "baseProTable",
|
|
238
240
|
data() {
|
|
@@ -1006,9 +1008,9 @@ export default {
|
|
|
1006
1008
|
}
|
|
1007
1009
|
|
|
1008
1010
|
this.$nextTick(() => {
|
|
1009
|
-
if (refreshLayout) {
|
|
1011
|
+
// if (refreshLayout) {
|
|
1010
1012
|
this.daLayoutTable();
|
|
1011
|
-
}
|
|
1013
|
+
// }
|
|
1012
1014
|
});
|
|
1013
1015
|
}
|
|
1014
1016
|
},
|
|
@@ -1028,23 +1030,20 @@ export default {
|
|
|
1028
1030
|
scrollToTop() {
|
|
1029
1031
|
const {isAuth} = this.$props;
|
|
1030
1032
|
if (!isAuth) return;
|
|
1031
|
-
|
|
1032
1033
|
try {
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
// }
|
|
1034
|
+
let tableContent = this.$refs.enhancedTableRef.$el;
|
|
1035
|
+
let target = tableContent.querySelector(`.${tableContentClassName}`);
|
|
1036
|
+
if (target) {
|
|
1037
|
+
target.scrollTop = 0;
|
|
1038
|
+
}
|
|
1039
1039
|
} catch (error) {
|
|
1040
1040
|
}
|
|
1041
1041
|
},
|
|
1042
1042
|
// element表格的重新渲染方法
|
|
1043
1043
|
daLayoutTable() {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
// });
|
|
1044
|
+
this.$nextTick(()=>{
|
|
1045
|
+
console.log(this.$refs.enhancedTableRef);
|
|
1046
|
+
})
|
|
1048
1047
|
},
|
|
1049
1048
|
// 清空高级筛选的条件
|
|
1050
1049
|
cleanProscreenCondition(flag = false) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
v-if="input"
|
|
6
6
|
v-model="module"
|
|
7
7
|
:placeholder="placeholder"
|
|
8
|
-
size="
|
|
8
|
+
size="medium"
|
|
9
9
|
style="width: 220px"
|
|
10
10
|
@keyup.enter.native="handleSearch"
|
|
11
11
|
>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
v-for="(item, index) in searchList.list"
|
|
26
26
|
:key="index"
|
|
27
27
|
variant="light"
|
|
28
|
-
size="
|
|
28
|
+
size="medium"
|
|
29
29
|
:theme="index === searchList.index ? 'primary' : 'default'"
|
|
30
30
|
@click="handleScreen(index)"
|
|
31
31
|
>
|
|
@@ -7,21 +7,21 @@
|
|
|
7
7
|
text-overflow: ellipsis;
|
|
8
8
|
font-weight: var(--font-weight-m);
|
|
9
9
|
color: var(--font-color-d) !important;
|
|
10
|
-
font-size: var(--font-size-
|
|
10
|
+
font-size: var(--font-size-l) !important;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.warn {
|
|
14
|
-
font-size: var(--font-size-
|
|
14
|
+
font-size: var(--font-size-l) !important;
|
|
15
15
|
color: var(--color-warn) !important;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.error {
|
|
19
|
-
font-size: var(--font-size-
|
|
19
|
+
font-size: var(--font-size-l) !important;
|
|
20
20
|
color: var(--color-error) !important;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.success {
|
|
24
|
-
font-size: var(--font-size-
|
|
24
|
+
font-size: var(--font-size-l) !important;
|
|
25
25
|
color: var(--color-success) !important;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
.primary,
|
|
30
30
|
.fun, .handle-primary {
|
|
31
31
|
color: var(--color-primary) !important;
|
|
32
|
-
font-size: var(--font-size-
|
|
32
|
+
font-size: var(--font-size-l) !important;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.fun, .handle-primary {
|
|
@@ -36,6 +36,7 @@ var UseUpload = /** @class */ (function () {
|
|
|
36
36
|
this.dynamicMount = new DynamicMountClass_1["default"]({
|
|
37
37
|
componentProps: {
|
|
38
38
|
uploadEdEvent: function (evt) {
|
|
39
|
+
console.log('evt', evt);
|
|
39
40
|
_this.uploadEd(evt);
|
|
40
41
|
},
|
|
41
42
|
isOss: isOss,
|
|
@@ -48,22 +49,20 @@ var UseUpload = /** @class */ (function () {
|
|
|
48
49
|
return true;
|
|
49
50
|
};
|
|
50
51
|
UseUpload.prototype.uploadEd = function (evt) {
|
|
51
|
-
var _this = this;
|
|
52
52
|
if (evt === void 0) { evt = null; }
|
|
53
|
+
console.log('useUpload', evt);
|
|
53
54
|
this.lock = true;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
}, 500);
|
|
55
|
+
this.cbList.forEach(function (item) {
|
|
56
|
+
item.cb(evt ? evt : item.uploadList);
|
|
57
|
+
});
|
|
58
|
+
if (this.dynamicMount) {
|
|
59
|
+
var component = this.dynamicMount.getComponent();
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
component.$destroy();
|
|
62
|
+
this.dynamicMount = null;
|
|
63
|
+
this.cbList = [];
|
|
64
|
+
this.lock = false;
|
|
65
|
+
}
|
|
67
66
|
};
|
|
68
67
|
UseUpload.prototype.appendUploadItem = function (list) {
|
|
69
68
|
if (this.dynamicMount) {
|
|
@@ -39,6 +39,7 @@ class UseUpload implements UseUploadInterFace {
|
|
|
39
39
|
this.dynamicMount = new DynamicMount({
|
|
40
40
|
componentProps: {
|
|
41
41
|
uploadEdEvent: (evt) => {
|
|
42
|
+
console.log('evt',evt);
|
|
42
43
|
this.uploadEd(evt);
|
|
43
44
|
},
|
|
44
45
|
isOss: isOss,
|
|
@@ -53,20 +54,19 @@ class UseUpload implements UseUploadInterFace {
|
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
uploadEd(evt = null) {
|
|
57
|
+
console.log('useUpload',evt);
|
|
56
58
|
this.lock = true;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
}, 500);
|
|
59
|
+
this.cbList.forEach((item) => {
|
|
60
|
+
item.cb(evt ? evt : item.uploadList);
|
|
61
|
+
});
|
|
62
|
+
if (this.dynamicMount) {
|
|
63
|
+
let component = this.dynamicMount.getComponent();
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
component.$destroy();
|
|
66
|
+
this.dynamicMount = null;
|
|
67
|
+
this.cbList = [];
|
|
68
|
+
this.lock = false;
|
|
69
|
+
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
appendUploadItem(list) {
|