zent
Version:
一套前端设计语言和基于React的实现
44 lines (43 loc) • 1.72 kB
TypeScript
import { Component } from 'react';
import { IDisabledContext } from '../disabled';
import { CascaderTabsClickHandler, CascaderValue, ICascaderChangeMeta, ICascaderBaseProps, IPublicCascaderItem } from './types';
import { Forest } from './forest';
export interface ITabsCascaderProps extends ICascaderBaseProps {
value?: CascaderValue[];
onChange: (value: CascaderValue[], selectedOptions: IPublicCascaderItem[], meta: ICascaderChangeMeta) => void;
loadOptions?: (selectedOptions: IPublicCascaderItem[]) => Promise<void>;
title?: string[];
changeOnSelect?: boolean;
}
interface ITabsCascaderState {
options: Forest;
activeValue: CascaderValue[];
activeTab: number;
visible: boolean;
prevProps: ITabsCascaderProps;
loadingLevel: number | null;
}
export declare class TabsCascader extends Component<ITabsCascaderProps, ITabsCascaderState> {
static defaultProps: {
value: any[];
options: any[];
changeOnSelect: boolean;
renderValue: (path: import("./types").ICascaderItem[]) => string;
clearable: boolean;
title: any[];
};
constructor(props: ITabsCascaderProps);
static contextType: import("react").Context<IDisabledContext>;
context: IDisabledContext;
static getDerivedStateFromProps(props: ITabsCascaderProps, state: ITabsCascaderState): Partial<ITabsCascaderState>;
get disabled(): boolean;
isControlled(): boolean;
getVisible(): boolean;
setVisible(visible: boolean): void;
onVisibleChange: (visible: boolean) => void;
onTabsChange: (activeId: number) => void;
onClick: CascaderTabsClickHandler;
onClear: () => void;
render(): JSX.Element;
}
export default TabsCascader;