time-select.mjs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. import { buildProps, definePropType } from "../../../utils/vue/props/runtime.mjs";
  2. import { useSizeProp } from "../../../hooks/use-size/index.mjs";
  3. import { useEmptyValuesProps } from "../../../hooks/use-empty-values/index.mjs";
  4. import { CircleClose, Clock } from "@element-plus/icons-vue";
  5. //#region ../../packages/components/time-select/src/time-select.ts
  6. const DEFAULT_START = "09:00";
  7. const DEFAULT_END = "18:00";
  8. const DEFAULT_STEP = "00:30";
  9. /**
  10. * @deprecated Removed after 3.0.0, Use `TimeSelectProps` instead.
  11. */
  12. const timeSelectProps = buildProps({
  13. /**
  14. * @description set format of time
  15. */
  16. format: {
  17. type: String,
  18. default: "HH:mm"
  19. },
  20. /**
  21. * @description binding value
  22. */
  23. modelValue: { type: definePropType(String) },
  24. /**
  25. * @description whether TimeSelect is disabled
  26. */
  27. disabled: {
  28. type: Boolean,
  29. default: void 0
  30. },
  31. /**
  32. * @description whether the input is editable
  33. */
  34. editable: {
  35. type: Boolean,
  36. default: true
  37. },
  38. /**
  39. * @description Tooltip theme, built-in theme: `dark` / `light`
  40. */
  41. effect: {
  42. type: definePropType(String),
  43. default: "light"
  44. },
  45. /**
  46. * @description whether to show clear button
  47. */
  48. clearable: {
  49. type: Boolean,
  50. default: true
  51. },
  52. /**
  53. * @description size of Input
  54. */
  55. size: useSizeProp,
  56. /**
  57. * @description placeholder in non-range mode
  58. */
  59. placeholder: String,
  60. /**
  61. * @description start time
  62. */
  63. start: {
  64. type: String,
  65. default: DEFAULT_START
  66. },
  67. /**
  68. * @description end time
  69. */
  70. end: {
  71. type: String,
  72. default: DEFAULT_END
  73. },
  74. /**
  75. * @description time step
  76. */
  77. step: {
  78. type: String,
  79. default: DEFAULT_STEP
  80. },
  81. /**
  82. * @description minimum time, any time before this time will be disabled
  83. */
  84. minTime: { type: definePropType(String) },
  85. /**
  86. * @description maximum time, any time after this time will be disabled
  87. */
  88. maxTime: { type: definePropType(String) },
  89. /**
  90. * @description whether `end` is included in options
  91. */
  92. includeEndTime: Boolean,
  93. /**
  94. * @description same as `name` in native input
  95. */
  96. name: String,
  97. /**
  98. * @description custom prefix icon component
  99. */
  100. prefixIcon: {
  101. type: definePropType([String, Object]),
  102. default: () => Clock
  103. },
  104. /**
  105. * @description custom clear icon component
  106. */
  107. clearIcon: {
  108. type: definePropType([String, Object]),
  109. default: () => CircleClose
  110. },
  111. /**
  112. * @description custom class name for TimeSelect's dropdown
  113. */
  114. popperClass: {
  115. type: definePropType([
  116. String,
  117. Array,
  118. Object,
  119. Boolean
  120. ]),
  121. default: ""
  122. },
  123. /**
  124. * @description custom style for TimeSelect's dropdown
  125. */
  126. popperStyle: {
  127. type: definePropType([
  128. String,
  129. Array,
  130. Object,
  131. Boolean
  132. ]),
  133. default: void 0
  134. },
  135. ...useEmptyValuesProps
  136. });
  137. //#endregion
  138. export { DEFAULT_END, DEFAULT_START, DEFAULT_STEP, timeSelectProps };
  139. //# sourceMappingURL=time-select.mjs.map