mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
feat(Uploader): max-size、max-count can be string
This commit is contained in:
@@ -29,7 +29,10 @@ export function readFile(file: File, resultType: ResultType) {
|
||||
});
|
||||
}
|
||||
|
||||
export function isOversize(files: File | File[], maxSize: number): boolean {
|
||||
export function isOversize(
|
||||
files: File | File[],
|
||||
maxSize: number | string
|
||||
): boolean {
|
||||
return toArray(files).some(file => file.size > maxSize);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user