<!--components/searchSelectWrapper/index.wxml-->
<view class="wrapper" wx:if="{{type === 'select'}}">
    <view class="label"><text class="required" wx:if="{{required}}">*</text>{{ label }}</view>
    <view class="content" bind:tap="clickTime" bind:tap="onSearch" style="background-color: {{transparent ? 'transparent' : 'white'}};">
        <view class="text" wx:if="{{!text}}" style="color: #ccc;"> {{placeholder}} </view>
        <view class="text" wx:else> {{text}} </view>
        <!-- <van-icon name="close" custom-style="margin-right: 16rpx" /> -->
        <van-icon name="arrow-down" />
    </view>
</view>
<view class="wrapper" wx:if="{{type === 'inputSearch'}}">
    <view class="label"><text class="required" wx:if="{{required}}">*</text>{{ label }}</view>
    <view class="inputContent" bind:tap="clickTime" style="background-color: {{transparent ? 'transparent' : 'white'}};">
        <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"><text class="required" wx:if="{{required}}">*</text>{{ label }}</view>
    <view class="inputContent" bind:tap="clickTime" style="background-color: {{transparent ? 'transparent' : 'white'}};">
        <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>

<view class="wrapper" wx:if="{{useSlot}}">
    <view class="label"><text class="required" wx:if="{{required}}">*</text>{{ label }}</view>
    <view class="inputContent" bind:tap="clickTime" style="{{hideBorder ? 'border: none;' : ''}} {{transparent ? 'background-color: transparent;' : ''}}">
        <slot></slot>
    </view>
</view>