mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
feat(search): add new event click-input (#4337)
* Update index.wxml * Update index.js * Update README.md * Update README.md
This commit is contained in:
parent
c7a81a0d74
commit
95032ed290
@ -77,5 +77,8 @@ component_1.VantComponent({
|
|||||||
onClear: function (event) {
|
onClear: function (event) {
|
||||||
this.$emit('clear', event.detail);
|
this.$emit('clear', event.detail);
|
||||||
},
|
},
|
||||||
|
onClickInput: function (event) {
|
||||||
|
this.$emit('click-input', event.detail);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
bind:change="onChange"
|
bind:change="onChange"
|
||||||
bind:confirm="onSearch"
|
bind:confirm="onSearch"
|
||||||
bind:clear="onClear"
|
bind:clear="onClear"
|
||||||
|
bind:click-input="onClickInput"
|
||||||
>
|
>
|
||||||
<slot wx:if="{{ useLeftIconSlot }}" name="left-icon" slot="left-icon" />
|
<slot wx:if="{{ useLeftIconSlot }}" name="left-icon" slot="left-icon" />
|
||||||
<slot wx:if="{{ useRightIconSlot }}" name="right-icon" slot="right-icon" />
|
<slot wx:if="{{ useRightIconSlot }}" name="right-icon" slot="right-icon" />
|
||||||
|
@ -145,6 +145,7 @@ Page({
|
|||||||
| bind:focus | 输入框聚焦时触发 | - |
|
| bind:focus | 输入框聚焦时触发 | - |
|
||||||
| bind:blur | 输入框失焦时触发 | - |
|
| bind:blur | 输入框失焦时触发 | - |
|
||||||
| bind:clear | 点击清空控件时触发 | - |
|
| bind:clear | 点击清空控件时触发 | - |
|
||||||
|
| bind:click-input | 点击搜索区域时触发 | - |
|
||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user