From 22acb8ddbc9779d7e4dca901a73ce50965ce65fe Mon Sep 17 00:00:00 2001 From: johnsonwong666 <64689255+johnsonwong666@users.noreply.github.com> Date: Mon, 3 Jul 2023 17:06:35 +0800 Subject: [PATCH] feat(goods-action-icon): add size prop (#5457) --- packages/goods-action-icon/index.ts | 1 + packages/goods-action-icon/index.wxml | 1 + packages/goods-action/README.md | 1 + packages/icon/README.md | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/goods-action-icon/index.ts b/packages/goods-action-icon/index.ts index 69131abd..840972a5 100644 --- a/packages/goods-action-icon/index.ts +++ b/packages/goods-action-icon/index.ts @@ -12,6 +12,7 @@ VantComponent({ dot: Boolean, info: String, icon: String, + size: String, color: String, classPrefix: { type: String, diff --git a/packages/goods-action-icon/index.wxml b/packages/goods-action-icon/index.wxml index eb31610d..b19e795c 100644 --- a/packages/goods-action-icon/index.wxml +++ b/packages/goods-action-icon/index.wxml @@ -27,6 +27,7 @@ name="{{ icon }}" dot="{{ dot }}" info="{{ info }}" + size="{{ size }}" color="{{ color }}" class-prefix="{{ classPrefix }}" class="van-goods-action-icon__icon" diff --git a/packages/goods-action/README.md b/packages/goods-action/README.md index 80518ba2..16bc7a90 100644 --- a/packages/goods-action/README.md +++ b/packages/goods-action/README.md @@ -105,6 +105,7 @@ Page({ | icon | 图标类型,可选值见`icon`组件 | _string_ | - | | info | 图标右上角提示信息 | _string \| number_ | - | | color `v1.10.15` | 图标颜色 | _string_ | `inherit` | +| size | 图标大小,如 20px,2em,默认单位为px | _string \| number_ | - | | url | 点击后跳转的链接地址 | _string_ | - | | link-type | 链接跳转类型,可选值为 `redirectTo` `switchTab` `reLaunch` | _string_ | `navigateTo` | | id | 标识符 | _string_ | - | diff --git a/packages/icon/README.md b/packages/icon/README.md index d58e5506..7216ab4f 100644 --- a/packages/icon/README.md +++ b/packages/icon/README.md @@ -86,7 +86,7 @@ | dot | 是否显示图标右上角小红点 | _boolean_ | `false` | | info | 图标右上角文字提示 | _string \| number_ | - | | color | 图标颜色 | _string_ | `inherit` | -| size | 图标大小,如 `20px`,`2em`,默认单位为`px` | _string \| number_ | `inherit` | +| size `v1.10.20` | 图标大小,如 `20px`,`2em`,默认单位为`px` | _string \| number_ | `inherit` | | custom-style | 自定义样式 | _string_ | - | | class-prefix | 类名前缀 | _string_ | `van-icon` |