htui-yllkbz 1.3.4 → 1.3.5
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/htui.common.js +49 -29
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +49 -29
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +3 -3
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/packages/HtUploadFiles/index.vue +16 -3
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2022-02-11 14:26:23
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-02-
|
|
7
|
+
* @LastEditTime: 2022-02-28 09:44:36
|
|
8
8
|
-->
|
|
9
9
|
<!--
|
|
10
10
|
* @Descripttion: 附件列表 ------没有搞完
|
|
@@ -94,6 +94,9 @@ export default class HtUploadFiles extends Vue {
|
|
|
94
94
|
@Prop({ default: false }) readonly?: boolean;
|
|
95
95
|
/** 是否禁用 */
|
|
96
96
|
@Prop() disabled?: boolean;
|
|
97
|
+
/** 启动数组传值 */
|
|
98
|
+
@Prop({ default: false }) isArray?: boolean;
|
|
99
|
+
|
|
97
100
|
@Prop() filesInfo?: CreateAttachmentDto[];
|
|
98
101
|
/** 数据 */
|
|
99
102
|
state: State = {
|
|
@@ -179,17 +182,27 @@ export default class HtUploadFiles extends Vue {
|
|
|
179
182
|
}
|
|
180
183
|
@Watch("state.filesInfo")
|
|
181
184
|
onFileToken(val: CreateAttachmentDto[], old: string) {
|
|
182
|
-
if (!this.readonly) {
|
|
185
|
+
if (!this.readonly && !this.isArray) {
|
|
183
186
|
const arr: string[] = [];
|
|
184
187
|
val.forEach((item) => {
|
|
185
188
|
if (item.fileToken) arr.push(item.fileToken);
|
|
186
189
|
});
|
|
187
190
|
this.$emit("input", arr.toString());
|
|
191
|
+
this.$emit("change", arr.toString());
|
|
192
|
+
}
|
|
193
|
+
if (this.isArray) {
|
|
194
|
+
this.$emit("change", val);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
@Watch("filesInfo", { immediate: true })
|
|
198
|
+
onArrValue(val: CreateAttachmentDto[]) {
|
|
199
|
+
if (this.isArray) {
|
|
200
|
+
this.state.filesInfo = val || [];
|
|
188
201
|
}
|
|
189
202
|
}
|
|
190
203
|
@Watch("value")
|
|
191
204
|
onValue(val: string) {
|
|
192
|
-
if (val) {
|
|
205
|
+
if (val && !this.isArray) {
|
|
193
206
|
this.state.fileToken = val.split(",");
|
|
194
207
|
this.getAllFileInfo();
|
|
195
208
|
} else {
|