jamis
Version:
一种支持通过JSON配置方式生成页面的组件库
41 lines (40 loc) • 1.6 kB
TypeScript
import moment from 'moment';
import React from 'react';
import type { CustomDaysViewProps, DateType, PickerOption, TimeConstraints, TimeScale } from '../../types';
declare class CustomDaysView extends React.Component<CustomDaysViewProps> {
timeConstraints: Required<TimeConstraints>;
state: {
columns: {
options: PickerOption[];
}[];
types: DateType[];
pickerValue: number[];
uniqueTag: any;
};
constructor(props: CustomDaysViewProps);
componentDidMount(): void;
componentDidUpdate(prevProps: Readonly<CustomDaysViewProps>): void;
updateSelectedDate: (event: React.MouseEvent<any>) => void;
setTime: (type: "hours" | "minutes" | "seconds" | "milliseconds", value: number) => void;
scrollToTop: (type: "hours" | "minutes" | "seconds" | "milliseconds", value: number, i: number, label?: string) => void;
confirm: () => void;
cancel: () => void | undefined;
alwaysValidDate(): number;
renderDay: (props: any, currentDate: moment.Moment) => JSX.Element;
/** 时间选择器数据源 */
computedTimeOptions(timeScale: TimeScale): {
label: string;
value: string;
}[];
renderDays(): React.DetailedReactHTMLElement<{
key: string;
className: string;
}, HTMLElement>[];
renderTimes: () => JSX.Element;
renderFooter: () => JSX.Element | null;
onPickerConfirm: (value: number[]) => void;
onPickerChange: (value: number[], index: number) => void;
renderPicker: () => JSX.Element;
render(): JSX.Element;
}
export default CustomDaysView;