This commit is contained in:
zlwu committed 2026-06-10 22:59:34 +08:00
1 parent 725774ef0c
commit c3be9d1dce
176 files changed
+41925 -6342

No files matched your search

@@ -116,14 +116,12 @@ const props = withDefaults(
hint?: string
showHint?: boolean
disabled?: boolean
maxSizeMb?: number
}>(),
{
bizId: 0,
hint: '支持图片、视频、PDF、Word、Excel等文件,单文件不超过 20MB',
hint: '支持图片、视频、PDF、Word、Excel等文件',
showHint: true,
disabled: false,
maxSizeMb: 20
disabled: false
}
)
@@ -151,13 +149,6 @@ async function handleAttachmentChange(uploadFile: UploadFile) {
const rawFile = uploadFile.raw
if (!rawFile) return
const maxBytes = props.maxSizeMb * 1024 * 1024
if (rawFile.size > maxBytes) {
ElMessage.error(`单文件不能超过 ${props.maxSizeMb}MB`)
uploadRef.value?.clearFiles()
return
}
const item: BxAttachmentItem = {
id: `upload-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
fileName: rawFile.name,