[improvement] Field: add left-icon slot (#1973)

This commit is contained in:
neverland 2018-10-24 21:17:50 +08:00 committed by GitHub
parent d0b8595b50
commit dd9d0e856b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -154,5 +154,6 @@ Use ref to get field instance and call instance methods
| name | Description |
|------|------|
| label | Custom label |
| icon | Custom icon |
| left-icon | Custom left icon |
| icon | Custom right icon |
| button | Insert button |

View File

@ -13,6 +13,7 @@
'min-height': type === 'textarea' && !autosize
})"
>
<slot name="left-icon" slot="icon" />
<slot name="label" slot="title" />
<div :class="b('body')">
<textarea

View File

@ -156,5 +156,6 @@ Field 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`k
| 名称 | 说明 |
|------|------|
| label | 自定义输入框标签 |
| left-icon | 自定义输入框头部图标 |
| icon | 自定义输入框尾部图标 |
| button | 自定义输入框尾部按钮 |