@fesjs/fes-design
Version:
fes-design for PC
32 lines (31 loc) • 1.41 kB
TypeScript
import { type Ref } from 'vue';
import { RANGE_POSITION, SELECTED_STATUS } from './const';
import type { Picker } from './pickerHandler';
import type { CalendarsProps } from './calendars.vue';
type RANGE_POSITION_VALUES = (typeof RANGE_POSITION)[keyof typeof RANGE_POSITION];
export declare const useSelectStatus: (props: CalendarsProps) => {
selectedStatus: Ref<SELECTED_STATUS, SELECTED_STATUS>;
selectedDay: (position: RANGE_POSITION_VALUES) => void;
lastSelectedPosition: Ref<RANGE_POSITION_VALUES, RANGE_POSITION_VALUES>;
};
export declare const useRange: ({ props, tempCurrentValue, innerDisabledDate, selectedStatus, lastSelectedPosition, picker, }: {
props: CalendarsProps;
tempCurrentValue: Ref<number[]>;
innerDisabledDate: (date: Date, format: string) => boolean | undefined;
selectedStatus: Ref<SELECTED_STATUS>;
lastSelectedPosition: Ref<RANGE_POSITION_VALUES>;
picker: Ref<Picker>;
}) => {
leftActiveDate?: undefined;
rightActiveDate?: undefined;
changeCurrentDate?: undefined;
rangeDisabledDate?: undefined;
resetActiveDate?: undefined;
} | {
leftActiveDate: Ref<number, number>;
rightActiveDate: Ref<number, number>;
changeCurrentDate: (timestamp: number, position: RANGE_POSITION_VALUES) => void;
rangeDisabledDate: (date: Date, format: string, flagDate?: Date) => boolean;
resetActiveDate: () => void;
};
export {};