需求①:向上滑動時,將tab固定到頂部
參考博文:https://blog.csdn.net/liu__520/article/details/53676834
Version 1.0
po點代碼出來,並不是完整的安,效果來說不是很好,後期優化再加動畫吧:
constructor(props) {
super(props);
this.state =
visible: true
}
}
fixedHeader = () => {
this.setState({visible: false})
}
<Accordion style={{display: this.state.visible ? 'block' : 'none'}}>
...
</Accordion>
<div className={`${prefixCls}-comment`} style={{height: 500}} onTouchMove={this.fixedHeader}>
...
</div>