Upload 组件在 Form 中应用, 会处于受控状态, 所以默认值如 FileList 的初始化须要通过 Form 的 setFieldsValue 办法来设
const [form] = Form.useForm();
form.setFieldsValue({banner: [{ uid: uuid().toString(), name: imageURL, status: 'done', url: imageURL}],
})
<Form.Item
label="Banner 图"
name="banner"
valuePropName="fileList"
getValueFromEvent={normFile}
>
<Upload
name="bannerUpload"
customRequest={uploadHandler}
>
<Button icon={<UploadOutlined />}> 上传图片 </Button>
</Upload>
</Form.Item>