This commit is contained in:
lyp 2025-03-05 01:20:35 +08:00
parent fe72f02095
commit 9ffeb62911

View File

@ -621,20 +621,25 @@ export default function Payment(props: IPaymentProps) {
}}
rules={[{ required: true, message: '请上传打款凭证' }]}
>
<Upload name="image"
maxCount={2}
action={uploadImageUrl()}
headers={{ 'X-USER-ID': DevUserId }}
beforeUpload={(file: FileType) => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) {
message.error('只能上传 JPG/PNG 格式文件!');
}
return isJpgOrPng;
}}
>
<Button icon={<UploadOutlined />}></Button>
</Upload>
<div style={{
width: '200px',
overflow: 'hidden',
}}>
<Upload name="image"
maxCount={2}
action={uploadImageUrl()}
headers={{ 'X-USER-ID': DevUserId }}
beforeUpload={(file: FileType) => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) {
message.error('只能上传 JPG/PNG 格式文件!');
}
return isJpgOrPng;
}}
>
<Button icon={<UploadOutlined />}></Button>
</Upload>
</div>
</Form.Item>
</td>
</tr>