mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 17:51:54 +00:00
[new feature] Search: support input native events (#451)
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
:placeholder="$t('placeholder')"
|
||||
:showAction="true"
|
||||
@search="onSearch"
|
||||
@cancel="onCancel">
|
||||
</van-search>
|
||||
@cancel="onCancel"
|
||||
/>
|
||||
</form>
|
||||
</demo-block>
|
||||
|
||||
|
@@ -90,12 +90,10 @@ Filed support all native properties of input tag,such as `maxlength`、`placeh
|
||||
| icon | Right side Icon name | `String` | - | - |
|
||||
|
||||
### Event
|
||||
Filed support all native events of input tag,such as `keypress`、`keyup`
|
||||
Filed support all native events of input tag,such as `focus`、`blur`、`keypress`
|
||||
|
||||
| Event | Description | Parameters |
|
||||
|-----------|-----------|-----------|
|
||||
| focus | Triggered when filed get focused | - |
|
||||
| blur | Triggered when blur filed | - |
|
||||
| click-icon | Triggered when click the icon of filed | - |
|
||||
|
||||
### Slot
|
||||
|
@@ -64,6 +64,7 @@ Search support all native properties of input tag,such as `maxlength`、`place
|
||||
| showAction | Whether to show right button | `Boolean` | false | - |
|
||||
|
||||
### Event
|
||||
Search support all native events of input tag,such as `focus`、`blur`、`keypress`
|
||||
|
||||
| Event | Description | Attribute |
|
||||
|-----------|-----------|-----------|
|
||||
|
@@ -92,12 +92,10 @@ Filed 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`pla
|
||||
| icon | 输入框尾部图标 | `String` | - | Icon 组件支持的类型 |
|
||||
|
||||
### Event
|
||||
Filed 默认支持 Input 标签所有的原生事件,比如 `keypress`、`keyup` 等
|
||||
Filed 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`keypress` 等
|
||||
|
||||
| 事件名称 | 说明 | 回调参数 |
|
||||
|-----------|-----------|-----------|
|
||||
| focus | 输入框聚焦时触发 | - |
|
||||
| blur | 输入框失焦时触发 | - |
|
||||
| click-icon | 点击尾部图标时触发 | - |
|
||||
|
||||
### Slot
|
||||
|
@@ -54,6 +54,7 @@ Search 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`pl
|
||||
| showAction | 是否在搜索框右侧显示取消按钮 | `Boolean` | false | - |
|
||||
|
||||
### Event
|
||||
Search 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`keypress` 等
|
||||
|
||||
| 事件名 | 说明 | 参数 |
|
||||
|-----------|-----------|-----------|
|
||||
|
Reference in New Issue
Block a user