form-field-select.wxml
888 Bytes
<view class="form-info-row {{ disabled ? 'is-disabled' : '' }}" bindtap="onTap">
<view class="form-info-row__label">
<text>{{ field.label }}</text>
<text class="form-info-row__required" wx:if="{{ field.required }}">*</text>
</view>
<view class="form-info-row__value {{ displayLabel ? '' : 'is-placeholder' }}">
<text>{{ displayLabel || '请选择' }}</text>
<image class="form-info-row__arrow" src="{{ arrowIconUrl }}" mode="aspectFit" />
</view>
</view>
<view wx:if="{{ error }}" class="form-info-row__error">{{ error }}</view>
<form-picker-popup
show="{{ showPicker }}"
title="{{ field.label }}"
mode="single"
options="{{ pickerOptions }}"
value="{{ pickerValue }}"
loading="{{ loadingOptions }}"
searchable="{{ pickerSearchable }}"
search-keyword="{{ searchKeyword }}"
bind:search="onPickerSearch"
bind:confirm="onPickerConfirm"
bind:cancel="onPickerCancel"
/>