@ucloud-pccl/react-components
Version:
UCloud pccl react components
31 lines (30 loc) • 981 B
TypeScript
import React from 'react';
import { Moment } from 'moment';
import { TDate } from '@z-r/calendar/types/interface';
import { Rules } from './utils';
import LOCALE from './locale/zh_CN';
interface CalendarProps {
/** 当前值,受控 */
value?: TDate | null;
/** 默认值,非受控 */
defaultValue?: TDate | null;
/**
* @deprecated 使用 onChange 来替换
*/
onSelect?: (t: Moment) => void;
/** 选中变化回调 */
onChange?: (t: Moment) => void;
/** 自定义规则 */
rules?: Rules;
/** 自定义样式 */
customStyle?: {
/**
* 外层阴影,为 false 时隐藏
*/
boxShadow?: boolean;
};
/** @ignore */
locale?: typeof LOCALE;
}
declare const _default: React.MemoExoticComponent<({ onSelect, onChange, rules, locale: _locale, ...rest }: CalendarProps & Omit<React.HTMLAttributes<HTMLDivElement>, keyof CalendarProps>) => React.JSX.Element>;
export default _default;