feat(GoodsActionIcon): add icon slot (#2009)

This commit is contained in:
Jake 2019-09-10 11:15:13 +08:00 committed by neverland
parent 9bd12ede08
commit ca7cf3f2ce
2 changed files with 8 additions and 0 deletions

View File

@ -24,12 +24,14 @@
> >
<view class="van-goods-action-icon__content van-hairline--right"> <view class="van-goods-action-icon__content van-hairline--right">
<van-icon <van-icon
wx:if="{{ icon }}"
size="20px" size="20px"
name="{{ icon }}" name="{{ icon }}"
info="{{ info }}" info="{{ info }}"
class="van-goods-action-icon__icon" class="van-goods-action-icon__icon"
custom-class="icon-class" custom-class="icon-class"
/> />
<slot name="icon" />
<text class="text-class">{{ text }}</text> <text class="text-class">{{ text }}</text>
</view> </view>
</van-button> </van-button>

View File

@ -122,6 +122,12 @@ Page({
|-----------|-----------|-----------| |-----------|-----------|-----------|
| click | 按钮点击事件回调 | - | | click | 按钮点击事件回调 | - |
### GoodsActionIcon Slot
| 名称 | 说明 |
|-----------|-----------|
| icon | 自定义图标 |
### GoodsActionIcon 外部样式类 ### GoodsActionIcon 外部样式类
| 类名 | 说明 | | 类名 | 说明 |