@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.
251 lines (250 loc) • 7.72 kB
TypeScript
/// <reference types="shims-vue" />
import { PropType } from 'vue';
import { DateInfo } from '../types';
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
year: {
type: NumberConstructor;
required: true;
};
month: {
type: NumberConstructor;
required: true;
};
selectedDate: {
type: DateConstructor;
default: null;
};
rangeStart: {
type: DateConstructor;
default: null;
};
rangeEnd: {
type: DateConstructor;
default: null;
};
firstDayOfWeek: {
type: PropType<0 | 1>;
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;
};
rangeMode: {
type: BooleanConstructor;
default: boolean;
};
allowClickOtherMonthDay: {
type: BooleanConstructor;
default: boolean;
};
}>, {
monthDays: import("vue").ComputedRef<DateInfo[]>;
getDayClass: (day: DateInfo) => string;
handleDayClick: (event: MouseEvent | DateInfo, dayInfo?: DateInfo) => void;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
'day-click': (event: MouseEvent, day: DateInfo) => true;
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
year: {
type: NumberConstructor;
required: true;
};
month: {
type: NumberConstructor;
required: true;
};
selectedDate: {
type: DateConstructor;
default: null;
};
rangeStart: {
type: DateConstructor;
default: null;
};
rangeEnd: {
type: DateConstructor;
default: null;
};
firstDayOfWeek: {
type: PropType<0 | 1>;
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;
};
rangeMode: {
type: BooleanConstructor;
default: boolean;
};
allowClickOtherMonthDay: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{
"onDay-click"?: ((event: MouseEvent, day: DateInfo) => any) | undefined;
}>, {
showLunar: boolean;
showHoliday: boolean;
showPrice: boolean;
priceData: Record<string, number>;
checkInData: Record<string, boolean>;
rangeMode: boolean;
firstDayOfWeek: 0 | 1;
disabledDate: (date: Date) => boolean;
highlightWeekend: boolean;
selectedDate: Date;
rangeStart: Date;
rangeEnd: Date;
allowClickOtherMonthDay: boolean;
}, {}, {
WeekHeader: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
firstDayOfWeek: {
type: PropType<0 | 1>;
default: number;
validator: (value: number) => boolean;
};
abbreviated: {
type: BooleanConstructor;
default: boolean;
};
}>, {
weekDays: import("vue").ComputedRef<string[]>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
firstDayOfWeek: {
type: PropType<0 | 1>;
default: number;
validator: (value: number) => boolean;
};
abbreviated: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{}>, {
firstDayOfWeek: 0 | 1;
abbreviated: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
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>;
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;