feat(maxsize): 最大文件体积

This commit is contained in:
2023-08-18 17:03:41 +08:00
parent cae904af49
commit 63841f7068
2 changed files with 23 additions and 3 deletions

View File

@ -24,6 +24,7 @@
:max-size="20"
:file-name="allName[`${row.id}`]"
:request="request"
:maxsize="maxsize"
@on-change="$event => onChange($event, row.id)"
@on-success="$event => onSuccess($event, row, $index)"
@on-error="onError(row.id)"
@ -100,6 +101,8 @@ const props = withDefaults(defineProps<{
hideActions?: boolean
/** 文件上传的请求函数 */
request?: (formData: FormData) => Promise<FileVO>
/** 最大上传大小Mb */
maxsize?: number
}>(), {
accept: '.jpeg,.jpg,.png,.bmp',
addText: '新增一行',