UNPKG

jamis

Version:

一种支持通过JSON配置方式生成页面的组件库

26 lines (25 loc) 1.09 kB
/** * @description 多选输入框 */ import React from 'react'; import type { Option, Options } from 'jamis-core'; import type { BaseSelectionProps, ItemRenderStates } from '../types'; declare function itemRender(option: Option, states: ItemRenderStates): JSX.Element; export declare class BaseSelection<T extends BaseSelectionProps = BaseSelectionProps, S = any> extends React.Component<T, S> { static itemRender: typeof itemRender; static defaultProps: { placeholder: string; itemRender: typeof itemRender; multiple: boolean; clearable: boolean; }; static value2array(value: any, options: Options, option2value?: (option: Option) => any): Options; static resolveSelected(value: any, options: Options, option2value?: (option: Option) => any): Option | null; intersectArray(arr1: undefined | Array<Option>, arr2: undefined | Array<Option>): Array<Option>; toggleOption(option: Option): void; toggleAll(): void; render(): JSX.Element; } export declare class Selection extends BaseSelection { } export default Selection;