code style

This commit is contained in:
afc163 2015-07-06 10:58:34 +08:00
parent f6219f21eb
commit d39b222b47

View File

@ -5,7 +5,7 @@ var Progresscircle = require('rc-progress').Circle;
var React = require('react');
var Line = React.createClass({
getDefaultProps: function () {
getDefaultProps() {
return {
width: 300,
percent: 0,
@ -41,21 +41,20 @@ var Line = React.createClass({
<i style={iconStyle} className="anticon anticon-exclamation-circle"></i>
</span>
);
} else if(this.props.status === 'success'){
} else if (this.props.status === 'success') {
progressInfo = (
<span style={textStyle} className='ant-progress-line-text'>
<i style={iconStyle} className="anticon anticon-check-circle"></i>
</span>
);
}else {
} else {
progressInfo = (
<span className='ant-progress-line-text'>{this.props.percent}%</span>
);
}
return (
<div className='ant-progress-line-wrap' >
<div className='ant-progress-line-wrap'>
<div className='ant-progress-line-inner' style={style}>
<Progressline percent={this.props.percent} strokeWidth={this.props.strokeWidth}
strokeColor={statusColorMap[this.props.status]} trailColor="#e9e9e9" />
@ -103,13 +102,13 @@ var Circle = React.createClass({
<i className='anticon anticon-exclamation'></i>
</span>
);
}else if(this.props.status === 'success'){
} else if (this.props.status === 'success') {
progressInfo = (
<span style={textStyle} className='ant-progress-circle-text'>
<i className="anticon anticon-check"></i>
</span>
);
}else {
} else {
progressInfo = (
<span className="ant-progress-circle-text">{this.props.percent}%</span>
);