|
|
|
@ -165,12 +165,8 @@ export const ImageUploader = props => {
|
|
|
|
|
setPreviewOpen(true);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleRemove = file => {
|
|
|
|
|
// 返回 false 阻止默认的删除行为,让 Popconfirm 来处理
|
|
|
|
|
return false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const itemRender = (originNode, file, fileList, actions) => {
|
|
|
|
|
const handleRemove = file => {
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Popconfirm
|
|
|
|
|
title="Confirm deletion"
|
|
|
|
@ -180,14 +176,20 @@ export const ImageUploader = props => {
|
|
|
|
|
okText="Yes"
|
|
|
|
|
cancelText="No"
|
|
|
|
|
>
|
|
|
|
|
{originNode}
|
|
|
|
|
|
|
|
|
|
</Popconfirm>
|
|
|
|
|
);
|
|
|
|
|
// 返回 false 阻止默认的删除行为,让 Popconfirm 来处理
|
|
|
|
|
return false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const itemRender = (originNode, file, fileList, actions) => {
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Upload customRequest={handleUploadFile} multiple={true} onRemove={handleRemove} listType="picture-card" fileList={fileList} onPreview={handlePreview} onChange={handleChange} itemRender={itemRender}>
|
|
|
|
|
<Upload customRequest={handleUploadFile} multiple={true} onRemove={handleRemove} listType="picture-card" fileList={fileList} onPreview={handlePreview} onChange={handleChange} >
|
|
|
|
|
<div>
|
|
|
|
|
<UploadOutlined />
|
|
|
|
|
<div style={{ marginTop: 8 }}>上传图片</div>
|
|
|
|
|