import React from 'react'; import { componentType } from '.'; import { CCMSConfig, PageListItem } from '../../main'; export interface ColumnConfig extends componentType { field: string; label: string; align: 'left' | 'center' | 'right'; defaultValue?: string; style?: { color?: string; fontSize?: number; prefix?: string; postfix?: string; customStyle?: object; }; } /** * 表格项项子类需实现的方法 * - get: 表格项获取展示值 */ export interface IColumn { getValue: () => T; } export interface ColumnProps { ref: (instance: Column | null) => void; record: { [field: string]: any; }; value: V; data: any[]; step: { [field: string]: any; }; config: T; table?: React.ReactNode; baseRoute: string; onUnmount: (reload?: boolean, data?: any) => Promise; checkPageAuth: (pageID: any) => Promise; loadPageURL: (pageID: any) => Promise; loadPageConfig: (pageID: any) => Promise; handlePageRedirect?: (path: string, replaceHistory: boolean) => void; loadPageFrameURL: (pageID: any) => Promise; loadPageList: () => Promise>; loadDomain: (domain: string) => Promise; } interface ColumnState { } export default class Column extends React.Component, ColumnState & S> implements IColumn { constructor(props: ColumnProps); static defaultProps: { config: {}; }; getValue: () => V; renderComponent: (props: E) => JSX.Element; render(): JSX.Element; } export {};