Browse Source

Merge branch 'master' into develop-1.0.0

pull/1285/head
afc163 9 years ago
parent
commit
0677108ffb
  1. 8
      components/progress/index.jsx
  2. 19
      style/components/progress.less

8
components/progress/index.jsx

@ -56,17 +56,17 @@ let Line = React.createClass({
text = props.format(props.percent);
}
if (props.showInfo === true) {
if (props.showInfo) {
if (props.status === 'exception') {
progressInfo = (
<span className={`${prefixCls}-line-text`}>
{props.format ? text : <Icon type="exclamation" />}
{props.format ? text : <Icon type="cross-circle" />}
</span>
);
} else if (props.status === 'success') {
progressInfo = (
<span className={`${prefixCls}-line-text`}>
{props.format ? text : <Icon type="check" />}
{props.format ? text : <Icon type="check-circle" />}
</span>
);
} else {
@ -84,12 +84,12 @@ let Line = React.createClass({
return (
<div className={`${prefixCls}-line-wrap clearfix status-${props.status}${fullCls}`} style={props.style}>
{progressInfo}
<div className={`${prefixCls}-line-outer`}>
<div className={`${prefixCls}-line-inner`}>
<div className={`${prefixCls}-line-bg`} style={percentStyle}></div>
</div>
</div>
{progressInfo}
</div>
);
}

19
style/components/progress.less

@ -11,11 +11,13 @@
position: relative;
}
&-line-outer {
margin-right: 45px;
}
&-line-wrap-full {
.@{progress-prefix-cls}-line-outer {
padding-right: 45px;
display: inline-block;
width: 100%;
margin-right: -45px;
.@{progress-prefix-cls}-line-wrap-full & {
margin-right: 0;
padding-right: 0;
}
}
&-line-inner {
@ -23,6 +25,7 @@
width: 100%;
background-color: #f3f3f3;
border-radius: 100px;
vertical-align: middle;
}
&-line-bg {
border-radius: 100px;
@ -31,14 +34,13 @@
position: relative;
}
&-line-text {
position: absolute;
top: 0;
right: 0;
width: 35px;
text-align: left;
font-size: 1em;
margin-left: 10px;
vertical-align: middle;
display: inline-block;
font-family: tahoma;
.anticon {
font-weight: bold;
font-size: 12px;
@ -88,6 +90,7 @@
top: 50%;
transform: translateY(-50%);
left: 0;
font-family: tahoma;
.anticon {
font-size: 14 / 12em;

Loading…
Cancel
Save