feat(Icon): add dot prop (#4425)
This commit is contained in:
@@ -163,7 +163,7 @@ export default {
|
||||
| name | Identifier | *string \| number* | Item index | - |
|
||||
| icon | Icon name | *string* | - | - |
|
||||
| dot | Whether to show red dot | *boolean* | - | - |
|
||||
| info | Content of badge in the upper right corner of icon | *string \| number* | - | - |
|
||||
| info | Content of the badge | *string \| number* | - | - |
|
||||
| url | Link | *string* | - | - |
|
||||
| to | Target route of the link, same as to of vue-router | *string \| object* | - | - |
|
||||
| replace | If true, the navigation will not leave a history record | *boolean* | `false` | - |
|
||||
|
||||
@@ -57,7 +57,9 @@ export default {
|
||||
}
|
||||
```
|
||||
|
||||
### 显示徽标
|
||||
### 提示信息
|
||||
|
||||
设置`dot`属性后,会在图标右上角展示一个小红点。设置`info`属性后,会在图标右上角展示相应的徽标
|
||||
|
||||
```html
|
||||
<van-tabbar v-model="active">
|
||||
@@ -168,8 +170,8 @@ export default {
|
||||
|------|------|------|------|------|
|
||||
| name | 标签名称,作为匹配的标识符 | *string \| number* | 当前标签的索引值 | - |
|
||||
| icon | 图标名称或图片链接,可选值见 [Icon 组件](/#/zh-CN/icon)| *string* | - | - |
|
||||
| dot | 是否显示小红点 | *boolean* | - | - |
|
||||
| info | 图标右上角徽标提示的内容 | *string \| number* | - | - |
|
||||
| dot | 是否显示图标右上角小红点 | *boolean* | `false` | - |
|
||||
| info | 图标右上角徽标的内容 | *string \| number* | - | - |
|
||||
| url | 点击后跳转的链接地址 | *string* | - | - |
|
||||
| to | 点击后跳转的目标路由对象,同 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) | *string \| object* | - | - |
|
||||
| replace | 跳转时是否替换当前页面历史 | *boolean* | `false` | - |
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
export default {
|
||||
i18n: {
|
||||
'zh-CN': {
|
||||
badge: '显示徽标',
|
||||
badge: '提示信息',
|
||||
customIcon: '自定义图标',
|
||||
customColor: '自定义颜色',
|
||||
matchByName: '通过名称匹配'
|
||||
|
||||
Reference in New Issue
Block a user