[new feature] Search: update style, add new prop shape、label (#2788)

This commit is contained in:
rex
2019-02-19 11:32:05 +08:00
committed by neverland
parent 07a6bcbe9f
commit 52a4b7eec9
7 changed files with 94 additions and 39 deletions
+4
View File
@@ -49,6 +49,7 @@ Use `action` slot to custom right button, `cancel` event will no longer be trigg
<van-search
v-model="value"
show-action
shape="round"
@search="onSearch"
>
<div slot="action" @click="onSearch">Search</div>
@@ -67,6 +68,8 @@ Search support all native properties of input tagsuch as `maxlength`、`place
| readonly | Whether to be readonly | `Boolean` | `false` |
| error | Whether to show error info | `Boolean` | `false` |
| input-align | Input text align, can be set to `center` `right` | `String` | `left` |
| shape | Can be set to `round` | `String` | `square` |
| label | Search label | `String` | - |
### Event
@@ -84,3 +87,4 @@ Search support all native events of input tagsuch as `focus`、`blur`、`keyp
|------|------|
| action | Custom right button, displayed when `showAction` is true |
| left-icon | Custom left icon |
| label | Custom Search label |