import { Precision } from 'antd-mobile/es/components/date-picker/date-picker-utils'; import { PickerValue } from 'antd-mobile/es/components/picker-view'; export interface IDropDownDatePickerProps { /** * 默认值 */ defaultValue?: string | Array; /** * */ value: string | Array; /** * 三种模式,见demo示例 * range: 选范围 * custom: 带快捷方式的选范围 * 默认: 选单个时间 */ mode: string; /** * 日期控件类型 具体/区间 */ dateType?: 'specific' | 'section'; placeholder: string; disabled: boolean; tillNow?: boolean; onChange?: Function; /** * @default { value: '9999', label: '不限' } */ options?: Array<{ label: string; value: string; }>; precision?: 'day' | 'hour' | 'minute'; } export interface DropDownDatePickerState { /** 表单值 */ value?: string | Array; defaultValue?: string | Array; /** * 日期控件类型 具体/区间 */ dateType?: 'specific' | 'section'; placeholder?: string; disabled?: boolean; open?: boolean; min: Date; max: Date; precision: Precision; tillNow?: boolean; curValue?: PickerValue[]; /** 复杂模式需要 */ type?: string; /** 区间选项第x个 */ activeIndex: number; /** * @default { value: '9999', label: '不限' } */ options: Array<{ label: string; value: string; }>; hideRangePicker?: boolean; }