mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
新增 maxlength (#203)
This commit is contained in:
parent
77f8e724b5
commit
7c057d95f5
@ -15,7 +15,7 @@ module.exports = {
|
|||||||
address: {
|
address: {
|
||||||
title: '详细地址',
|
title: '详细地址',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
placeholder: '请输入详细地址'
|
placeholder: '请输入详细地址(最多50字)'
|
||||||
},
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
title: '用户信息',
|
title: '用户信息',
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
title="{{ config.base.address.title }}"
|
title="{{ config.base.address.title }}"
|
||||||
type="{{ config.base.address.type }}"
|
type="{{ config.base.address.type }}"
|
||||||
placeholder="{{ config.base.address.placeholder }}"
|
placeholder="{{ config.base.address.placeholder }}"
|
||||||
|
maxlength="50"
|
||||||
>
|
>
|
||||||
</zan-field>
|
</zan-field>
|
||||||
<zan-field
|
<zan-field
|
||||||
|
@ -91,6 +91,7 @@ Page(extend({}, {
|
|||||||
| 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 | | |
|
||||||
|
| maxlength | 最大输入长度,设置为 -1 的时候不限制最大长度 | Number | 140 | |
|
||||||
| focus | 自动聚焦,拉起键盘 | Boolean | false | |
|
| focus | 自动聚焦,拉起键盘 | Boolean | false | |
|
||||||
| disabled | 输入框是否禁用 | Boolean | false | |
|
| disabled | 输入框是否禁用 | Boolean | false | |
|
||||||
| mode | 输入框展示样式,可选值为 wrapped, normal | String | normal | |
|
| mode | 输入框展示样式,可选值为 wrapped, normal | String | normal | |
|
||||||
|
@ -20,7 +20,11 @@ Component({
|
|||||||
value: 'normal'
|
value: 'normal'
|
||||||
},
|
},
|
||||||
right: Boolean,
|
right: Boolean,
|
||||||
error: Boolean
|
error: Boolean,
|
||||||
|
maxlength: {
|
||||||
|
type: Number,
|
||||||
|
value: 140
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
focus="{{ focus }}"
|
focus="{{ focus }}"
|
||||||
value="{{ value }}"
|
value="{{ value }}"
|
||||||
placeholder="{{ placeholder }}"
|
placeholder="{{ placeholder }}"
|
||||||
|
maxlength="{{ maxlength }}"
|
||||||
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"
|
||||||
bindinput="handleZanFieldChange"
|
bindinput="handleZanFieldChange"
|
||||||
@ -26,6 +27,7 @@
|
|||||||
focus="{{ focus }}"
|
focus="{{ focus }}"
|
||||||
value="{{ value }}"
|
value="{{ value }}"
|
||||||
placeholder="{{ placeholder }}"
|
placeholder="{{ placeholder }}"
|
||||||
|
maxlength="{{ maxlength }}"
|
||||||
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"
|
||||||
bindinput="handleZanFieldChange"
|
bindinput="handleZanFieldChange"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user