mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-09-06 16:09:44 +08:00
field 组件支持 disabled 属性 (#150)
This commit is contained in:
parent
e9dd67e614
commit
86dd3eeea0
@ -16,6 +16,11 @@ module.exports = {
|
|||||||
title: '详细地址',
|
title: '详细地址',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
placeholder: '请输入详细地址'
|
placeholder: '请输入详细地址'
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
title: '用户信息',
|
||||||
|
disabled: true,
|
||||||
|
value: '输入框已禁用'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 无标题输入框
|
// 无标题输入框
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
<template
|
<template
|
||||||
is="zan-field"
|
is="zan-field"
|
||||||
data="{{ ...config.base.address }}"></template>
|
data="{{ ...config.base.address }}"></template>
|
||||||
|
<template
|
||||||
|
is="zan-field"
|
||||||
|
data="{{ ...config.base.disabled }}"></template>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="zan-btns">
|
<view class="zan-btns">
|
||||||
|
@ -60,6 +60,7 @@ Page(extend({}, Field, {
|
|||||||
| inputType | 输入框为 input 情况下,输入框的类型,例如:number, text, password | String | text | |
|
| inputType | 输入框为 input 情况下,输入框的类型,例如:number, text, password | String | text | |
|
||||||
| placeholder | 输入框为空时占位符 | String | | |
|
| placeholder | 输入框为空时占位符 | String | | |
|
||||||
| focus | 自动聚焦,拉起键盘 | Boolean | false | |
|
| focus | 自动聚焦,拉起键盘 | Boolean | false | |
|
||||||
|
| disabled | 输入框是否禁用 | Boolean | false | |
|
||||||
| mode | 输入框展示样式,可选值为 wrapped, normal | String | normal | |
|
| mode | 输入框展示样式,可选值为 wrapped, normal | String | normal | |
|
||||||
| right | 输入框内容是否居右显示 | Boolean | false | |
|
| right | 输入框内容是否居右显示 | Boolean | false | |
|
||||||
| error | 是否显示为输入框错误情况下的样式 | Boolean | false | |
|
| error | 是否显示为输入框错误情况下的样式 | Boolean | false | |
|
||||||
|
@ -7,8 +7,9 @@
|
|||||||
wx:if="{{ type === 'textarea' }}"
|
wx:if="{{ type === 'textarea' }}"
|
||||||
auto-height
|
auto-height
|
||||||
name="{{ name || componentId || '' }}"
|
name="{{ name || componentId || '' }}"
|
||||||
value="{{ value }}"
|
disabled="{{ disabled }}"
|
||||||
focus="{{ focus }}"
|
focus="{{ focus }}"
|
||||||
|
value="{{ value }}"
|
||||||
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,8 +21,9 @@
|
|||||||
wx:else
|
wx:else
|
||||||
type="{{ inputType || 'text' }}"
|
type="{{ inputType || 'text' }}"
|
||||||
name="{{ name || componentId || '' }}"
|
name="{{ name || componentId || '' }}"
|
||||||
value="{{ value }}"
|
disabled="{{ disabled }}"
|
||||||
focus="{{ focus }}"
|
focus="{{ focus }}"
|
||||||
|
value="{{ value }}"
|
||||||
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