From a367d3e49a4f3b543718e0a85dbc4b4c3639b28a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Mon, 4 Mar 2019 17:23:27 +0800 Subject: [PATCH] fixed #5171 --- src/components/upload/upload.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/upload/upload.vue b/src/components/upload/upload.vue index 08ea8167..491b271b 100644 --- a/src/components/upload/upload.vue +++ b/src/components/upload/upload.vue @@ -137,6 +137,10 @@ paste: { type: Boolean, default: false + }, + disabled: { + type: Boolean, + default: false } }, data () { @@ -162,6 +166,7 @@ }, methods: { handleClick () { + if (this.disabled) return; this.$refs.input.click(); }, handleChange (e) { @@ -175,9 +180,11 @@ }, onDrop (e) { this.dragOver = false; + if (this.disabled) return; this.uploadFiles(e.dataTransfer.files); }, handlePaste (e) { + if (this.disabled) return; if (this.paste) { this.uploadFiles(e.clipboardData.files); }