diff --git a/src/uploader/README.md b/src/uploader/README.md index a39fbffa6..a7279ec6f 100644 --- a/src/uploader/README.md +++ b/src/uploader/README.md @@ -127,7 +127,7 @@ import { Toast } from 'vant'; export default { methods: { - isOverSize() { + isOverSize(file) { const maxSize = file.type === 'image/jpeg' ? 500 * 1024 : 1000 * 1024; return file.size >= maxSize; }, diff --git a/src/uploader/README.zh-CN.md b/src/uploader/README.zh-CN.md index c3800a607..964fb0535 100644 --- a/src/uploader/README.zh-CN.md +++ b/src/uploader/README.zh-CN.md @@ -147,7 +147,7 @@ import { Toast } from 'vant'; export default { methods: { - isOverSize() { + isOverSize(file) { const maxSize = file.type === 'image/jpeg' ? 500 * 1024 : 1000 * 1024; return file.size >= maxSize; },