input.wxml 1.0 KB

123456789101112131415161718192021222324252627282930
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <input
  3. id="{{ name }}"
  4. class="{{ utils.bem('field__control', [inputAlign, { disabled, error }]) }} input-class"
  5. type="{{ type }}"
  6. focus="{{ focus }}"
  7. cursor="{{ cursor }}"
  8. value="{{ innerValue }}"
  9. auto-focus="{{ autoFocus }}"
  10. disabled="{{ disabled || readonly }}"
  11. maxlength="{{ maxlength }}"
  12. placeholder="{{ placeholder }}"
  13. placeholder-style="{{ placeholderStyle }}"
  14. placeholder-class="{{ utils.bem('field__placeholder', { error }) }}"
  15. confirm-type="{{ confirmType }}"
  16. confirm-hold="{{ confirmHold }}"
  17. hold-keyboard="{{ holdKeyboard }}"
  18. cursor-spacing="{{ cursorSpacing }}"
  19. adjust-position="{{ adjustPosition }}"
  20. selection-end="{{ selectionEnd }}"
  21. selection-start="{{ selectionStart }}"
  22. always-embed="{{ alwaysEmbed }}"
  23. password="{{ password || type === 'password' }}"
  24. bindinput="onInput"
  25. bindtap="onClickInput"
  26. bindblur="onBlur"
  27. bindfocus="onFocus"
  28. bindconfirm="onConfirm"
  29. bindkeyboardheightchange="onKeyboardHeightChange"
  30. />