[improvement] Search: add left-icon slot (#1974)

This commit is contained in:
neverland 2018-10-25 10:08:29 +08:00 committed by GitHub
parent aecfdc87b4
commit 1835da736a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -77,3 +77,4 @@ Search support all native events of input tagsuch as `focus`、`blur`、`keyp
| name | Description |
|------|------|
| action | Custom right button, displayed when `showAction` is true |
| left-icon | Custom left icon |

View File

@ -8,7 +8,9 @@
:value="value"
:border="false"
left-icon="search"
/>
>
<slot name="left-icon" slot="left-icon" />
</field>
<div v-if="showAction" :class="b('action')">
<slot name="action">
<div @click="onBack">{{ $t('cancel') }}</div>

View File

@ -71,3 +71,4 @@ Search 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`
| 名称 | 说明 |
|------|------|
| action | 自定义搜索框右侧按钮,需要在`showAction`为 true 时才会显示 |
| left-icon | 自定义输入框头部图标 |