mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[bugfix] Field: clear icon position
This commit is contained in:
parent
4b10628d12
commit
f76c438f1d
@ -1,6 +1,6 @@
|
|||||||
<demo-block title="基础用法">
|
<demo-block title="基础用法">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field value="{{ value }}" placeholder="请输入用户名" border="{{ false }}" />
|
<van-field value="{{ value }}" placeholder="请输入用户名" border="{{ false }}" clearable />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</demo-block>
|
</demo-block>
|
||||||
|
|
||||||
|
@ -144,6 +144,7 @@
|
|||||||
| left-icon | 输入框左侧图标 (可选值见 Icon 组件) | `String` | - |
|
| left-icon | 输入框左侧图标 (可选值见 Icon 组件) | `String` | - |
|
||||||
| confirm-type | 设置键盘右下角按钮的文字,仅在 type='text' 时生效 | `String` | `done` |
|
| confirm-type | 设置键盘右下角按钮的文字,仅在 type='text' 时生效 | `String` | `done` |
|
||||||
| cursor-spacing | 输入框聚焦时底部与键盘的距离 | `Number` | `50` |
|
| cursor-spacing | 输入框聚焦时底部与键盘的距离 | `Number` | `50` |
|
||||||
|
| use-icon-slot | 是否使用 icon slot | `Boolean` | `false` |
|
||||||
| use-button-slot | 是否使用 button slot | `Boolean` | `false` |
|
| use-button-slot | 是否使用 button slot | `Boolean` | `false` |
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
@ -162,7 +163,7 @@
|
|||||||
| 名称 | 说明 |
|
| 名称 | 说明 |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| label | 自定义输入框标签,如果设置了`label`属性则不生效 |
|
| label | 自定义输入框标签,如果设置了`label`属性则不生效 |
|
||||||
| icon | 自定义输入框尾部图标,如果设置了`icon`属性则不生效 |
|
| icon | 自定义输入框尾部图标,需要设置`use-icon-slot`属性,如果设置了`icon`属性则不生效 |
|
||||||
| button | 自定义输入框尾部按钮,需要设置`use-button-slot`属性 |
|
| button | 自定义输入框尾部按钮,需要设置`use-button-slot`属性 |
|
||||||
|
|
||||||
### 外部样式类
|
### 外部样式类
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
custom-class="van-field__clear"
|
custom-class="van-field__clear"
|
||||||
bind:touchstart="onClear"
|
bind:touchstart="onClear"
|
||||||
/>
|
/>
|
||||||
<view class="van-field__icon-container" bind:tap="onTapIcon">
|
<view class="van-field__icon-container" wx:if="{{ icon || useIconSlot }}" bind:tap="onTapIcon">
|
||||||
<van-icon
|
<van-icon
|
||||||
wx:if="{{ icon }}"
|
wx:if="{{ icon }}"
|
||||||
name="{{ icon }}"
|
name="{{ icon }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user