[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
@@ -41,6 +41,7 @@ Tips: 在 `van-search` 外层增加 form 标签,并且 action 不为空,即
v-model="value"
placeholder="请输入搜索关键词"
show-action
shape="round"
@search="onSearch"
>
<div slot="action" @click="onSearch">搜索</div>
@@ -59,6 +60,8 @@ Search 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`pl
| readonly | 是否只读 | `Boolean` | `false` | - |
| error | 是否将输入内容标红 | `Boolean` | `false` | - |
| input-align | 输入框内容对齐方式,可选值为 `center` `right` | `String` | `left` | - |
| shape | 形状,可选值为 `round` | `String` | `square` | - |
| label | 搜索框左侧文本 | `String` | - | - |
### Event
@@ -76,3 +79,4 @@ Search 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`
|------|------|
| action | 自定义搜索框右侧按钮,需要在`showAction`为 true 时才会显示 |
| left-icon | 自定义输入框头部图标 |
| label | 自定义搜索框左侧文本 |