Skip to content

Commit

Permalink
feat: wechat support slot
Browse files Browse the repository at this point in the history
  • Loading branch information
rayhomie committed Sep 23, 2024
1 parent d212287 commit e29a4b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 5 additions & 1 deletion compiled/wechat/src/Picker/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
style="{{style || ''}}"
bind:tap="onOpen"
>
<slot name="prefix"></slot>
<view class="ant-picker-value">
<view
wx:if="{{formatValue}}"
Expand All @@ -19,6 +20,7 @@
>{{placeholder}}</view>
</block>
</view>
<slot name="suffix"></slot>
</view>
<ant-popup
className="ant-picker-popup {{popClassName || ''}}"
Expand All @@ -37,7 +39,9 @@
hoverStayTime="50"
bind:tap="onCancel"
>{{cancelText}}</view>
<view class="ant-picker-header-item ant-picker-header-title"></view>
<view class="ant-picker-header-item ant-picker-header-title">
<view>{{title}}</view>
</view>
<view
class="ant-picker-header-item ant-picker-header-confirm"
hoverClass="ant-picker-header-item-hover"
Expand Down
7 changes: 3 additions & 4 deletions src/Picker/index.axml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
class="ant-picker {{ disabled ? 'ant-picker-disabled' : '' }} {{ className || '' }}"
style="{{ style || '' }}"
onTap="onOpen">
<!-- #if ALIPAY -->
<slot name="prefix" />
<!-- #endif -->
<view class="ant-picker-value">
<!-- #if ALIPAY -->
<slot name="content" />
Expand All @@ -26,9 +24,7 @@
</view>
</block>
</view>
<!-- #if ALIPAY -->
<slot name="suffix" />
<!-- #endif -->
</view>
<ant-popup
className="ant-picker-popup {{ popClassName || '' }}"
Expand All @@ -51,6 +47,9 @@
<!-- #if ALIPAY -->
<slot name="title">{{ title }}</slot>
<!-- #endif -->
<!-- #if WECHAT -->
<view>{{title}}</view>
<!-- #endif -->
</view>
<view
class="ant-picker-header-item ant-picker-header-confirm"
Expand Down

0 comments on commit e29a4b9

Please sign in to comment.