index.wxml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <view class="wux-class {{ classes.wrap }}">
  2. <view class="{{ classes.label }}" wx:if="{{ label }}">{{ label }}</view>
  3. <block wx:else>
  4. <slot></slot>
  5. </block>
  6. <view class="{{ classes.control }}">
  7. <textarea
  8. class="{{ classes.item }}"
  9. value="{{ inputValue }}"
  10. placeholder="{{ placeholder }}"
  11. placeholder-style="{{ extStyle }}"
  12. placeholder-class="{{ placeholderClass }}"
  13. disabled="{{ disabled }}"
  14. maxlength="{{ maxlength }}"
  15. auto-height="{{ autoHeight }}"
  16. fixed="{{ fixed }}"
  17. cursor-spacing="{{ cursorSpacing }}"
  18. focus="{{ focus }}"
  19. cursor="{{ cursor }}"
  20. show-confirm-bar="{{ showConfirmBar }}"
  21. selection-start="{{ selectionStart }}"
  22. selection-end="{{ selectionEnd }}"
  23. adjust-position="{{ adjustPosition }}"
  24. bindlinechange="onLineChange"
  25. bindinput="onChange"
  26. bindfocus="onFocus"
  27. bindblur="onBlur"
  28. bindconfirm="onConfirm"
  29. style="{{ inputRows > 1 && !!inputHeight ? 'height: ' + inputHeight + 'px' : '' }}"
  30. />
  31. </view>
  32. <view class="{{ classes.clear }}" bindtap="onClear" wx:if="{{ clear && !disabled && inputValue && inputValue.length > 0 }}">
  33. <icon type="clear" color="#B2B2B2" size="14" />
  34. </view>
  35. <view class="{{ classes.error }}" bindtap="onError" wx:if="{{ error }}">
  36. <icon type="warn" color="#ef473a" size="14" />
  37. </view>
  38. <view class="{{ classes.extra }}" wx:if="{{ extra }}">{{ extra }}</view>
  39. <block wx:else>
  40. <slot name="footer"></slot>
  41. </block>
  42. <view class="{{ classes.count }}" wx:if="{{ hasCount }}">
  43. <text class="{{ classes.current }}">{{ inputValue.length }}</text>/{{ maxlength === -1 ? '∞' : maxlength }}
  44. </view>
  45. </view>