Click to upload
jpg/png files with a size less than 500kb
@@ -147,6 +153,9 @@ Upload files by clicking or drag-and-drop
},
handlePreview(file) {
console.log(file);
+ },
+ handleExceed(files, fileList) {
+ this.$message.warning(`The limit is 3, you selected ${files.length} files this time, add up to ${files.length + fileList.length} totally`);
}
}
}
@@ -407,6 +416,8 @@ list-type | type of fileList | string | text/picture/picture-card | text |
auto-upload | whether to auto upload file | boolean | — | true |
http-request | override default xhr behavior, allowing you to implement your own upload-file's request | function | — | — |
disabled | whether to disable upload | boolean | — | false |
+limit | maximum number of uploads allowed | number | — | — |
+on-exceed | hook function when limit is exceeded | function(files, fileList) | — | - |
### Methods
| Methods Name | Description | Parameters |
diff --git a/examples/docs/zh-CN/input.md b/examples/docs/zh-CN/input.md
index 5c613787f..7de9b448c 100644
--- a/examples/docs/zh-CN/input.md
+++ b/examples/docs/zh-CN/input.md
@@ -350,7 +350,7 @@ export default {
-
+