Merge branch '2.x' into dev

This commit is contained in:
chenjiahan
2020-11-21 18:47:31 +08:00
59 changed files with 277 additions and 264 deletions

View File

@@ -30,7 +30,7 @@ export default {
### Listen to Events
`search` event will be triggered when click the search button on the keyboard, `cancel` event will be triggered when click the cancel button.
`search` event will be Emitted when click the search button on the keyboard, `cancel` event will be Emitted when click the cancel button.
```html
<form action="/">
@@ -91,7 +91,7 @@ export default {
### Custom Action Button
Use `action` slot to custom right button, `cancel` event will no longer be triggered when use this slot.
Use `action` slot to custom right button, `cancel` event will no longer be Emitted when use this slot.
```html
<van-search
@@ -132,14 +132,14 @@ Use `action` slot to custom right button, `cancel` event will no longer be trigg
### Events
| Event | Description | Arguments |
| ------ | ---------------------------------- | --------------- |
| search | Triggered when confirm search | _value: string_ |
| input | Triggered when input value changed | _value: string_ |
| focus | Triggered when input gets focus | _event: Event_ |
| blur | Triggered when input loses focus | _event: Event_ |
| clear | Triggered when click clear icon | _event: Event_ |
| cancel | Triggered when click cancel button | - |
| Event | Description | Arguments |
| ------ | ----------------------------------------- | --------------- |
| search | Emitted when confirming search | _value: string_ |
| input | Emitted when input value changed | _value: string_ |
| focus | Emitted when input is focused | _event: Event_ |
| blur | Emitted when input is blured | _event: Event_ |
| clear | Emitted when the clear icon is clicked | _event: Event_ |
| cancel | Emitted when the cancel button is clicked | - |
### Slots