diff --git a/packages/rate/README.md b/packages/rate/README.md index 9175f299..da1cf9a7 100644 --- a/packages/rate/README.md +++ b/packages/rate/README.md @@ -91,3 +91,11 @@ Page({ | 类名 | 说明 | |-----------|-----------| | custom-class | 根节点样式类 | +| icon-class | 图标样式类 | + +### 更新日志 + +| 版本 | 类型 | 内容 | +|-----------|-----------|-----------| +| 0.4.7 | feature | 新增组件 | +| 0.4.9 | feature | 增加 icon-class 外部样式类 | diff --git a/packages/rate/index.ts b/packages/rate/index.ts index bbca4f02..eb36183c 100644 --- a/packages/rate/index.ts +++ b/packages/rate/index.ts @@ -3,6 +3,8 @@ import { VantComponent } from '../common/component'; VantComponent({ field: true, + classes: ['icon-class'], + props: { readonly: Boolean, disabled: Boolean, diff --git a/packages/rate/index.wxml b/packages/rate/index.wxml index 401075e7..248ac8c5 100644 --- a/packages/rate/index.wxml +++ b/packages/rate/index.wxml @@ -6,6 +6,7 @@ wx:for="{{ list }}" wx:key="index" class="van-rate__item" + custom-class="icon-class" size="{{ size }}px" data-index="{{ index }}" name="{{ item ? icon : voidIcon }}"