From d5f36e05e371f515b38fccce04472b41d739aec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=A5=E5=BF=98=E7=97=87=E6=82=A3=E8=80=85=E4=B8=B6?= <304186371@qq.com> Date: Thu, 6 Dec 2018 20:18:53 +0800 Subject: [PATCH] [new feature] Rate: add icon-class prop (#1026) --- packages/rate/README.md | 8 ++++++++ packages/rate/index.ts | 2 ++ packages/rate/index.wxml | 1 + 3 files changed, 11 insertions(+) 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 }}"