From e2264fadff487487f6e834f4ed968d2c73b210db Mon Sep 17 00:00:00 2001 From: lin-xin <2981207131@qq.com> Date: Wed, 15 May 2019 14:10:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Button:=E4=BF=AE=E5=A4=8D=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E4=B8=8D=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/button/Button.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/button/Button.jsx b/src/button/Button.jsx index fab73765c..4c1e73af9 100644 --- a/src/button/Button.jsx +++ b/src/button/Button.jsx @@ -19,7 +19,7 @@ export default class Button extends Component { })} disabled={this.props.disabled} type={this.props.nativeType} onClick={this.onClick.bind(this)}> { this.props.loading && } { this.props.icon && !this.props.loading && } - {this.props.children} + { this.props.children && {this.props.children} } ) } From 870fe6bfdb02db1e388c808318c4aa9361d21a87 Mon Sep 17 00:00:00 2001 From: lin-xin <2981207131@qq.com> Date: Thu, 16 May 2019 15:30:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Progress:=E6=B7=BB=E5=8A=A0color=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=EF=BC=8C=E8=87=AA=E5=AE=9A=E4=B9=89=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E6=9D=A1=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/progress/Progress.jsx | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/progress/Progress.jsx b/src/progress/Progress.jsx index 95d75d795..63fd5b427 100644 --- a/src/progress/Progress.jsx +++ b/src/progress/Progress.jsx @@ -52,15 +52,19 @@ export default class Progress extends Component { stroke(): string { let ret; - switch (this.props.status) { - case 'success': - ret = '#13ce66'; - break; - case 'exception': - ret = '#ff4949'; - break; - default: - ret = '#20a0ff'; + if(this.props.color){ + ret = this.props.color + }else{ + switch (this.props.status) { + case 'success': + ret = '#13ce66'; + break; + case 'exception': + ret = '#ff4949'; + break; + default: + ret = '#20a0ff'; + } } return ret; } @@ -97,7 +101,7 @@ export default class Progress extends Component { >
{showText && textInside && @@ -167,5 +171,6 @@ Progress.propTypes = { strokeWidth: PropTypes.number, width: PropTypes.number, textInside: PropTypes.bool, - showText: PropTypes.bool + showText: PropTypes.bool, + color: PropTypes.string, };