electricity_bill_calc_wx/components/searchSelectWrapper/index.wxml
2025-03-03 16:54:40 +08:00

35 lines
1.4 KiB
Plaintext

<!--components/searchSelectWrapper/index.wxml-->
<view class="wrapper" wx:if="{{type === 'select'}}">
<view class="label"> {{ label }} </view>
<view class="content" bind:tap="clickTime" bind:tap="onSearch">
<view class="text" wx:if="{{!text}}" style="color: #ccc;"> {{placeholder}} </view>
<view class="text" wx:else> {{text}} </view>
<van-icon name="arrow-down" />
</view>
</view>
<view class="wrapper" wx:if="{{type === 'inputSearch'}}">
<view class="label"> {{ label }} </view>
<view class="inputContent" bind:tap="clickTime">
<van-field
value="{{ value }}"
placeholder="{{placeholder}}"
border="{{ false }}"
bind:change="onChangeKeyword"
custom-style="padding: 0;font-size: 30rpx;line-height: 32rpx;"
/>
</view>
<van-button type="info" size="small" bind:click="onSearchKeyword"> 搜索 </van-button>
</view>
<view class="wrapper" wx:if="{{type === 'input'}}">
<view class="label"> {{ label }} </view>
<view class="inputContent" bind:tap="clickTime">
<van-field
value="{{ value }}"
placeholder="{{placeholder}}"
border="{{ false }}"
type="fieldType"
bind:change="onChangeText"
custom-style="padding: 0;font-size: 30rpx;line-height: 32rpx;"
/>
</view>
</view>