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

[FR]: tabbar添加新功能 #3054

Closed
like-cherry opened this issue Apr 29, 2024 · 2 comments · Fixed by #3060
Closed

[FR]: tabbar添加新功能 #3054

like-cherry opened this issue Apr 29, 2024 · 2 comments · Fixed by #3060
Labels
Feature Request 新功能请求 improvement 一些可以优化的地方

Comments

@like-cherry
Copy link

NutUI 包名

@nutui/nutui-taro

这个功能解决了什么问题?

tabbar一般用在自定义导航栏,自定义导航肯定是希望更加灵活,可以随时控制tabbar的选中状态(用代码逻辑来控制),比如有一个场景,需要用户登录才能访问tabbar页,就需要在点击tabbar时做逻辑处理,处理完了后再决定是否跳转到该tabbar页(也决定了是否active该tabbar-item)。现在的组件并不能满足这个需求,现在只要点击了,就默认被添加选中样式了。

你期望的组件设计是怎样的?

可以参考一下Naive UI,它里面就有一个概念叫受控模式和非受控模式

@like-cherry like-cherry added the Feature Request 新功能请求 label Apr 29, 2024
@HonorIpaddr
Copy link

tabbar好像有个tab-switch

@like-cherry
Copy link
Author

tabbar好像有个tab-switch

没有用,tabbar这个组件只要点击了,样式立马就变了,用v-model控制不了样式。如果用代码控制v-model的值来改变选中状态,会出现v-model的值和选中状态不匹配的情况,问题还是挺多的。我现在用的是自己写的tabbar,没有用nutUI的tabbar

@eiinu eiinu added the improvement 一些可以优化的地方 label May 7, 2024
@eiinu eiinu linked a pull request May 7, 2024 that will close this issue
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request 新功能请求 improvement 一些可以优化的地方
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants