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
<zan-cell
|
|
class="field-class zan-field {{ error ? 'zan-field--error' : '' }} {{ mode === 'wrapped' ? 'zan-field--wrapped' : '' }} {{ !showBorder ? 'zan-field--no-border' : '' }}"
|
|
cell-class="zan-cell--field"
|
|
>
|
|
<view
|
|
slot="icon"
|
|
wx:if="{{ title }}"
|
|
class="zan-cell__hd zan-field__title">
|
|
{{ title }}
|
|
</view>
|
|
<textarea
|
|
wx:if="{{ type === 'textarea' }}"
|
|
auto-height
|
|
disabled="{{ disabled }}"
|
|
focus="{{ focus }}"
|
|
value="{{ value }}"
|
|
placeholder="{{ placeholder }}"
|
|
maxlength="{{ maxlength }}"
|
|
class="zan-field__input zan-cell__bd {{ right ? 'zan-field__input--right' : '' }}"
|
|
placeholder-class="zan-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="zan-field__input zan-cell__bd {{ right ? 'zan-field__input--right' : '' }}"
|
|
placeholder-class="zan-field__placeholder"
|
|
bindinput="handleFieldChange"
|
|
bindfocus="handleFieldFocus"
|
|
bindblur="handleFieldBlur"
|
|
/>
|
|
</zan-cell>
|