forked from ant-design/ant-design-mini
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.axml
95 lines (94 loc) · 2.67 KB
/
index.axml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<import-sjs
from="./index.sjs"
name="_sjs" />
<view
class="ant-picker {{ disabled ? 'ant-picker-disabled' : '' }} {{ className || '' }}"
style="{{ style || '' }}"
onTap="onOpen">
<slot name="prefix" />
<view class="ant-picker-value">
<slot name="content" />
<view
a:if="{{ formatValue }}"
class="ant-picker-value-text">
{{ formatValue }}
</view>
<block a:else>
<view
a:if="{{ placeholder }}"
class="ant-picker-value-placeholder">
{{ placeholder }}
</view>
</block>
</view>
<slot name="suffix" />
</view>
<ant-popup
className="ant-picker-popup {{ popClassName || '' }}"
style="{{ popStyle || '' }}"
position="bottom"
animationType="{{ animationType }}"
destroyOnClose
onClose="onMaskDismiss"
visible="{{ state.visible }}">
<view class="ant-picker-header">
<view
class="ant-picker-header-item ant-picker-header-cancel"
hover-class="ant-picker-header-item-hover"
hover-start-time="20"
hover-stay-time="50"
onTap="onCancel">
{{ cancelText }}
</view>
<view class="ant-picker-header-item ant-picker-header-title">
<slot name="title">{{ title }}</slot>
</view>
<view
class="ant-picker-header-item ant-picker-header-confirm"
hover-class="ant-picker-header-item-hover"
hover-start-time="20"
hover-stay-time="50"
onTap="onOk">
{{ okText }}
</view>
</view>
<view class="ant-picker-content">
<slot name="content-header" />
<block a:if="{{ columns }}">
<picker-view
class="ant-picker-picker-view"
mask-style="{{ maskStyle || '' }}"
mask-class="{{ maskClassName || '' }}"
indicator-style="{{ indicatorStyle || '' }}"
indicator-class="{{ indicatorClassName || '' }}"
value="{{ selectedIndex }}"
onChange="onChange">
<block
a:for="{{ columns }}"
a:for-index="dataIndex"
a:for-item="dataRoot">
<picker-view-column
a:if="{{ dataIndex < options.length }}"
class="ant-picker-picker-view-column">
<block
a:for="{{ dataRoot }}"
a:for-index="index"
a:for-item="item">
<view class="ant-picker-content-item">
{{ _sjs.getPickerViewLabel(item) }}
</view>
</block>
</picker-view-column>
</block>
</picker-view>
</block>
<block a:else>
<picker-view>
<picker-view-column>
<!-- display: inline -->
<text style="color: #ccc">{{ emptyText }}</text>
</picker-view-column>
</picker-view>
</block>
</view>
</ant-popup>