mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:18:03 +08:00
Image 上传按钮ui调整
This commit is contained in:
parent
841eb77bde
commit
5cb4865577
@ -35,6 +35,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
&-dropzone.is-active &-addBtn {
|
||||
border-color: $ImageControl-addBtn-onHover-border;
|
||||
background: $ImageControl-addBtn-onHover-bg;
|
||||
color: $ImageControl-addBtn-onHover-color;
|
||||
}
|
||||
|
||||
&-item {
|
||||
border: $borderWidth solid $borderColor;
|
||||
vertical-align: top;
|
||||
@ -174,6 +180,10 @@
|
||||
color: $danger;
|
||||
margin: 5px 0 0;
|
||||
}
|
||||
|
||||
&-uploadBtn {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,6 +12,7 @@ import {Switch} from '../../components';
|
||||
import {buildApi} from '../../utils/api';
|
||||
import {createObject, qsstringify} from '../../utils/helper';
|
||||
import {Icon} from '../../components/icons';
|
||||
import Button from '../../components/Button';
|
||||
|
||||
let id = 1;
|
||||
function gennerateId() {
|
||||
@ -939,7 +940,7 @@ export default class ImageControl extends React.Component<ImageProps, ImageState
|
||||
className={cx('ImageControl-addBtn', {'is-disabled': disabled})}
|
||||
onClick={this.handleSelect}
|
||||
data-tooltip={placeholder}
|
||||
data-position="bottom"
|
||||
data-position="right"
|
||||
>
|
||||
<Icon icon="plus" className="icon" />
|
||||
</label>
|
||||
@ -950,14 +951,14 @@ export default class ImageControl extends React.Component<ImageProps, ImageState
|
||||
{this.renderCompressOptions()}
|
||||
|
||||
{!autoUpload && !hideUploadButton && files.length ? (
|
||||
<button
|
||||
type="button"
|
||||
className={cx('btn m-r-xs', btnUploadClassName)}
|
||||
<Button
|
||||
level="default"
|
||||
className={cx('ImageControl-uploadBtn', btnUploadClassName)}
|
||||
disabled={!hasPending}
|
||||
onClick={this.toggleUpload}
|
||||
>
|
||||
{uploading ? '暂停上传' : '开始上传'}
|
||||
</button>
|
||||
</Button>
|
||||
) : null}
|
||||
|
||||
{error ? <div className={cx('ImageControl-errorMsg')}>{error}</div> : null}
|
||||
|
Loading…
Reference in New Issue
Block a user