jiaqingjiayi-xiaochengxu/甲情_甲意/miniprogram/node_modules/antd-mini/less/Picker/index.axml

115 lines
2.9 KiB
Plaintext
Raw Normal View History

2024-12-01 11:56:54 +00:00
<import-sjs
from="./index.sjs"
name="_sjs"
></import-sjs>
2024-11-10 07:01:22 +00:00
<view
2024-12-01 11:56:54 +00:00
class="ant-picker {{disabled ? 'ant-picker-disabled' : ''}} {{className || ''}}"
2024-11-10 07:01:22 +00:00
style="{{style || ''}}"
onTap="onOpen"
>
2024-12-01 11:56:54 +00:00
<slot
name="prefix"
value="{{formatValue}}"
></slot>
<view class="ant-picker-value">
<slot
name="content"
value="{{formatValue}}"
>
<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>
</slot>
</view>
<slot
name="suffix"
value="{{formatValue}}"
></slot>
2024-11-10 07:01:22 +00:00
</view>
2024-12-01 11:56:54 +00:00
<ant-popup
2024-11-10 07:01:22 +00:00
className="ant-picker-popup {{popClassName || ''}}"
style="{{popStyle || ''}}"
position="bottom"
2024-12-01 11:56:54 +00:00
animationType="{{animationType}}"
2024-11-10 07:01:22 +00:00
destroyOnClose
onClose="onMaskDismiss"
2024-12-01 11:56:54 +00:00
visible="{{visible}}"
>
2024-11-10 07:01:22 +00:00
<view class="ant-picker-header">
2024-12-01 11:56:54 +00:00
<view
class="ant-picker-header-item ant-picker-header-cancel"
hoverClass="ant-picker-header-item-hover"
hoverStartTime="20"
hoverStayTime="50"
onTap="onCancel"
>
{{cancelText}}
</view>
2024-11-10 07:01:22 +00:00
<view class="ant-picker-header-item ant-picker-header-title">
2024-12-01 11:56:54 +00:00
<slot name="title">{{title}}</slot>
</view>
<view
class="ant-picker-header-item ant-picker-header-confirm"
hoverClass="ant-picker-header-item-hover"
hoverStartTime="20"
hoverStayTime="50"
onTap="onOk"
>
{{okText}}
2024-11-10 07:01:22 +00:00
</view>
</view>
<view class="ant-picker-content">
2024-12-01 11:56:54 +00:00
<slot name="content-header"></slot>
<block a:if="{{columns.length > 0}}">
<picker-view
class="ant-picker-picker-view"
maskStyle="{{maskStyle || ''}}"
maskClass="{{maskClassName || ''}}"
indicatorStyle="{{indicatorStyle || ''}}"
indicatorClass="{{indicatorClassName || ''}}"
2024-11-10 07:01:22 +00:00
value="{{selectedIndex}}"
2024-12-01 11:56:54 +00:00
onChange="onChange"
>
<block
2024-11-10 07:01:22 +00:00
a:for="{{columns}}"
2024-12-01 11:56:54 +00:00
a:for-index="dataIndex"
2024-11-10 07:01:22 +00:00
a:for-item="dataRoot"
2024-12-01 11:56:54 +00:00
>
<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">
2024-11-10 07:01:22 +00:00
{{_sjs.getPickerViewLabel(item)}}
</view>
2024-12-01 11:56:54 +00:00
</block>
2024-11-10 07:01:22 +00:00
</picker-view-column>
</block>
</picker-view>
</block>
<block a:else>
2024-12-01 11:56:54 +00:00
<picker-view class="ant-picker-picker-view">
<picker-view-column class="ant-picker-picker-view-column">
<!--display: inline-->
<text style="color: #ccc">{{emptyText}}</text>
2024-11-10 07:01:22 +00:00
</picker-view-column>
</picker-view>
</block>
</view>
2024-12-01 11:56:54 +00:00
</ant-popup>