张敏 a0dcec4dc5 [refactor] Field & Stepper 自定义组件改造 (#168)
* [refactor] Field & Stepper 自定义组件改造

* Field & Stepper remove componentId
2018-03-28 15:10:35 +08:00

36 lines
1.1 KiB
Plaintext

<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 || '' }}"
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">
</textarea>
<input
wx:else
type="{{ inputType || 'text' }}"
name="{{ name || '' }}"
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"
/>
</view>