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.

73 lines
2.0 KiB

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