feat(GridItem): add badge prop, mark info prop as deprecated

This commit is contained in:
chenjiahan
2020-03-17 21:01:01 +08:00
parent 0dea9e2cb1
commit db94b20c82
4 changed files with 17 additions and 14 deletions
+3 -3
View File
@@ -87,12 +87,12 @@ Vue.use(GridItem);
</van-grid>
```
### Show Info
### Show Badge
```html
<van-grid :column-num="2">
<van-grid-item icon="home-o" text="Text" dot />
<van-grid-item icon="search" text="Text" info="99+" />
<van-grid-item icon="search" text="Text" badge="99+" />
</van-grid>
```
@@ -118,7 +118,7 @@ Vue.use(GridItem);
| icon | Icon name or URL | *string* | - |
| icon-prefix `v2.5.3` | Icon className prefix | *string* | `van-icon` |
| dot `v2.2.1` | Whether to show red dot | *boolean* | `false` |
| info `v2.2.1` | Content of the badge | *number \| string* | - |
| badge `v2.5.6` | Content of the badge | *number \| string* | - |
| url | Link URL | *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` |