UNPKG

react-admin-kit

Version:

A react based UI components for admin system

69 lines (68 loc) 3.49 kB
import { Component, MutableRefObject } from 'react'; import type { InnerRefType, MyProTableType } from './types'; import { ProTableContext } from '../SettingProvider/context'; import './styles.css'; /** * 表单类型的映射 */ export declare const FORM_TYPE_MAP: { new: string; edit: string; read: string; }; declare class ProTable extends Component<MyProTableType, any> { private targetId; private selfInnerRef; private selfActionRef; private baseInnerObj; static contextType: any; context: React.ContextType<typeof ProTableContext>; constructor(props: any); componentDidMount(): void; componentWillUnmount(): void; tableReload: () => void; getInnerRef: () => MutableRefObject<InnerRefType>; getTitle: () => string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode>; getModalTitle: () => string; /** * 增强列功能 * 1. 给 option 列增加 innerRef * 2. option 列的 renderDom 包裹 Space 组件 * @param cols * @returns cols */ patchColumn: ($cols: any) => any; enableDelete: ($cols: any) => any; getRowSelection: () => false | (import("antd/es/table/interface").TableRowSelection<any> & { alwaysShowAlert?: boolean | undefined; }) | { selectedRowKeys: any; onChange: (keys: any, selectedRows: any) => void; preserveSelectedRowKeys?: boolean | undefined; type?: import("antd/es/table/interface").RowSelectionType | undefined; defaultSelectedRowKeys?: import("react").Key[] | undefined; getCheckboxProps?: ((record: any) => Partial<Omit<import("antd").CheckboxProps, "defaultChecked" | "checked">>) | undefined; onSelect?: import("antd/es/table/interface").SelectionSelectFn<any> | undefined; onSelectMultiple?: ((selected: boolean, selectedRows: any[], changeRows: any[]) => void) | undefined; onSelectAll?: ((selected: boolean, selectedRows: any[], changeRows: any[]) => void) | undefined; onSelectInvert?: ((selectedRowKeys: import("react").Key[]) => void) | undefined; onSelectNone?: (() => void) | undefined; selections?: boolean | import("antd/es/table/hooks/useSelection").INTERNAL_SELECTION_ITEM[] | undefined; hideSelectAll?: boolean | undefined; fixed?: import("rc-table/lib/interface").FixedType | undefined; columnWidth?: string | number | undefined; columnTitle?: import("react").ReactNode | ((checkboxNode: import("react").ReactNode) => import("react").ReactNode); checkStrictly?: boolean | undefined; renderCell?: ((value: boolean, record: any, index: number, originNode: import("react").ReactNode) => import("react").ReactNode | import("rc-table/lib/interface").RenderedCell<any>) | undefined; onCell?: import("rc-table/lib/interface").GetComponentProps<any> | undefined; alwaysShowAlert?: boolean | undefined; } | undefined; handleDelete: (selectedIds: (string | number)[], record: Record<string, any>, callback?: any) => void; tableAlertOptionRender: ({ selectedRowKeys: _selectedRowKeys, onCleanSelected, }: { selectedRowKeys: any; onCleanSelected: any; }) => import("react/jsx-runtime").JSX.Element; selfOnOpen: (formType: any, formRef: any, formData: any) => void; render(): import("react/jsx-runtime").JSX.Element; } export default ProTable;