DatePicker.d.ts 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. import { type PropType, type ExtractPropTypes } from 'vue';
  2. export type DatePickerColumnType = 'year' | 'month' | 'day';
  3. export declare const datePickerProps: {
  4. loading: BooleanConstructor;
  5. readonly: BooleanConstructor;
  6. allowHtml: BooleanConstructor;
  7. optionHeight: {
  8. type: (NumberConstructor | StringConstructor)[];
  9. default: number;
  10. };
  11. showToolbar: {
  12. type: BooleanConstructor;
  13. default: true;
  14. };
  15. swipeDuration: {
  16. type: (NumberConstructor | StringConstructor)[];
  17. default: number;
  18. };
  19. visibleOptionNum: {
  20. type: (NumberConstructor | StringConstructor)[];
  21. default: number;
  22. };
  23. } & {
  24. title: StringConstructor;
  25. cancelButtonText: StringConstructor;
  26. confirmButtonText: StringConstructor;
  27. } & {
  28. modelValue: {
  29. type: PropType<string[]>;
  30. default: () => never[];
  31. };
  32. filter: PropType<(columnType: string, options: import("../picker").PickerOption[]) => import("../picker").PickerOption[]>;
  33. formatter: {
  34. type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
  35. default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
  36. };
  37. } & {
  38. columnsType: {
  39. type: PropType<DatePickerColumnType[]>;
  40. default: () => string[];
  41. };
  42. minDate: {
  43. type: DateConstructor;
  44. default: () => Date;
  45. validator: (val: unknown) => val is Date;
  46. };
  47. maxDate: {
  48. type: DateConstructor;
  49. default: () => Date;
  50. validator: (val: unknown) => val is Date;
  51. };
  52. };
  53. export type DatePickerProps = ExtractPropTypes<typeof datePickerProps>;
  54. declare const _default: import("vue").DefineComponent<{
  55. loading: BooleanConstructor;
  56. readonly: BooleanConstructor;
  57. allowHtml: BooleanConstructor;
  58. optionHeight: {
  59. type: (NumberConstructor | StringConstructor)[];
  60. default: number;
  61. };
  62. showToolbar: {
  63. type: BooleanConstructor;
  64. default: true;
  65. };
  66. swipeDuration: {
  67. type: (NumberConstructor | StringConstructor)[];
  68. default: number;
  69. };
  70. visibleOptionNum: {
  71. type: (NumberConstructor | StringConstructor)[];
  72. default: number;
  73. };
  74. } & {
  75. title: StringConstructor;
  76. cancelButtonText: StringConstructor;
  77. confirmButtonText: StringConstructor;
  78. } & {
  79. modelValue: {
  80. type: PropType<string[]>;
  81. default: () => never[];
  82. };
  83. filter: PropType<(columnType: string, options: import("../picker").PickerOption[]) => import("../picker").PickerOption[]>;
  84. formatter: {
  85. type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
  86. default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
  87. };
  88. } & {
  89. columnsType: {
  90. type: PropType<DatePickerColumnType[]>;
  91. default: () => string[];
  92. };
  93. minDate: {
  94. type: DateConstructor;
  95. default: () => Date;
  96. validator: (val: unknown) => val is Date;
  97. };
  98. maxDate: {
  99. type: DateConstructor;
  100. default: () => Date;
  101. validator: (val: unknown) => val is Date;
  102. };
  103. }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "confirm")[], "update:modelValue" | "cancel" | "change" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
  104. loading: BooleanConstructor;
  105. readonly: BooleanConstructor;
  106. allowHtml: BooleanConstructor;
  107. optionHeight: {
  108. type: (NumberConstructor | StringConstructor)[];
  109. default: number;
  110. };
  111. showToolbar: {
  112. type: BooleanConstructor;
  113. default: true;
  114. };
  115. swipeDuration: {
  116. type: (NumberConstructor | StringConstructor)[];
  117. default: number;
  118. };
  119. visibleOptionNum: {
  120. type: (NumberConstructor | StringConstructor)[];
  121. default: number;
  122. };
  123. } & {
  124. title: StringConstructor;
  125. cancelButtonText: StringConstructor;
  126. confirmButtonText: StringConstructor;
  127. } & {
  128. modelValue: {
  129. type: PropType<string[]>;
  130. default: () => never[];
  131. };
  132. filter: PropType<(columnType: string, options: import("../picker").PickerOption[]) => import("../picker").PickerOption[]>;
  133. formatter: {
  134. type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
  135. default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
  136. };
  137. } & {
  138. columnsType: {
  139. type: PropType<DatePickerColumnType[]>;
  140. default: () => string[];
  141. };
  142. minDate: {
  143. type: DateConstructor;
  144. default: () => Date;
  145. validator: (val: unknown) => val is Date;
  146. };
  147. maxDate: {
  148. type: DateConstructor;
  149. default: () => Date;
  150. validator: (val: unknown) => val is Date;
  151. };
  152. }>> & {
  153. onChange?: ((...args: any[]) => any) | undefined;
  154. "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
  155. onCancel?: ((...args: any[]) => any) | undefined;
  156. onConfirm?: ((...args: any[]) => any) | undefined;
  157. }, {
  158. formatter: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
  159. modelValue: string[];
  160. readonly: boolean;
  161. loading: boolean;
  162. allowHtml: boolean;
  163. optionHeight: string | number;
  164. showToolbar: boolean;
  165. swipeDuration: string | number;
  166. visibleOptionNum: string | number;
  167. minDate: Date;
  168. maxDate: Date;
  169. columnsType: DatePickerColumnType[];
  170. }>;
  171. export default _default;