htui-yllkbz 1.3.3 → 1.3.4
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 +40 -32
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +40 -32
- 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 +12 -6
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-27 18:44:46
|
|
8
8
|
-->
|
|
9
9
|
<!--
|
|
10
10
|
* @Descripttion: 附件列表 ------没有搞完
|
|
@@ -94,6 +94,7 @@ export default class HtUploadFiles extends Vue {
|
|
|
94
94
|
@Prop({ default: false }) readonly?: boolean;
|
|
95
95
|
/** 是否禁用 */
|
|
96
96
|
@Prop() disabled?: boolean;
|
|
97
|
+
@Prop() filesInfo?: CreateAttachmentDto[];
|
|
97
98
|
/** 数据 */
|
|
98
99
|
state: State = {
|
|
99
100
|
loading: false,
|
|
@@ -178,11 +179,13 @@ export default class HtUploadFiles extends Vue {
|
|
|
178
179
|
}
|
|
179
180
|
@Watch("state.filesInfo")
|
|
180
181
|
onFileToken(val: CreateAttachmentDto[], old: string) {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
if (!this.readonly) {
|
|
183
|
+
const arr: string[] = [];
|
|
184
|
+
val.forEach((item) => {
|
|
185
|
+
if (item.fileToken) arr.push(item.fileToken);
|
|
186
|
+
});
|
|
187
|
+
this.$emit("input", arr.toString());
|
|
188
|
+
}
|
|
186
189
|
}
|
|
187
190
|
@Watch("value")
|
|
188
191
|
onValue(val: string) {
|
|
@@ -191,6 +194,9 @@ export default class HtUploadFiles extends Vue {
|
|
|
191
194
|
this.getAllFileInfo();
|
|
192
195
|
} else {
|
|
193
196
|
this.state.fileToken = [];
|
|
197
|
+
if (this.filesInfo && this.filesInfo.length) {
|
|
198
|
+
this.state.filesInfo = this.filesInfo;
|
|
199
|
+
}
|
|
194
200
|
}
|
|
195
201
|
}
|
|
196
202
|
}
|