feat(Uploader): add chooseFile method (#5818)

This commit is contained in:
Pingren Nie
2020-03-16 09:39:42 +08:00
committed by GitHub
parent 4695dc29b9
commit f5e79dabb5
4 changed files with 15 additions and 0 deletions

View File

@@ -247,6 +247,17 @@ export default createComponent({
}
},
// @exposed-api
chooseFile() {
if (this.disabled) {
return;
}
/* istanbul ignore else */
if (this.$refs.input) {
this.$refs.input.click();
}
},
genPreviewMask(item) {
const { status } = item;