import { Dayjs } from 'dayjs/esm'; /** 显示模式 */ export declare enum CalendarViewMode { /** 单周 */ WEEK = "week", /** 双周 */ BIWEEK = "biweek", /** 月 */ MONTH = "month" } export interface DateItem { date: Dayjs; isCurrentMonth: boolean; isToday: boolean; dateString: string; isBefore: boolean; /** 是否为空占位格子 */ isEmpty?: boolean; } export interface IndicatorConfig { /** 指示点颜色 */ color?: string; /** 指示点大小 */ size?: number; /** 指示点位置 */ position?: 'bottom-center' | 'bottom-right' | 'top-right' | 'top-left' | 'bottom-left'; /** 自定义样式 */ style?: Record; } export interface CalendarOptions { /** 主题颜色 */ themeColor?: string; /** 选中色使用渐变色 */ useGradient?: boolean; /** 是否显示今天高亮 */ showToday?: boolean; /** 是否可以选择日期 */ selectable?: boolean; /** 是否支持滚轮切换月份 */ mouseWheel?: boolean; /** 是否显示展开/收起按钮 */ expandButton?: boolean; /** 是否填充前后月份的日期 */ fillOtherMonth?: boolean; /** 切换日期后是否自动收起日历 */ autoCollapse?: boolean; /** 切换月份后是否自动展开日历 */ autoExpand?: boolean; /** 是否将过去日期置灰显示 */ grayPastDates?: boolean; /** 鼠标滚轮灵敏度,越低越灵敏,最小为0 */ wheelThreshold?: number; /** 自定义日期单元格类名函数 */ cellClass?: (dateItem: DateItem) => string | string[]; /** 自定义日期单元格内容渲染函数 */ cellContent?: (dateItem: DateItem) => string; /** 指示点判断函数 */ hasIndicator?: (dateString: string) => boolean; /** 指示点配置 */ indicatorConfig?: IndicatorConfig; /** 可用的视图模式数组 */ modes?: CalendarViewMode[]; /** 默认视图模式 */ defaultMode?: CalendarViewMode; /** 显示月份切换工具栏 */ monthSwitchTool?: boolean; /** 显示视图切换工具 */ modeSwitchTool?: boolean; /** 显示工具栏 */ toolbar?: boolean; /** 显示背景月份 */ showBgMonth?: boolean; } export declare enum CalendarType { /** 默认 */ DEFAULT = "default", /** 小日历 */ SMALL = "small" } export interface CalendarContext { type?: CalendarType; /** 日历配置选项 */ options: Required; /** 选中的日期 */ selectedDate: Dayjs; /** 当前显示的月份 */ currentMonth: Dayjs; /** 当前视图模式 */ viewMode: CalendarViewMode; } export type { HCalendarProps, HCalendarEmits } from '../index.vue';