提交 0d638c8b 编写于 作者: 偏右

Merge pull request #432 from ant-design/fix-progressbar-warn

fix progressbar worning
......@@ -11,9 +11,9 @@ var ProgressCircle = antd.Progress.Circle;
ReactDOM.render(
<div>
<ProgressCircle percent="30" width="80" />
<ProgressCircle percent="70" width="80" status="exception" />
<ProgressCircle percent="100" width="80" />
<ProgressCircle percent={30} width={80} />
<ProgressCircle percent={70} width={80} status="exception" />
<ProgressCircle percent={100} width={80} />
</div>
, document.getElementById('components-progress-demo-circle-mini'));
````
......@@ -11,9 +11,9 @@ var ProgressCircle = antd.Progress.Circle;
ReactDOM.render(
<div>
<ProgressCircle percent="30" />
<ProgressCircle percent="70" status="exception" />
<ProgressCircle percent="100" />
<ProgressCircle percent={30} />
<ProgressCircle percent={70} status="exception" />
<ProgressCircle percent={100} />
</div>
, document.getElementById('components-progress-demo-circle'));
````
......
......@@ -11,10 +11,10 @@ var Progress = antd.Progress.Line;
ReactDOM.render(
<div style={{ width: 170 }}>
<Progress percent="30" strokeWidth="5" />
<Progress percent="50" strokeWidth="5" status="active" />
<Progress percent="70" strokeWidth="5" status="exception" />
<Progress percent="100" strokeWidth="5" />
<Progress percent={30} strokeWidth={5} />
<Progress percent={50} strokeWidth={5} status="active" />
<Progress percent={70} strokeWidth={5} status="exception" />
<Progress percent={100} strokeWidth={5} />
</div>
, document.getElementById('components-progress-demo-line-mini'));
````
......@@ -11,11 +11,11 @@ var Progress = antd.Progress.Line;
ReactDOM.render(
<div>
<Progress percent="30" />
<Progress percent="50" status="active" />
<Progress percent="70" status="exception" />
<Progress percent="100" />
<Progress percent="50" showInfo={false} />
<Progress percent={30} />
<Progress percent={50} status="active" />
<Progress percent={70} status="exception" />
<Progress percent={100} />
<Progress percent={50} showInfo={false} />
</div>
, document.getElementById('components-progress-demo-line'));
````
......@@ -75,6 +75,12 @@ let Line = React.createClass({
});
let Circle = React.createClass({
propTypes: {
status: React.PropTypes.oneOf(['normal', 'exception', 'success']),
percent: React.PropTypes.number,
strokeWidth: React.PropTypes.number,
width: React.PropTypes.number
},
getDefaultProps: function () {
return {
width: 132,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册