From 985f55fd6b0ca0101a2afdfeae06fdd0e3f003cc Mon Sep 17 00:00:00 2001 From: ljf Date: Fri, 27 Aug 2021 01:10:14 +0200 Subject: [PATCH] [fix] Repair files indicator --- app/src/components/globals/formItems/FileItem.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/components/globals/formItems/FileItem.vue b/app/src/components/globals/formItems/FileItem.vue index 9f22e423..cac8f7d3 100644 --- a/app/src/components/globals/formItems/FileItem.vue +++ b/app/src/components/globals/formItems/FileItem.vue @@ -9,7 +9,7 @@ :id="id" :required="required" v-on="$listeners" - :placeholder="placeholder" + :placeholder="placeholder_" :accept="accept" @blur="$parent.$emit('touch', name)" /> @@ -22,7 +22,8 @@ export default { data () { return { - file: null + file: this.value, + placeholder_: (this.value) ? this.value.name : this.placeholder } }, @@ -38,6 +39,8 @@ export default { methods: { clearFiles () { + this.file = null + this.placeholder_ = this.placeholder this.$refs['file-input'].reset() } }