Skip to content

Commit b6a7f49

Browse files
committed
cr vc-progress
1 parent 89601b5 commit b6a7f49

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

components/vc-progress/demo/simple.jsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default {
1717
},
1818
},
1919
render() {
20+
const { percent, color } = this;
2021
const containerStyle = {
2122
width: '250px',
2223
};
@@ -27,22 +28,22 @@ export default {
2728
};
2829
return (
2930
<div>
30-
<h3>Line Progress {this.percent}%</h3>
31+
<h3>Line Progress {percent}%</h3>
3132
<div style={containerStyle}>
32-
<Line percent={this.percent} strokeWidth="4" strokeColor={this.color} />
33+
<Line percent={percent} strokeWidth="4" strokeColor={color} />
3334
<Line
34-
percent={[this.percent / 2, this.percent / 2]}
35+
percent={[percent / 2, percent / 2]}
3536
strokeWidth="4"
36-
strokeColor={[this.color, '#CCC']}
37+
strokeColor={[color, '#CCC']}
3738
/>
3839
</div>
39-
<h3>Circle Progress {this.percent}%</h3>
40+
<h3>Circle Progress {percent}%</h3>
4041
<div style={circleContainerStyle}>
4142
<Circle
42-
percent={this.percent}
43+
percent={percent}
4344
strokeWidth="6"
4445
strokeLinecap="round"
45-
strokeColor={this.color}
46+
strokeColor={color}
4647
/>
4748
</div>
4849
<p>

0 commit comments

Comments
 (0)