UNPKG

linkmore-design

Version:

🌈 🚀lm组件库。🚀

126 lines (125 loc) 3.46 kB
/// <reference types="react" /> /** 模糊搜索配置参数 */ export interface SearchConfigProps { relation: string; fieldType: string; operator: string; } export interface LocalizationProps { customFilter: any; basicFilter: any; globalQuery: any; filterQuery: any; } /** 值的关系枚举 */ export declare enum OperatorEnum { /** 等于 */ 'equal' = 0, /** 不等于 */ 'not_equal' = 1, /** 包含 */ 'contains' = 2, /** 不包含 */ 'not_contains' = 3, /** 介于 */ 'between' = 4, /** 大于 */ 'greater_than' = 5, /** 大于等于 */ 'greater_than_or_equal' = 6, /** 小于 */ 'less_than' = 7, /** 小于等于 */ 'less_than_or_equal' = 8, /** 开头 */ 'starts_with' = 9, /** 结束 */ 'ends_with' = 10 } /** 自定义筛选选项 */ export declare type CustomOptionsProps = { label: string; value: string | number; relation?: string; data: { field: string; value: string; operator: keyof typeof OperatorEnum; }[]; default?: boolean; }; export declare type ComplexFilterProps = { /** 数据源 */ dataSource?: Record<string, any>[]; /** 是否启用模糊查询 @default true */ enableSearch?: boolean; /** 是否启用基础筛选 @default true */ enableBaisc?: boolean; /** 是否启用高级筛选 @default false */ enableComplex?: boolean; /** 是否启用自定义筛选 @default false */ enableCustom?: boolean; /** 自定义筛选选项 */ customOptions?: CustomOptionsProps[]; /** 默认展示不限自定义筛选选项 @default true */ enableLimitedPlaceholder?: boolean; /** 是否展示一件清空 @default true */ enableClear?: boolean; /** 是否自动将筛选结构值转换为字符串 @default true */ enableAutoString?: boolean; /** 尺寸 @default middle */ size?: string; /** 搜索的key值 @default search */ searchKey?: string; /** 搜索占位符 */ placeholder?: string; /** 模糊搜索配置 */ searchConfig?: Partial<SearchConfigProps>; /** 自定义一级筛选Dom */ customRender?: React.ReactDOM | React.FC | React.ReactNode | null; /** 本地缓存 */ localization?: Partial<LocalizationProps>; ref?: any; /** 筛选改变事件 */ onChange?: (x?: Record<string, any>) => any; [x: string]: any; }; export interface InstanceProps { state: any; dispatch: any; [x: string]: any; } export interface ComponentProps { instance: Partial<InstanceProps>; item?: any; options?: any; } export interface reducerActionProps extends Record<string, any> { changeSearchFilter: any; changeSearchQuery: any; changeBasicFilter: any; changeBasicQuery: any; reset: any; [x: string]: any; } export declare type ControlProps = { type: string; field?: string; title?: string; colon?: string | boolean; value?: any; onChange?: (val?: any, item?: Record<string, any>) => void; options?: any[]; locale: any; showSearch?: boolean; showAllChecked?: boolean; visible?: boolean; onCancel?: () => void; dateType?: string; placeholder?: string; popupClassName?: string; popupRender?: (props: Record<string, any>) => React.ReactNode; componentProps?: Record<string, any>; fieldNames?: Record<string, any>; [x: string]: any; };