feat(Icon): add dot prop (#4425)

This commit is contained in:
neverland
2019-09-11 14:43:54 +08:00
committed by GitHub
parent e69e3d349a
commit 21d5127fd7
16 changed files with 70 additions and 26 deletions
+3 -1
View File
@@ -23,6 +23,7 @@ Use `name` prop to set icon name or icon URL
### Show Info
```html
<van-icon name="chat" dot />
<van-icon name="chat" info="9" />
<van-icon name="chat" info="99+" />
```
@@ -63,7 +64,8 @@ import 'vant/lib/icon/local.css';
| Attribute | Description | Type | Default | Version |
|------|------|------|------|------|
| name | Icon name or URL | *string* | `''` | - |
| info | Content of badge in the upper right corner of icon | *string \| number* | `''` | - |
| dot | Whether to show red dot | *boolean* | `false` | 2.2.1 |
| info | Content of the badge | *string \| number* | `''` | - |
| color | Icon color | *string* | `inherit` | - |
| size | Icon size | *string \| number* | `inherit` | - |
| class-prefix | ClassName prefix | *string* | `van-icon` | - |