feature: Support custom button for the upload

Support custom button in the upload form item

Change-Id: Ib246c437e91814352d75fa2fc2bde9e7c1be8888
This commit is contained in:
xusongfu 2022-10-28 14:28:10 +08:00
parent 2127390852
commit 442d055756
2 changed files with 9 additions and 3 deletions

View File

@ -0,0 +1,4 @@
---
features:
- |
Support custom button in the upload form item

View File

@ -92,9 +92,11 @@ export default class index extends Component {
};
return (
<Upload {...props}>
<Button>
<UploadOutlined /> {t('Click to Upload')}
</Button>
{this.props.children || (
<Button>
<UploadOutlined /> {t('Click to Upload')}
</Button>
)}
</Upload>
);
}