index.wxml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <view class="wux-class wux-class-flex {{ classes.wrap }}">
  2. <view class="{{ classes.form }}">
  3. <view class="{{ classes.box }}" wx:if="{{ showCancel || inputFocus || (inputValue && inputValue.length > 0) }}">
  4. <icon class="{{ classes.search }}" type="search" color="#B2B2B2" size="14" />
  5. <input
  6. type="text"
  7. class="{{ classes.input }}"
  8. value="{{ inputValue }}"
  9. placeholder="{{ placeholder }}"
  10. placeholder-style="{{ extStyle }}"
  11. placeholder-class="{{ placeholderClass }}"
  12. disabled="{{ disabled }}"
  13. maxlength="{{ maxlength }}"
  14. cursor-spacing="{{ cursorSpacing }}"
  15. focus="{{ inputFocus }}"
  16. confirm-type="{{ confirmType }}"
  17. confirm-hold="{{ confirmHold }}"
  18. cursor="{{ cursor }}"
  19. selection-start="{{ selectionStart }}"
  20. selection-end="{{ selectionEnd }}"
  21. adjust-position="{{ adjustPosition }}"
  22. bindinput="onChange"
  23. bindfocus="onFocus"
  24. bindblur="onBlur"
  25. bindconfirm="onConfirm"
  26. />
  27. <icon class="{{ classes.clear }}" type="clear" color="#B2B2B2" size="14" wx:if="{{ clear && !disabled && inputValue && inputValue.length > 0 }}" bindtap="onClear" />
  28. </view>
  29. <label class="{{ classes.label }}" wx:if="{{ !inputFocus && !inputValue }}" bindtap="onClick">
  30. <icon class="{{ classes.icon }}" type="search" color="#B2B2B2" size="14" />
  31. <text class="{{ classes.text }}">{{ placeholder }}</text>
  32. </label>
  33. </view>
  34. <view class="{{ classes.cancel }}" wx:if="{{ showCancel || inputFocus || (inputValue && inputValue.length > 0) }}" bindtap="onCancel">{{ cancelText }}</view>
  35. </view>