xzs-mysql/source/wx/xzs-student/component/iView/input/index.wxml

32 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2020-09-02 08:44:41 +08:00
<view class="i-class i-cell i-input {{ error ? 'i-input-error' : '' }} {{ mode === 'wrapped' ? 'i-input-wrapped' : '' }}">
<view wx:if="{{ title }}" class="i-cell-hd i-input-title">{{ title }}</view>
<textarea
wx:if="{{ type === 'textarea' }}"
auto-height
disabled="{{ disabled }}"
focus="{{ autofocus }}"
value="{{ value }}"
placeholder="{{ placeholder }}"
maxlength="{{ maxlength }}"
class="i-input-input i-cell-bd {{ right ? 'i-input-input-right' : '' }}"
placeholder-class="i-input-placeholder"
bindinput="handleInputChange"
bindfocus="handleInputFocus"
bindblur="handleInputBlur"
></textarea>
<input
wx:else
type="{{ type }}"
disabled="{{ disabled }}"
focus="{{ autofocus }}"
value="{{ value }}"
placeholder="{{ placeholder }}"
maxlength="{{ maxlength }}"
class="i-input-input i-cell-bd {{ right ? 'i-input-input-right' : '' }}"
placeholder-class="i-input-placeholder"
bindinput="handleInputChange"
bindfocus="handleInputFocus"
bindblur="handleInputBlur"
/>
</view>