不bibi,直接上代码,
import React,{ Component } from 'react';
import PropTypes from 'prop-types';
export default class Progress extends Component {
constructor(props) {
super(props)
}
renderProgress () {
const progressItemStyle = {
width: `${100/this.props.nums}%`,height: '100%'
};
var ele = [];
for (var i = 0; i < this.props.nums; i++) {
if (i <= this.props.index) {
ele.push(
)
} else {
ele.push(
)
}
}
return ele;
}
render() {
const progressStyle = {
display: '-webkit-flex',color: this.props.progressColor,margin: '0 25px'
};
const progressArticleStyle