Commit df6b39ab by zhaochengxiang

bug fix

parent eff880b4
......@@ -93,6 +93,11 @@ const FC = (props) => {
const uploadProps = {
beforeUpload: file => {
if (uploading) {
showMessage('warn', '文件上传中,请稍后')
return
}
const isLt20M = file.size / 1024 / 1024 <= 100
if (!isLt20M) {
showMessage('error', '上传文件限制最大100M')
......@@ -143,7 +148,7 @@ const FC = (props) => {
<div className='flex' style={{ padding: '8px 11px', justifyContent: 'space-between' }}>
<Space align='start'>
<Upload {...uploadProps }>
<Button size='small' icon={<PlusOutlined />} />
<Button loading={uploading} size='small' icon={<PlusOutlined />} />
</Upload>
<AttachesItem value={fileList} onChange={(val) => { setFileList(val) }} />
</Space>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment