feat(Field): add new slot left-icon @rex-zsd (#962)

This commit is contained in:
rex 2018-11-27 11:57:29 +08:00 committed by neverland
parent 1ea6fd49d8
commit 8b9f3dbdd1
2 changed files with 2 additions and 0 deletions

View File

@ -182,6 +182,7 @@ Page({
| 名称 | 说明 |
|-----------|-----------|
| label | 自定义输入框标签,如果设置了`label`属性则不生效 |
| left-icon | 自定义输入框头部图标,如果设置了`left-icon`属性则不生效 |
| icon | 自定义输入框尾部图标,需要设置`use-icon-slot`属性,如果设置了`icon`属性则不生效 |
| button | 自定义输入框尾部按钮,需要设置`use-button-slot`属性 |

View File

@ -9,6 +9,7 @@
title-width="{{ titleWidth }}"
custom-class="van-field"
>
<slot name="left-icon" slot="icon" />
<slot name="label" slot="title" />
<view class="van-field__body {{ type === 'textarea' ? 'van-field__body--textarea' : '' }}">
<textarea