feat(Uploader): add show-upload prop

This commit is contained in:
chenjiahan
2020-03-15 11:00:45 +08:00
parent ad9d8a7649
commit 66c0b3c1b7
4 changed files with 14 additions and 1 deletions
+5 -1
View File
@@ -53,6 +53,10 @@ export default createComponent({
type: Boolean,
default: true,
},
showUpload: {
type: Boolean,
default: true,
},
previewImage: {
type: Boolean,
default: true,
@@ -326,7 +330,7 @@ export default createComponent({
},
genUpload() {
if (this.fileList.length >= this.maxCount) {
if (this.fileList.length >= this.maxCount || !this.showUpload) {
return;
}