File tree 6 files changed +63
-31
lines changed
6 files changed +63
-31
lines changed Original file line number Diff line number Diff line change 40
40
placeholder =" 请选择"
41
41
title =" 请选择"
42
42
options =" {{list}}"
43
- ></ant-picker >
43
+ >
44
+ <view
45
+ slot =" content"
46
+ slot-scope =" prop"
47
+ >已选择:{{prop.value}}</view >
48
+ </ant-picker >
44
49
</ant-list-item >
45
50
<view class =" btn-wrapper" >
46
51
<ant-button
Original file line number Diff line number Diff line change 7
7
style =" {{style || ''}}"
8
8
onTap =" onOpen"
9
9
>
10
- <slot name =" prefix" ></slot >
10
+ <slot
11
+ name =" prefix"
12
+ value =" {{formatValue}}"
13
+ ></slot >
11
14
<view class =" ant-picker-value" >
12
- <slot name =" content" ></slot >
13
- <view
14
- a : if =" {{formatValue}}"
15
- class =" ant-picker-value-text"
15
+ <slot
16
+ name =" content"
17
+ value =" {{formatValue}}"
16
18
>
17
- {{formatValue}}
18
- </view >
19
- <block a:else>
20
19
<view
21
- a : if =" {{placeholder }}"
22
- class =" ant-picker-value-placeholder "
20
+ a : if =" {{formatValue }}"
21
+ class =" ant-picker-value-text "
23
22
>
24
- {{placeholder }}
23
+ {{formatValue }}
25
24
</view >
26
- </block >
25
+ <block a:else>
26
+ <view
27
+ a : if =" {{placeholder}}"
28
+ class =" ant-picker-value-placeholder"
29
+ >
30
+ {{placeholder}}
31
+ </view >
32
+ </block >
33
+ </slot >
27
34
</view >
28
- <slot name =" suffix" ></slot >
35
+ <slot
36
+ name =" suffix"
37
+ value =" {{formatValue}}"
38
+ ></slot >
29
39
</view >
30
40
<ant-popup
31
41
className =" ant-picker-popup {{popClassName || ''}}"
Original file line number Diff line number Diff line change 34
34
placeholder="请选择"
35
35
title="请选择"
36
36
options="{{list}}"
37
- ></ant-picker>
37
+ >
38
+ <view
39
+ slot="content"
40
+ slot-scope="prop"
41
+ >已选择:{{prop.value}}</view>
42
+ </ant-picker>
38
43
</ant-list-item>
39
44
<view class="btn-wrapper">
40
45
<ant-button
Original file line number Diff line number Diff line change 7
7
style="{{style || ''}}"
8
8
bind:tap="onOpen"
9
9
>
10
- <slot name="prefix"></slot>
10
+ <slot
11
+ name="prefix"
12
+ value="{{formatValue}}"
13
+ ></slot>
11
14
<view class="ant-picker-value">
12
15
<view
13
16
wx:if="{{formatValue}}"
20
23
>{{placeholder}}</view>
21
24
</block>
22
25
</view>
23
- <slot name="suffix"></slot>
26
+ <slot
27
+ name="suffix"
28
+ value="{{formatValue}}"
29
+ ></slot>
24
30
</view>
25
31
<ant-popup
26
32
className="ant-picker-popup {{popClassName || ''}}"
Original file line number Diff line number Diff line change 37
37
value =" {{ value }}"
38
38
placeholder =" 请选择"
39
39
title =" 请选择"
40
- options =" {{ list }}" />
40
+ options =" {{ list }}"
41
+ >
42
+ <view slot =" content" slot-scope =" prop" >已选择:{{prop.value}}</view >
43
+ </ant-picker >
41
44
</ant-list-item >
42
45
<view class =" btn-wrapper" >
43
46
<ant-button
Original file line number Diff line number Diff line change 6
6
class =" ant-picker {{ disabled ? 'ant-picker-disabled' : '' }} {{ className || '' }}"
7
7
style =" {{ style || '' }}"
8
8
onTap =" onOpen" >
9
- <slot name =" prefix" />
9
+ <slot name =" prefix" value = " {{formatValue}} " />
10
10
<view class =" ant-picker-value" >
11
11
<!-- #if ALIPAY -->
12
- <slot name =" content" / >
12
+ <slot name =" content" value = " {{formatValue}} " >
13
13
<!-- #endif -->
14
- <view
15
- a : if =" {{ formatValue }}"
16
- class =" ant-picker-value-text" >
17
- {{ formatValue }}
18
- </view >
19
- <block a:else>
20
14
<view
21
- a : if =" {{ placeholder }}"
22
- class =" ant-picker-value-placeholder " >
23
- {{ placeholder }}
15
+ a : if =" {{ formatValue }}"
16
+ class =" ant-picker-value-text " >
17
+ {{ formatValue }}
24
18
</view >
25
- </block >
19
+ <block a:else>
20
+ <view
21
+ a : if =" {{ placeholder }}"
22
+ class =" ant-picker-value-placeholder" >
23
+ {{ placeholder }}
24
+ </view >
25
+ </block >
26
+ <!-- #if ALIPAY -->
27
+ </slot >
28
+ <!-- #endif -->
26
29
</view >
27
- <slot name =" suffix" />
30
+ <slot name =" suffix" value = " {{formatValue}} " />
28
31
</view >
29
32
<ant-popup
30
33
className =" ant-picker-popup {{ popClassName || '' }}"
You can’t perform that action at this time.
0 commit comments