Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs的title如何实现置顶 #346

Closed
YunaiV opened this issue Oct 9, 2016 · 8 comments
Closed

Tabs的title如何实现置顶 #346

YunaiV opened this issue Oct 9, 2016 · 8 comments
Assignees

Comments

@YunaiV
Copy link

YunaiV commented Oct 9, 2016

本地环境

  • antd-mobile 版本:0.9.0
  • 操作系统及其版本:Mac 10.12
  • 浏览器及其版本:Chrome

我的问题?

当滚动页面时,tabs的title能够一直置顶。

代码

因为目前api这样的实现,无法使用Sticky进行置顶(😜或者,我没找到实现的方式)
查看ListView,有属性可以直接。
谢谢

@silentcloud
Copy link
Contributor

@ludaima 你的意思是只想让 tab 的内容区域滚动?

@YunaiV
Copy link
Author

YunaiV commented Oct 9, 2016

@silentcloud 谢谢解答。
是的。类似https://mobile.ant.design/components/list-view/ 里的【标题吸顶(body 容器)】效果

@warmhug
Copy link
Contributor

warmhug commented Oct 9, 2016

可以使用这个库 https://github.com/captivationsoftware/react-sticky ,list-view 内部就是依赖的这个

@YunaiV
Copy link
Author

YunaiV commented Oct 9, 2016

@warmhug 谢谢解答。
已经使用这个库了。
已经能让【NavBar】进行置顶,但是【Tabs】不知道如何进行处理。

@warmhug
Copy link
Contributor

warmhug commented Oct 9, 2016

为什么不用 <Sticky></Sticky> 包起 Tabs 来?

@YunaiV
Copy link
Author

YunaiV commented Oct 9, 2016

@warmhug 之前尝试了下把Tabs也包进去,但是发现没有效果。

@warmhug
Copy link
Contributor

warmhug commented Oct 9, 2016

自己调试下排查原因吧

@YunaiV
Copy link
Author

YunaiV commented Oct 9, 2016

@warmhug 好的。谢谢。
包完之后,Tabs的内容区域也会跟着置顶。
猜想,需要有办法实现,只“包”到Tabs的Header部分。

@ant-design ant-design locked and limited conversation to collaborators Sep 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants