@tongziyang/uni-calendar-plugin
Version:
A comprehensive calendar plugin for uniapp with support for Gregorian and Lunar calendars, date selection, hotel booking, check-in functionality, and more.
234 lines (233 loc) • 7.5 kB
TypeScript
/// <reference types="shims-vue" />
import { PropType } from 'vue';
import { DateInfo } from '../types';
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
date: {
type: DateConstructor;
required: true;
};
selectedDate: {
type: DateConstructor;
default: null;
};
firstDayOfWeek: {
type: NumberConstructor;
default: number;
validator: (value: number) => boolean;
};
showLunar: {
type: BooleanConstructor;
default: boolean;
};
showHoliday: {
type: BooleanConstructor;
default: boolean;
};
showPrice: {
type: BooleanConstructor;
default: boolean;
};
priceData: {
type: PropType<Record<string, number>>;
default: () => {};
};
checkInData: {
type: PropType<Record<string, boolean>>;
default: () => {};
};
disabledDate: {
type: PropType<(date: Date) => boolean>;
default: null;
};
highlightWeekend: {
type: BooleanConstructor;
default: boolean;
};
allowClickOtherMonthDay: {
type: BooleanConstructor;
default: boolean;
};
}>, {
weekDays: import("vue").ComputedRef<string[]>;
dayInfo: import("vue").ComputedRef<DateInfo>;
getDayClass: (day: DateInfo) => string;
handleDayClick: (event: MouseEvent | DateInfo, dayInfo?: DateInfo) => void;
handleCheckIn: (date: Date) => void;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("day-click" | "check-in")[], "day-click" | "check-in", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
date: {
type: DateConstructor;
required: true;
};
selectedDate: {
type: DateConstructor;
default: null;
};
firstDayOfWeek: {
type: NumberConstructor;
default: number;
validator: (value: number) => boolean;
};
showLunar: {
type: BooleanConstructor;
default: boolean;
};
showHoliday: {
type: BooleanConstructor;
default: boolean;
};
showPrice: {
type: BooleanConstructor;
default: boolean;
};
priceData: {
type: PropType<Record<string, number>>;
default: () => {};
};
checkInData: {
type: PropType<Record<string, boolean>>;
default: () => {};
};
disabledDate: {
type: PropType<(date: Date) => boolean>;
default: null;
};
highlightWeekend: {
type: BooleanConstructor;
default: boolean;
};
allowClickOtherMonthDay: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{
"onDay-click"?: ((...args: any[]) => any) | undefined;
"onCheck-in"?: ((...args: any[]) => any) | undefined;
}>, {
showLunar: boolean;
showHoliday: boolean;
showPrice: boolean;
priceData: Record<string, number>;
checkInData: Record<string, boolean>;
firstDayOfWeek: number;
disabledDate: (date: Date) => boolean;
highlightWeekend: boolean;
selectedDate: Date;
allowClickOtherMonthDay: boolean;
}, {}, {
DayCell: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
day: {
type: PropType<DateInfo>;
required: true;
};
showLunar: {
type: BooleanConstructor;
default: boolean;
};
showPrice: {
type: BooleanConstructor;
default: boolean;
};
disabledDate: {
type: PropType<(date: Date) => boolean>;
default: () => null;
};
highlightWeekend: {
type: BooleanConstructor;
default: boolean;
};
}>, {
dayClass: import("vue").ComputedRef<{
'uni-calendar__day--not-current-month': boolean;
'uni-calendar__day--today': boolean;
'uni-calendar__day--selected': boolean;
'uni-calendar__day--in-range': boolean | undefined;
'uni-calendar__day--range-start': boolean | undefined;
'uni-calendar__day--range-end': boolean | undefined;
'uni-calendar__day--weekend': boolean | undefined;
'uni-calendar__day--holiday': boolean | undefined;
'uni-calendar__day--rest-day': boolean | undefined;
'uni-calendar__day--work-day': boolean | undefined;
'uni-calendar__day--checked-in': boolean | undefined;
'uni-calendar__day--disabled': boolean;
'uni-calendar__day--lunar-first-day': boolean;
'uni-calendar__day--solar-term': boolean | "" | undefined;
}>;
handleClick: (event: MouseEvent, day: DateInfo) => void;
handleTouchStart: (event: MouseEvent | TouchEvent) => void;
handleTouchEnd: (event: MouseEvent | TouchEvent) => void;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
'day-click': (event: MouseEvent, day: DateInfo) => true;
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
day: {
type: PropType<DateInfo>;
required: true;
};
showLunar: {
type: BooleanConstructor;
default: boolean;
};
showPrice: {
type: BooleanConstructor;
default: boolean;
};
disabledDate: {
type: PropType<(date: Date) => boolean>;
default: () => null;
};
highlightWeekend: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{
"onDay-click"?: ((event: MouseEvent, day: DateInfo) => any) | undefined;
}>, {
showLunar: boolean;
showPrice: boolean;
disabledDate: (date: Date) => boolean;
highlightWeekend: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
DayDetail: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
date: {
type: DateConstructor;
required: true;
};
dayInfo: {
type: PropType<DateInfo>;
required: true;
};
showLunar: {
type: BooleanConstructor;
default: boolean;
};
showPrice: {
type: BooleanConstructor;
default: boolean;
};
}>, {
formattedDate: import("vue").ComputedRef<string>;
handleCheckIn: () => void;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "check-in"[], "check-in", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
date: {
type: DateConstructor;
required: true;
};
dayInfo: {
type: PropType<DateInfo>;
required: true;
};
showLunar: {
type: BooleanConstructor;
default: boolean;
};
showPrice: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{
"onCheck-in"?: ((...args: any[]) => any) | undefined;
}>, {
showLunar: boolean;
showPrice: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;