feat(search): add new event click-input (#4357)

* Update index.wxml

* Update index.ts
This commit is contained in:
shuhanxu 2021-07-21 18:59:00 -07:00 committed by GitHub
parent 35b90ed23c
commit 859f37c425
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -83,5 +83,9 @@ VantComponent({
onClear(event: WechatMiniprogram.CustomEvent) {
this.$emit('clear', event.detail);
},
onClickInput: function (event) {
this.$emit('click-input', event.detail);
},
},
});

View File

@ -32,6 +32,7 @@
bind:change="onChange"
bind:confirm="onSearch"
bind:clear="onClear"
bind:click-input="onClickInput"
>
<slot wx:if="{{ useLeftIconSlot }}" name="left-icon" slot="left-icon" />
<slot wx:if="{{ useRightIconSlot }}" name="right-icon" slot="right-icon" />