index.wxml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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="{{ internalPlaceholderStyle }}"
  12. placeholder-class="{{ placeholderClass }}"
  13. disabled="{{ disabled || readOnly }}"
  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. hold-keyboard="{{ holdKeyboard }}"
  25. disable-default-padding="{{ disableDefaultPadding }}"
  26. confirm-type="{{ confirmType }}"
  27. confirm-hold="{{ confirmHold }}"
  28. bindlinechange="onLineChange"
  29. bindinput="onChange"
  30. bindfocus="onFocus"
  31. bindblur="onBlur"
  32. bindconfirm="onConfirm"
  33. bindkeyboardheightchange="onKeyboardHeightChange"
  34. style="{{ inputRows > 1 && !!inputHeight ? 'height: ' + inputHeight + 'px' : '' }}"
  35. >
  36. <keyboard-accessory class="{{ classes.keyboardAccessory }}" style="max-height: 200px;">
  37. <slot name="keyboard-accessory"></slot>
  38. </keyboard-accessory>
  39. </textarea>
  40. </view>
  41. <view class="{{ classes.clear }}" bindtap="onClear" wx:if="{{ clear && !disabled && inputValue && inputValue.length > 0 }}">
  42. <icon type="clear" color="#B2B2B2" size="14" />
  43. </view>
  44. <view class="{{ classes.error }}" bindtap="onError" wx:if="{{ error }}">
  45. <icon type="warn" color="#ef473a" size="14" />
  46. </view>
  47. <view class="{{ classes.extra }}" wx:if="{{ extra }}">{{ extra }}</view>
  48. <block wx:else>
  49. <slot name="footer"></slot>
  50. </block>
  51. <view class="{{ classes.count }}" wx:if="{{ hasCount }}">
  52. <text class="{{ classes.current }}">{{ inputValue ? inputValue.length : 0 }}</text>/{{ maxlength === -1 ? '∞' : maxlength }}
  53. </view>
  54. </view>