协作移动端开发-学习整理

版权声明:crystalLee https://blog.csdn.net/baidu_33591715/article/details/84370607

需求①:向上滑动时,将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>

猜你喜欢

转载自blog.csdn.net/baidu_33591715/article/details/84370607
今日推荐