From 9c21be25e7850d292aef069c86195e90e01f3b3d Mon Sep 17 00:00:00 2001 From: Konstantin Azarov Date: Fri, 7 Apr 2017 23:37:05 -0400 Subject: [PATCH] Ensure inner el-upload uses name attribute (#3940) In order to avoid confusion when posting the form using regular non-xhr requests. Also do not clear input value after `handleChange` event. --- packages/upload/src/upload.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/upload/src/upload.vue b/packages/upload/src/upload.vue index 86b45d8ab..552f3d830 100644 --- a/packages/upload/src/upload.vue +++ b/packages/upload/src/upload.vue @@ -59,7 +59,6 @@ export default { if (!files) return; this.uploadFiles(files); - this.$refs.input.value = null; }, uploadFiles(files) { let postFiles = Array.prototype.slice.call(files); @@ -126,6 +125,7 @@ export default { let { handleClick, drag, + name, handleChange, multiple, accept, @@ -148,7 +148,7 @@ export default { ? {this.$slots.default} : this.$slots.default } - + ); }