docs(Uploader): fix isOverSize param (#10824)

This commit is contained in:
neverland 2022-07-16 14:47:07 +08:00 committed by GitHub
parent 60b8906acd
commit 0931672595
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ import { Toast } from 'vant';
export default { export default {
methods: { methods: {
isOverSize() { isOverSize(file) {
const maxSize = file.type === 'image/jpeg' ? 500 * 1024 : 1000 * 1024; const maxSize = file.type === 'image/jpeg' ? 500 * 1024 : 1000 * 1024;
return file.size >= maxSize; return file.size >= maxSize;
}, },

View File

@ -147,7 +147,7 @@ import { Toast } from 'vant';
export default { export default {
methods: { methods: {
isOverSize() { isOverSize(file) {
const maxSize = file.type === 'image/jpeg' ? 500 * 1024 : 1000 * 1024; const maxSize = file.type === 'image/jpeg' ? 500 * 1024 : 1000 * 1024;
return file.size >= maxSize; return file.size >= maxSize;
}, },