我要上传多个文件,此代码仅选择一个文件进行上传
const { value: file } = await Swal.fire({
title: 'Select image',
input: 'file',
inputAttributes: {
'accept': 'image/*',
'aria-label': 'Upload your profile picture'
}
})
您需要在输入中添加multiple
const { value: file } = await Swal.fire({
title: 'Select image',
input: 'file',
inputAttributes: {
'accept': 'image/*',
'multiple': 'multiple',
'aria-label': 'Upload your profile picture'
}
})