diff --git a/src/goods-action/README.md b/src/goods-action/README.md index 468d05210..17958bbf2 100644 --- a/src/goods-action/README.md +++ b/src/goods-action/README.md @@ -82,7 +82,7 @@ Use `info` prop to show badge in icon | text | Button text | *string* | - | - | | icon | Icon | *string* | - | - | | icon-class | Icon class name | *any* | `''` | - | -| 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` | - | diff --git a/src/goods-action/README.zh-CN.md b/src/goods-action/README.zh-CN.md index 138204455..c7053fad2 100644 --- a/src/goods-action/README.zh-CN.md +++ b/src/goods-action/README.zh-CN.md @@ -84,7 +84,7 @@ export default { | text | 按钮文字 | *string* | - | - | | icon | 图标 | *string* | - | - | | icon-class | 图标额外类名 | *any* | - | - | -| info | 图标右上角徽标提示的内容 | *string \| number* | - | - | +| info | 图标右上角徽标的内容 | *string \| number* | - | - | | url | 点击后跳转的链接地址 | *string* | - | - | | to | 点击后跳转的目标路由对象,同 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) | *string \| object* | - | - | | replace | 跳转时是否替换当前页面历史 | *boolean* | `false` | - | diff --git a/src/grid/README.md b/src/grid/README.md index abebaffff..c6baa3e00 100644 --- a/src/grid/README.md +++ b/src/grid/README.md @@ -114,7 +114,7 @@ Vue.use(Grid).use(GridItem); |------|------|------|------|------| | text | Text | *string* | - | - | | icon | Icon name or URL | *string* | - | - | -| info | Content of badge in the upper right corner of icon | *string \| number* | `''` | 2.2.1 | +| info | Content of the badge | *string \| number* | `''` | 2.2.1 | | 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` | - | diff --git a/src/grid/README.zh-CN.md b/src/grid/README.zh-CN.md index 58066d64a..91db159a9 100644 --- a/src/grid/README.zh-CN.md +++ b/src/grid/README.zh-CN.md @@ -132,7 +132,7 @@ Vue.use(Grid).use(GridItem); |------|------|------|------|------| | text | 文字 | *string* | - | - | | icon | 图标名称或图片链接,可选值见 [Icon 组件](/#/zh-CN/icon) | *string* | - | - | -| info | 图标右上角徽标提示的内容 | *string \| number* | - | 2.2.1 | +| info | 图标右上角徽标的内容 | *string \| number* | - | 2.2.1 | | url | 点击后跳转的链接地址 | *string* | - | - | | to | 点击后跳转的目标路由对象,同 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) | *string \| object* | - | - | | replace | 跳转时是否替换当前页面历史 | *boolean* | `false` | - | diff --git a/src/icon/README.md b/src/icon/README.md index 4b693887a..fcf3d291c 100644 --- a/src/icon/README.md +++ b/src/icon/README.md @@ -23,6 +23,7 @@ Use `name` prop to set icon name or icon URL ### Show Info ```html + ``` @@ -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` | - | diff --git a/src/icon/README.zh-CN.md b/src/icon/README.zh-CN.md index 39618ef83..33e4e2071 100644 --- a/src/icon/README.zh-CN.md +++ b/src/icon/README.zh-CN.md @@ -24,11 +24,12 @@ Vue.use(Icon); ``` -### 显示徽标 +### 提示信息 -设置`info`属性后,会在图标的右上角显示红色的徽标 +设置`dot`属性后,会在图标右上角展示一个小红点。设置`info`属性后,会在图标右上角展示相应的徽标 ```html + ``` @@ -73,7 +74,8 @@ import 'vant/lib/icon/local.css'; | 参数 | 说明 | 类型 | 默认值 | 版本 | |------|------|------|------|------| | name | 图标名称或图片链接 | *string* | - | - | -| info | 图标右上角徽标提示的内容 | *string \| number* | - | - | +| dot | 是否显示图标右上角小红点 | *boolean* | `false` | 2.2.1 | +| info | 图标右上角徽标的内容 | *string \| number* | - | - | | color | 图标颜色 | *string* | `inherit` | - | | size | 图标大小,如 `20px` `2em`,默认单位为`px` | *string \| number* | `inherit` | - | | class-prefix | 类名前缀 | *string* | `van-icon` | - | diff --git a/src/icon/demo/index.vue b/src/icon/demo/index.vue index b04c8bb70..33ff94594 100644 --- a/src/icon/demo/index.vue +++ b/src/icon/demo/index.vue @@ -1,19 +1,21 @@