fixed #5171
This commit is contained in:
parent
1d5d6ef609
commit
a367d3e49a
1 changed files with 7 additions and 0 deletions
|
@ -137,6 +137,10 @@
|
||||||
paste: {
|
paste: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
@ -162,6 +166,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick () {
|
handleClick () {
|
||||||
|
if (this.disabled) return;
|
||||||
this.$refs.input.click();
|
this.$refs.input.click();
|
||||||
},
|
},
|
||||||
handleChange (e) {
|
handleChange (e) {
|
||||||
|
@ -175,9 +180,11 @@
|
||||||
},
|
},
|
||||||
onDrop (e) {
|
onDrop (e) {
|
||||||
this.dragOver = false;
|
this.dragOver = false;
|
||||||
|
if (this.disabled) return;
|
||||||
this.uploadFiles(e.dataTransfer.files);
|
this.uploadFiles(e.dataTransfer.files);
|
||||||
},
|
},
|
||||||
handlePaste (e) {
|
handlePaste (e) {
|
||||||
|
if (this.disabled) return;
|
||||||
if (this.paste) {
|
if (this.paste) {
|
||||||
this.uploadFiles(e.clipboardData.files);
|
this.uploadFiles(e.clipboardData.files);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue