refs找不到
changeProgress(event){
let progressBar = this.refs.progressBar;
let progress = (event.clientX - progressBar.getBoundingClientRect().left) / progressBar.clientWidth;
this.props.onProgressChange && this.props.onProgressChange(progress);
}
render() {
return (
<div className="components-progress" ref="progressBar" onClick={this.changeProgress}>
<div className="progress" style={{width: `${this.props.progress}%`}}></div>
</div>
);
}