You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.3 KiB
36 lines
1.3 KiB
2 years ago
|
<template name="zan-field">
|
||
|
<view class="zan-cell zan-field {{ error ? 'zan-field--error' : '' }} {{ mode === 'wrapped' ? 'zan-field--wrapped' : '' }}">
|
||
|
<view
|
||
|
wx:if="{{ title }}"
|
||
|
class="zan-cell__hd zan-field__title">{{ title }}</view>
|
||
|
<textarea
|
||
|
wx:if="{{ type === 'textarea' }}"
|
||
|
auto-height
|
||
|
name="{{ name || componentId || '' }}"
|
||
|
disabled="{{ disabled }}"
|
||
|
focus="{{ focus }}"
|
||
|
value="{{ value }}"
|
||
|
placeholder="{{ placeholder }}"
|
||
|
class="zan-field__input zan-cell__bd {{ right ? 'zan-field__input--right' : '' }}"
|
||
|
placeholder-class="zan-field__placeholder"
|
||
|
bindinput="_handleZanFieldChange"
|
||
|
bindfocus="_handleZanFieldFocus"
|
||
|
bindblur="_handleZanFieldBlur"
|
||
|
data-component-id="{{ componentId || '' }}"></textarea>
|
||
|
<input
|
||
|
wx:else
|
||
|
type="{{ inputType || 'text' }}"
|
||
|
name="{{ name || componentId || '' }}"
|
||
|
disabled="{{ disabled }}"
|
||
|
focus="{{ focus }}"
|
||
|
value="{{ value }}"
|
||
|
placeholder="{{ placeholder }}"
|
||
|
class="zan-field__input zan-cell__bd {{ right ? 'zan-field__input--right' : '' }}"
|
||
|
placeholder-class="zan-field__placeholder"
|
||
|
bindinput="_handleZanFieldChange"
|
||
|
bindfocus="_handleZanFieldFocus"
|
||
|
bindblur="_handleZanFieldBlur"
|
||
|
data-component-id="{{ componentId || '' }}"/>
|
||
|
</view>
|
||
|
</template>
|