Merge pull request #5273 from fanburger/feature/add_feature_5270

feat(van-goods-action-icon): Added the 'color' attribute for customizing the icon color.
This commit is contained in:
landluck 2023-03-06 20:59:32 +08:00 committed by GitHub
commit 0e425098af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,7 @@ VantComponent({
dot: Boolean,
info: String,
icon: String,
color: String,
classPrefix: {
type: String,
value: 'van-icon',

View File

@ -27,6 +27,7 @@
name="{{ icon }}"
dot="{{ dot }}"
info="{{ info }}"
color="{{ color }}"
class-prefix="{{ classPrefix }}"
class="van-goods-action-icon__icon"
custom-class="icon-class"

View File

@ -104,6 +104,7 @@ Page({
| text | 按钮文字 | _string_ | - |
| icon | 图标类型,可选值见`icon`组件 | _string_ | - |
| info | 图标右上角提示信息 | _string \| number_ | - |
| color `v1.10.15` | 图标颜色 | _string_ | `inherit` |
| url | 点击后跳转的链接地址 | _string_ | - |
| link-type | 链接跳转类型,可选值为 `redirectTo` `switchTab` `reLaunch` | _string_ | `navigateTo` |
| id | 标识符 | _string_ | - |