From 436b6d8c3a09acfb71727fbcdf35c5a3f825219a Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 28 Mar 2016 16:52:00 +0800 Subject: [PATCH] fix progress style in some detail --- components/progress/index.jsx | 8 ++++---- style/components/progress.less | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/components/progress/index.jsx b/components/progress/index.jsx index ba5245e450..e0c4d107f1 100644 --- a/components/progress/index.jsx +++ b/components/progress/index.jsx @@ -57,17 +57,17 @@ let Line = React.createClass({ text = props.format(props.percent); } - if (props.showInfo === true) { + if (props.showInfo) { if (props.status === 'exception') { progressInfo = ( - {props.format ? text : } + {props.format ? text : } ); } else if (props.status === 'success') { progressInfo = ( - {props.format ? text : } + {props.format ? text : } ); } else { @@ -85,12 +85,12 @@ let Line = React.createClass({ return (
- {progressInfo}
+ {progressInfo}
); } diff --git a/style/components/progress.less b/style/components/progress.less index fc7531a70a..1daba1aadd 100644 --- a/style/components/progress.less +++ b/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;