mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 11:07:52 +08:00
Image 添加错误显式
This commit is contained in:
parent
04bfe4c188
commit
bd4a2b3242
@ -169,6 +169,11 @@
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-errorMsg {
|
||||
color: $danger;
|
||||
margin: 5px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -842,10 +842,10 @@ export default class ImageControl extends React.Component<ImageProps, ImageState
|
||||
key={file.id || key}
|
||||
className={cx('ImageControl-item', {
|
||||
'is-uploaded': file.state !== 'uploading',
|
||||
'is-invalid': file.state === 'error' || file.state == 'invalid'
|
||||
'is-invalid': file.state === 'error' || file.state === 'invalid'
|
||||
})}
|
||||
>
|
||||
{file.error ? (
|
||||
{file.state === 'invalid' || file.state === 'error' ? (
|
||||
<a
|
||||
className={cx('ImageControl-retryBtn', {'is-disabled': disabled})}
|
||||
onClick={this.handleSelect}
|
||||
@ -959,6 +959,8 @@ export default class ImageControl extends React.Component<ImageProps, ImageState
|
||||
{uploading ? '暂停上传' : '开始上传'}
|
||||
</button>
|
||||
) : null}
|
||||
|
||||
{error ? <div className={cx('ImageControl-errorMsg')}>{error}</div> : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user