先来张效果图:
![](https://i-blog.csdnimg.cn/blog_migrate/b9f521ed1ef85c94e27f3d56c7597b40.png)
1.Components
// components import React from 'react'; import { Link } from 'react-router'; class ConfirmWins extends React.Component { constructor() { super(); } render() { const props = this.props; return ( <div className="confirm-wins-container"> <div className="wins"> <div className="title text-center">{props.title}</div> <div className="desc gray-text96">{props.desc}</div> <div className="fn-btn text-center"> {props.leftBtn?<span className="btn left-btn" onClick={props.onLeftClick}>{props.leftBtn.text}</span>:''}