mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[new feature] Field: 增加 adjust-position
, confirm-hold
属性 (#955)
This commit is contained in:
parent
03bf23dadf
commit
98b00038f9
@ -159,7 +159,9 @@ Page({
|
||||
| icon | 输入框尾部图标 (可选值见 Icon 组件) | `String` | - |
|
||||
| left-icon | 输入框左侧图标 (可选值见 Icon 组件) | `String` | - |
|
||||
| confirm-type | 设置键盘右下角按钮的文字,仅在 type='text' 时生效 | `String` | `done` |
|
||||
| confirm-hold | 点击键盘右下角按钮时是否保持键盘不收起,在 type='textarea' 时无效 | `Boolean` | `false` |
|
||||
| cursor-spacing | 输入框聚焦时底部与键盘的距离 | `Number` | `50` |
|
||||
| adjust-position | 键盘弹起时,是否自动上推页面 | `Boolean` | `true` |
|
||||
| use-icon-slot | 是否使用 icon slot | `Boolean` | `false` |
|
||||
| use-button-slot | 是否使用 button slot | `Boolean` | `false` |
|
||||
|
||||
|
@ -23,12 +23,17 @@ VantComponent({
|
||||
inputAlign: String,
|
||||
customClass: String,
|
||||
confirmType: String,
|
||||
confirmHold: Boolean,
|
||||
errorMessage: String,
|
||||
placeholder: String,
|
||||
customStyle: String,
|
||||
useIconSlot: Boolean,
|
||||
useButtonSlot: Boolean,
|
||||
placeholderStyle: String,
|
||||
adjustPosition: {
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
cursorSpacing: {
|
||||
type: Number,
|
||||
value: 50
|
||||
|
@ -24,6 +24,7 @@
|
||||
placeholder-style="{{ placeholderStyle }}"
|
||||
placeholder-class="{{ error ? 'van-field--error' : '' }}"
|
||||
cursor-spacing="{{ cursorSpacing }}"
|
||||
adjust-position="{{ adjustPosition }}"
|
||||
bindinput="onInput"
|
||||
bind:blur="onBlur"
|
||||
bind:focus="onFocus"
|
||||
@ -41,7 +42,9 @@
|
||||
placeholder-style="{{ placeholderStyle }}"
|
||||
placeholder-class="{{ error ? 'van-field--error' : '' }}"
|
||||
confirm-type="{{ confirmType }}"
|
||||
confirm-hold="{{ confirmHold }}"
|
||||
cursor-spacing="{{ cursorSpacing }}"
|
||||
adjust-position="{{ adjustPosition }}"
|
||||
bindinput="onInput"
|
||||
bind:blur="onBlur"
|
||||
bind:focus="onFocus"
|
||||
|
Loading…
x
Reference in New Issue
Block a user