index.axml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <view
  2. class="ant-input {{ disabled ? 'ant-input-disabled' : '' }} {{ className ? className : '' }} {{ selfFocus ? (focusClassName ? focusClassName : '') : '' }}"
  3. style="{{ style || '' }};{{ focusStyle || '' }}">
  4. <view class="ant-input-prefix">
  5. <slot name="prefix">{{ prefix }}</slot>
  6. </view>
  7. <view class="ant-input-line">
  8. <input
  9. enableNative="{{ enableNative }}"
  10. name="{{ name }}"
  11. class="ant-input-content"
  12. disabled="{{ disabled }}"
  13. value="{{ state.value }}"
  14. type="{{ type }}"
  15. password="{{ password }}"
  16. placeholder="{{ placeholder }}"
  17. placeholder-class="ant-input-placeholder {{ placeholderClassName ? placeholderClassName : '' }}"
  18. placeholder-style="{{ placeholderStyle ? placeholderStyle : '' }}"
  19. maxlength="{{ maxLength }}"
  20. focus="{{ focus }}"
  21. confirm-type="{{ confirmType }}"
  22. confirm-hold="{{ confirmHold }}"
  23. always-system="{{ alwaysSystem }}"
  24. controlled="{{ state.controlled }}"
  25. cursor="{{ cursor }}"
  26. selection-start="{{ selectionStart }}"
  27. selection-end="{{ selectionEnd }}"
  28. random-number="{{ randomNumber }}"
  29. onInput="onChange"
  30. onConfirm="onConfirm"
  31. onFocus="onFocus"
  32. onBlur="onBlur" />
  33. <view
  34. a:if="{{ allowClear }}"
  35. class="ant-input-clear {{ state.value && state.value.length > 0 ? 'ant-input-clear-show' : 'ant-input-clear-hidden' }}"
  36. onTap="onClear">
  37. <icon
  38. className="ant-input-clear-icon"
  39. type="CloseCircleFill" />
  40. </view>
  41. </view>
  42. <view class="ant-input-suffix">
  43. <slot name="suffix">{{ suffix }}</slot>
  44. </view>
  45. </view>