You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.0 KiB

9 months ago
  1. <template>
  2. <uvInput
  3. :value="value"
  4. :type="type"
  5. :fixed="fixed"
  6. :disabled="disabled"
  7. :disabledColor="disabledColor"
  8. :clearable="clearable"
  9. :password="password"
  10. :maxlength="maxlength"
  11. :placeholder="placeholder"
  12. :placeholderClass="placeholderClass"
  13. :placeholderStyle="placeholderStyle"
  14. :showWordLimit="showWordLimit"
  15. :confirmType="confirmType"
  16. :confirmHold="confirmHold"
  17. :holdKeyboard="holdKeyboard"
  18. :focus="focus"
  19. :autoBlur="autoBlur"
  20. :disableDefaultPadding="disableDefaultPadding"
  21. :cursor="cursor"
  22. :cursorSpacing="cursorSpacing"
  23. :selectionStart="selectionStart"
  24. :selectionEnd="selectionEnd"
  25. :adjustPosition="adjustPosition"
  26. :inputAlign="inputAlign"
  27. :fontSize="fontSize"
  28. :color="color"
  29. :prefixIcon="prefixIcon"
  30. :suffixIcon="suffixIcon"
  31. :suffixIconStyle="suffixIconStyle"
  32. :prefixIconStyle="prefixIconStyle"
  33. :border="border"
  34. :readonly="readonly"
  35. :shape="shape"
  36. :customStyle="customStyle"
  37. :formatter="formatter"
  38. :ignoreCompositionEvent="ignoreCompositionEvent"
  39. @focus="$emit('focus')"
  40. @blur="e => $emit('blur', e)"
  41. @keyboardheightchange="$emit('keyboardheightchange')"
  42. @change="e => $emit('change', e)"
  43. @input="e => $emit('input', e)"
  44. @confirm="e => $emit('confirm', e)"
  45. @clear="$emit('clear')"
  46. @click="$emit('click')"
  47. >
  48. <!-- #ifdef MP -->
  49. <slot name="prefix"></slot>
  50. <slot name="suffix"></slot>
  51. <!-- #endif -->
  52. <!-- #ifndef MP -->
  53. <slot name="prefix" slot="prefix"></slot>
  54. <slot name="suffix" slot="suffix"></slot>
  55. <!-- #endif -->
  56. </uvInput>
  57. </template>
  58. <script>
  59. /**
  60. * 此组件存在的理由是在nvue下u-input被uni-app官方占用了u-input在nvue中相当于input组件
  61. * 所以在nvue下取名为u--input内部其实还是u-input.vue只不过做一层中转
  62. */
  63. import uvInput from '../u-input/u-input.vue';
  64. import props from '../u-input/props.js'
  65. export default {
  66. name: 'u--input',
  67. mixins: [uni.$u.mpMixin, props, uni.$u.mixin],
  68. components: {
  69. uvInput
  70. },
  71. }
  72. </script>