mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
30 lines
892 B
Plaintext
30 lines
892 B
Plaintext
<view
|
|
class="van-search custom-class {{ showAction || useActionSlot ? 'van-search--show-action' : '' }}"
|
|
style="background: {{ background }}"
|
|
>
|
|
<view class="van-search__field">
|
|
<van-field
|
|
clearable
|
|
type="search"
|
|
left-icon="search"
|
|
focus="{{ focus }}"
|
|
border="{{ false }}"
|
|
confirm-type="search"
|
|
value="{{ value }}"
|
|
disabled="{{ disabled }}"
|
|
readonly="{{ readony }}"
|
|
maxlength="{{ maxlength }}"
|
|
placeholder="{{ placeholder }}"
|
|
custom-style="padding: 3px 10px"
|
|
bind:blur="onBlur"
|
|
bind:focus="onFocus"
|
|
bind:change="onChange"
|
|
bind:confirm="onSearch"
|
|
/>
|
|
</view>
|
|
<view wx:if="{{ showAction || useActionSlot }}" class="van-search__action">
|
|
<slot wx:if="{{ useActionSlot }}" name="action" />
|
|
<view wx:else bind:tap="onCancel" class="cancel-class">取消</view>
|
|
</view>
|
|
</view>
|