mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
<van-cell
|
|
class="field-class van-field {{ error ? 'van-field--error' : '' }} {{ mode === 'wrapped' ? 'van-field--wrapped' : '' }} {{ !showBorder ? 'van-field--no-border' : '' }}"
|
|
cell-class="van-cell--field"
|
|
>
|
|
<view
|
|
slot="icon"
|
|
wx:if="{{ title }}"
|
|
class="van-cell__hd van-field__title">
|
|
{{ title }}
|
|
</view>
|
|
<textarea
|
|
wx:if="{{ type === 'textarea' }}"
|
|
auto-height
|
|
disabled="{{ disabled }}"
|
|
focus="{{ focus }}"
|
|
value="{{ value }}"
|
|
placeholder="{{ placeholder }}"
|
|
maxlength="{{ maxlength }}"
|
|
class="van-field__input van-cell__bd {{ right ? 'van-field__input--right' : '' }}"
|
|
placeholder-class="van-field__placeholder"
|
|
bindinput="handleFieldChange"
|
|
bindfocus="handleFieldFocus"
|
|
bindblur="handleFieldBlur"
|
|
></textarea>
|
|
<input
|
|
wx:else
|
|
type="{{ inputType || 'text' }}"
|
|
disabled="{{ disabled }}"
|
|
focus="{{ focus }}"
|
|
value="{{ value }}"
|
|
placeholder="{{ placeholder }}"
|
|
maxlength="{{ maxlength }}"
|
|
class="van-field__input van-cell__bd {{ right ? 'van-field__input--right' : '' }}"
|
|
placeholder-class="van-field__placeholder"
|
|
bindinput="handleFieldChange"
|
|
bindfocus="handleFieldFocus"
|
|
bindblur="handleFieldBlur"
|
|
/>
|
|
</van-cell>
|