UNPKG

@alauda-fe/common

Version:

Alauda frontend team common codes.

37 lines (36 loc) 1.01 kB
import { Dayjs } from 'dayjs'; export interface DateRangePickerModel { label: string; start: () => Dayjs; end: () => Dayjs; } /** * @description 除非显示的将 Options.timePicker 置为 false, 否则默认表示 timePicker 为 true (即展示日期范围选择) */ export interface Options { timeRange?: PickerTimeRange[]; maxDate?: Dayjs | ((startDate: Dayjs) => Dayjs); minDate?: Dayjs | ((startDate: Dayjs) => Dayjs); startDate?: Dayjs; endDate?: Dayjs; cancelRange?: boolean; widthAdaptive?: boolean; locale?: DatePickerLocale; timePicker?: boolean; showCustom?: boolean; } export interface PickerTimeRange { label: string; display?: string; displayCtx?: any; diff?: `${number}${DiffTimeUnit}`; start?: () => Dayjs; end?: () => Dayjs; step?: number; } export interface DatePickerLocale { format: string; separator: string; firstDay: number; } export type DiffTimeUnit = 'ms' | '' | 's' | 'm' | 'h' | 'd' | 'w';