jiaqingjiayi-xiaochengxu/甲情_甲意/node_modules/antd-mini/es/Selector/index.axml
2024-11-15 11:51:28 +08:00

44 lines
1.4 KiB
XML

<import-sjs
from="./index.sjs"
name="util"
></import-sjs>
<view
class="ant-selector {{className ? className : ''}} {{disabled ? 'ant-selector-disabled' : ''}}"
style="{{style}}"
>
<view class="ant-selector-content-container">
<block
a:for="{{options}}"
a:for-index="index"
a:for-item="item"
>
<view class="ant-selector-content {{options.length <= 2 ? 'ant-selector-content-item2' : ''}}">
<view
class="ant-selector-item {{item.disabled ? 'ant-selector-item-disabled' : ''}} {{util.getChecked(item.value, mixin.value, multiple) ? 'ant-selector-item-active ' + (activeItemClassName || '') : ''}}"
style="{{util.getChecked(item.value, mixin.value, multiple) ? activeItemStyle || '' : ''}}"
data-value="{{item.value}}"
data-disabled="{{item.disabled}}"
onTap="onChange"
>
<view
a:if="{{item.text}}"
class="ant-selector-item-text"
>
{{item.text}}
</view>
<view
a:if="{{item.subText}}"
class="ant-selector-item-subtext"
>
{{item.subText}}
</view>
<view
a:if="{{util.getChecked(item.value, mixin.value, multiple)}}"
class="ant-selector-item-badge-active"
></view>
<slot item="{{item}}"></slot>
</view>
</view>
</block>
</view>
</view>