ASEMiniProgram/dist/input/index.wxml

32 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2021-03-20 17:48:56 +00: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>