mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-25 02:58:27 +08:00
增加 Field 组件 focus 属性 (#135)
This commit is contained in:
parent
db20736797
commit
206d44252f
@ -2,6 +2,7 @@ module.exports = {
|
|||||||
// 基础类型输入框配置
|
// 基础类型输入框配置
|
||||||
base: {
|
base: {
|
||||||
name: {
|
name: {
|
||||||
|
focus: true,
|
||||||
title: '收货人',
|
title: '收货人',
|
||||||
placeholder: '名字'
|
placeholder: '名字'
|
||||||
},
|
},
|
||||||
|
@ -59,6 +59,7 @@ Page(extend({}, Field, {
|
|||||||
| type | 输入框的类型,可选值为 input, textarea | String | input | |
|
| type | 输入框的类型,可选值为 input, textarea | String | input | |
|
||||||
| inputType | 输入框为 input 情况下,输入框的类型,例如:number, text, password | String | text | |
|
| inputType | 输入框为 input 情况下,输入框的类型,例如:number, text, password | String | text | |
|
||||||
| placeholder | 输入框为空时占位符 | String | | |
|
| placeholder | 输入框为空时占位符 | String | | |
|
||||||
|
| focus | 自动聚焦,拉起键盘 | Boolean | false | |
|
||||||
| mode | 输入框展示样式,可选值为 wrapped, normal | String | normal | |
|
| mode | 输入框展示样式,可选值为 wrapped, normal | String | normal | |
|
||||||
| right | 输入框内容是否居右显示 | Boolean | false | |
|
| right | 输入框内容是否居右显示 | Boolean | false | |
|
||||||
| error | 是否显示为输入框错误情况下的样式 | Boolean | false | |
|
| error | 是否显示为输入框错误情况下的样式 | Boolean | false | |
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
auto-height
|
auto-height
|
||||||
name="{{ name || componentId || '' }}"
|
name="{{ name || componentId || '' }}"
|
||||||
value="{{ value }}"
|
value="{{ value }}"
|
||||||
|
focus="{{ focus }}"
|
||||||
placeholder="{{ placeholder }}"
|
placeholder="{{ placeholder }}"
|
||||||
class="zan-field__input zan-cell__bd {{ right ? 'zan-field__input--right' : '' }}"
|
class="zan-field__input zan-cell__bd {{ right ? 'zan-field__input--right' : '' }}"
|
||||||
placeholder-class="zan-field__placeholder"
|
placeholder-class="zan-field__placeholder"
|
||||||
@ -20,6 +21,7 @@
|
|||||||
type="{{ inputType || 'text' }}"
|
type="{{ inputType || 'text' }}"
|
||||||
name="{{ name || componentId || '' }}"
|
name="{{ name || componentId || '' }}"
|
||||||
value="{{ value }}"
|
value="{{ value }}"
|
||||||
|
focus="{{ focus }}"
|
||||||
placeholder="{{ placeholder }}"
|
placeholder="{{ placeholder }}"
|
||||||
class="zan-field__input zan-cell__bd {{ right ? 'zan-field__input--right' : '' }}"
|
class="zan-field__input zan-cell__bd {{ right ? 'zan-field__input--right' : '' }}"
|
||||||
placeholder-class="zan-field__placeholder"
|
placeholder-class="zan-field__placeholder"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user