|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import type { ExtractPropTypes, PropType } from 'vue'; |
|
|
|
|
import type { ExtractPropTypes } from 'vue'; |
|
|
|
|
import { defineComponent, ref } from 'vue'; |
|
|
|
|
import type { RangePickerTimeProps } from '../date-picker/generatePicker'; |
|
|
|
|
import generatePicker from '../date-picker/generatePicker'; |
|
|
|
@ -15,6 +15,7 @@ import devWarning from '../vc-util/devWarning';
|
|
|
|
|
import { useInjectFormItemContext } from '../form/FormItemContext'; |
|
|
|
|
import omit from '../_util/omit'; |
|
|
|
|
import type { InputStatus } from '../_util/statusUtils'; |
|
|
|
|
import { booleanType, stringType } from '../_util/type'; |
|
|
|
|
|
|
|
|
|
export interface TimePickerLocale { |
|
|
|
|
placeholder?: string; |
|
|
|
@ -23,17 +24,17 @@ export interface TimePickerLocale {
|
|
|
|
|
|
|
|
|
|
export const timePickerProps = () => ({ |
|
|
|
|
format: String, |
|
|
|
|
showNow: { type: Boolean, default: undefined }, |
|
|
|
|
showHour: { type: Boolean, default: undefined }, |
|
|
|
|
showMinute: { type: Boolean, default: undefined }, |
|
|
|
|
showSecond: { type: Boolean, default: undefined }, |
|
|
|
|
use12Hours: { type: Boolean, default: undefined }, |
|
|
|
|
showNow: booleanType(), |
|
|
|
|
showHour: booleanType(), |
|
|
|
|
showMinute: booleanType(), |
|
|
|
|
showSecond: booleanType(), |
|
|
|
|
use12Hours: booleanType(), |
|
|
|
|
hourStep: Number, |
|
|
|
|
minuteStep: Number, |
|
|
|
|
secondStep: Number, |
|
|
|
|
hideDisabledOptions: { type: Boolean, default: undefined }, |
|
|
|
|
hideDisabledOptions: booleanType(), |
|
|
|
|
popupClassName: String, |
|
|
|
|
status: String as PropType<InputStatus>, |
|
|
|
|
status: stringType<InputStatus>(), |
|
|
|
|
}); |
|
|
|
|
type CommonTimePickerProps = Partial<ExtractPropTypes<ReturnType<typeof timePickerProps>>>; |
|
|
|
|
export type TimeRangePickerProps<DateType> = Omit< |
|
|
|
|