1.react滚动条滚动到顶部:
document.getElementById("root").scrollTo({ top: 0, behavior: "smooth"});
2. react 返回事件
back = () => { this.props.history.goBack() }
3. react 图片
<img src={require(`../../../../assets/img/train_space/fangan${i + 1}.png`)} alt="" />
4.react动态添加class
<p className={`screen-item ${FlagVisible ? "screen-active" : ""}`}>动态添加class</p>