fix(uploader): automatically filter files exceeding the max-size (#6150)

This commit is contained in:
fujialing
2020-04-27 21:01:35 +08:00
committed by GitHub
parent 9e7d72eff2
commit 8aced05260
6 changed files with 117 additions and 5 deletions
+21
View File
@@ -103,6 +103,27 @@ export default {
};
```
### Max Size
```html
<van-uploader
multiple
:max-count="5"
:max-size="3 * 1024 * 1024"
@oversize="onOversize"
/>
```
```js
export default {
methods: {
onOversize(file) {
console.log(file);
},
},
};
```
### Upload Style
```html