mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
feat(Tab): add badge prop, mark info prop as deprecated
This commit is contained in:
parent
db94b20c82
commit
214b13b8ff
@ -219,7 +219,7 @@ In scrollspy mode, the list of content will be tiled
|
||||
| title | Title | *string* | - |
|
||||
| disabled | Whether to disable tab | *boolean* | `false` |
|
||||
| dot `v2.3.0` | Whether to show red dot on the title | *boolean* | `false` |
|
||||
| info `v2.3.0` | Content of the badge on the title | *number \| string* | - |
|
||||
| badge `v2.5.6` | Content of the badge on the title | *number \| string* | - |
|
||||
| name `v2.0.6` | Identifier | *number \| string* | Index of tab |
|
||||
| url `v2.2.1` | Link | *string* | - |
|
||||
| to `v2.2.1` | Target route of the link, same as to of vue-router | *string \| object* | - |
|
||||
|
@ -223,7 +223,8 @@ export default {
|
||||
| title | 标题 | *string* | - |
|
||||
| disabled | 是否禁用标签 | *boolean* | `false` |
|
||||
| dot `v2.3.0` | 是否在标题右上角显示小红点 | *boolean* | `false` |
|
||||
| info `v2.3.0` | 标题右上角徽标的内容 | *number \| string* | - |
|
||||
| badge `v2.5.6` | 图标右上角徽标的内容 | *number \| string* | - |
|
||||
| info `v2.3.0` | 图标右上角徽标的内容(已废弃,请使用 badge 属性) | *number \| string* | - |
|
||||
| name `v2.0.6` | 标签名称,作为匹配的标识符 | *number \| string* | 标签的索引值 |
|
||||
| url `v2.2.1` | 点击后跳转的链接地址 | *string* | - |
|
||||
| to `v2.2.1` | 点击后跳转的目标路由对象,同 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) | *string \| object* | - |
|
||||
|
@ -10,8 +10,9 @@ export default createComponent({
|
||||
props: {
|
||||
...routeProps,
|
||||
dot: Boolean,
|
||||
info: [Number, String],
|
||||
name: [Number, String],
|
||||
info: [Number, String],
|
||||
badge: [Number, String],
|
||||
title: String,
|
||||
titleStyle: null,
|
||||
disabled: Boolean,
|
||||
|
@ -345,7 +345,7 @@ export default createComponent({
|
||||
refInFor
|
||||
type={type}
|
||||
dot={item.dot}
|
||||
info={item.info}
|
||||
info={isDef(item.badge) ? item.badge : item.info}
|
||||
title={item.title}
|
||||
color={this.color}
|
||||
style={item.titleStyle}
|
||||
|
Loading…
x
Reference in New Issue
Block a user