index.wxml 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. <view class="i-class i-cell i-input {{ error ? 'i-input-error' : '' }} {{ mode === 'wrapped' ? 'i-input-wrapped' : '' }}">
  2. <view wx:if="{{ title }}" class="i-cell-hd i-input-title">{{ title }}</view>
  3. <textarea
  4. wx:if="{{ type === 'textarea' }}"
  5. auto-height
  6. disabled="{{ disabled }}"
  7. focus="{{ autofocus }}"
  8. value="{{ value }}"
  9. placeholder="{{ placeholder }}"
  10. maxlength="{{ maxlength }}"
  11. class="i-input-input i-cell-bd {{ right ? 'i-input-input-right' : '' }}"
  12. placeholder-class="i-input-placeholder"
  13. bindinput="handleInputChange"
  14. bindfocus="handleInputFocus"
  15. bindblur="handleInputBlur"
  16. ></textarea>
  17. <input
  18. wx:else
  19. type="{{ type }}"
  20. disabled="{{ disabled }}"
  21. focus="{{ autofocus }}"
  22. value="{{ value }}"
  23. placeholder="{{ placeholder }}"
  24. maxlength="{{ maxlength }}"
  25. class="i-input-input i-cell-bd {{ right ? 'i-input-input-right' : '' }}"
  26. placeholder-class="i-input-placeholder"
  27. bindinput="handleInputChange"
  28. bindfocus="handleInputFocus"
  29. bindblur="handleInputBlur"
  30. />
  31. </view>