mirror of
https://github.com/ant-design/ant-design-mini.git
synced 2024-10-23 08:44:21 +08:00
Fix wx picker slot (#1280)
* feat: wechat support slot * feat: picker slot support get params
This commit is contained in:
parent
d4a3866296
commit
73b809b64f
@ -40,7 +40,12 @@
|
||||
placeholder="请选择"
|
||||
title="请选择"
|
||||
options="{{list}}"
|
||||
></ant-picker>
|
||||
>
|
||||
<view
|
||||
slot="content"
|
||||
slot-scope="prop"
|
||||
>已选择:{{prop.value}}</view>
|
||||
</ant-picker>
|
||||
</ant-list-item>
|
||||
<view class="btn-wrapper">
|
||||
<ant-button
|
||||
|
@ -7,25 +7,35 @@
|
||||
style="{{style || ''}}"
|
||||
onTap="onOpen"
|
||||
>
|
||||
<slot name="prefix"></slot>
|
||||
<slot
|
||||
name="prefix"
|
||||
value="{{formatValue}}"
|
||||
></slot>
|
||||
<view class="ant-picker-value">
|
||||
<slot name="content"></slot>
|
||||
<view
|
||||
a:if="{{formatValue}}"
|
||||
class="ant-picker-value-text"
|
||||
<slot
|
||||
name="content"
|
||||
value="{{formatValue}}"
|
||||
>
|
||||
{{formatValue}}
|
||||
</view>
|
||||
<block a:else>
|
||||
<view
|
||||
a:if="{{placeholder}}"
|
||||
class="ant-picker-value-placeholder"
|
||||
a:if="{{formatValue}}"
|
||||
class="ant-picker-value-text"
|
||||
>
|
||||
{{placeholder}}
|
||||
{{formatValue}}
|
||||
</view>
|
||||
</block>
|
||||
<block a:else>
|
||||
<view
|
||||
a:if="{{placeholder}}"
|
||||
class="ant-picker-value-placeholder"
|
||||
>
|
||||
{{placeholder}}
|
||||
</view>
|
||||
</block>
|
||||
</slot>
|
||||
</view>
|
||||
<slot name="suffix"></slot>
|
||||
<slot
|
||||
name="suffix"
|
||||
value="{{formatValue}}"
|
||||
></slot>
|
||||
</view>
|
||||
<ant-popup
|
||||
className="ant-picker-popup {{popClassName || ''}}"
|
||||
|
@ -34,7 +34,12 @@
|
||||
placeholder="请选择"
|
||||
title="请选择"
|
||||
options="{{list}}"
|
||||
></ant-picker>
|
||||
>
|
||||
<view
|
||||
slot="content"
|
||||
slot-scope="prop"
|
||||
>已选择:{{prop.value}}</view>
|
||||
</ant-picker>
|
||||
</ant-list-item>
|
||||
<view class="btn-wrapper">
|
||||
<ant-button
|
||||
|
@ -7,7 +7,10 @@
|
||||
style="{{style || ''}}"
|
||||
bind:tap="onOpen"
|
||||
>
|
||||
<slot name="prefix"></slot>
|
||||
<slot
|
||||
name="prefix"
|
||||
value="{{formatValue}}"
|
||||
></slot>
|
||||
<view class="ant-picker-value">
|
||||
<view
|
||||
wx:if="{{formatValue}}"
|
||||
@ -20,7 +23,10 @@
|
||||
>{{placeholder}}</view>
|
||||
</block>
|
||||
</view>
|
||||
<slot name="suffix"></slot>
|
||||
<slot
|
||||
name="suffix"
|
||||
value="{{formatValue}}"
|
||||
></slot>
|
||||
</view>
|
||||
<ant-popup
|
||||
className="ant-picker-popup {{popClassName || ''}}"
|
||||
|
@ -37,7 +37,10 @@
|
||||
value="{{ value }}"
|
||||
placeholder="请选择"
|
||||
title="请选择"
|
||||
options="{{ list }}" />
|
||||
options="{{ list }}"
|
||||
>
|
||||
<view slot="content" slot-scope="prop" >已选择:{{prop.value}}</view>
|
||||
</ant-picker>
|
||||
</ant-list-item>
|
||||
<view class="btn-wrapper">
|
||||
<ant-button
|
||||
|
@ -6,25 +6,28 @@
|
||||
class="ant-picker {{ disabled ? 'ant-picker-disabled' : '' }} {{ className || '' }}"
|
||||
style="{{ style || '' }}"
|
||||
onTap="onOpen">
|
||||
<slot name="prefix" />
|
||||
<slot name="prefix" value="{{formatValue}}" />
|
||||
<view class="ant-picker-value">
|
||||
<!-- #if ALIPAY -->
|
||||
<slot name="content" />
|
||||
<slot name="content" value="{{formatValue}}" >
|
||||
<!-- #endif -->
|
||||
<view
|
||||
a:if="{{ formatValue }}"
|
||||
class="ant-picker-value-text">
|
||||
{{ formatValue }}
|
||||
</view>
|
||||
<block a:else>
|
||||
<view
|
||||
a:if="{{ placeholder }}"
|
||||
class="ant-picker-value-placeholder">
|
||||
{{ placeholder }}
|
||||
a:if="{{ formatValue }}"
|
||||
class="ant-picker-value-text">
|
||||
{{ formatValue }}
|
||||
</view>
|
||||
</block>
|
||||
<block a:else>
|
||||
<view
|
||||
a:if="{{ placeholder }}"
|
||||
class="ant-picker-value-placeholder">
|
||||
{{ placeholder }}
|
||||
</view>
|
||||
</block>
|
||||
<!-- #if ALIPAY -->
|
||||
</slot>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<slot name="suffix" />
|
||||
<slot name="suffix" value="{{formatValue}}" />
|
||||
</view>
|
||||
<ant-popup
|
||||
className="ant-picker-popup {{ popClassName || '' }}"
|
||||
|
Loading…
Reference in New Issue
Block a user