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

tabbar 建议添加 @tabchange 这类事件钩子 #1715

Closed
Astroinist opened this issue Jul 19, 2017 · 1 comment
Closed

tabbar 建议添加 @tabchange 这类事件钩子 #1715

Astroinist opened this issue Jul 19, 2017 · 1 comment

Comments

@Astroinist
Copy link

目前tabbar 从api上看只在 TabbarItem上提供了on-item-click,这个样有两个问题:
1是无法统一的在一个地方做tabchange的事件处理(必须每个TabbarItem 分别绑定handler)
2是此事件必须是在item被click时才会触发(tabbar的index改变时也不会触发该事件)

在tabbar 组件上添加如:on-tabChange(from,to,...)这样的事件钩子,可以解决上面两个问题,同时也增加了组件的灵活性

@wg5945
Copy link
Collaborator

wg5945 commented Jul 21, 2017

tabbar是支持v-model的形式的,文档上有写

<tabbar v-model="tab">
</tabbar>

你可以通过监听绑定的model值来实现

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants