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

19
style/components/progress.less

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

Loading…
Cancel
Save