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

[Feature Request] 希望能将徽标badge提出成为单独组件 #6573

Closed
kooriookami opened this issue Jun 19, 2020 · 3 comments
Closed

[Feature Request] 希望能将徽标badge提出成为单独组件 #6573

kooriookami opened this issue Jun 19, 2020 · 3 comments

Comments

@kooriookami
Copy link
Contributor

这个功能解决了什么问题

能够在任意html标签中使用,例如button、div等,而不局限于特定的vant组件

描述您想要的解决方案

<van-badge :value="12" :max="99">
  html标签
</van-badge>

建议的API是什么样的

value 值 string, number
max 最大值,超过会显示最大值
dot 小圆点 boolean
hidden 隐藏 badge boolean
type 类型 string 类型,可选值为 primary info warning danger

@chenjiahan
Copy link
Member

后续会加一个

@chenjiahan chenjiahan added this to the 3.0.0 milestone Jul 5, 2020
@1414044032
Copy link

最近遇到了这个需求,徽标在一些场景确实需要,比如做新闻类型的项目。一些 icon 上 需要加徽标 。数字 点赞数 评论数这些。很需要徽标作为单独组件使用。

@chenjiahan
Copy link
Member

已在 3.0.0-beta.3 版本增加 Badge 组件

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

No branches or pull requests

3 participants