75 lines
3.1 KiB
TypeScript
75 lines
3.1 KiB
TypeScript
/**
|
|
* 抽象组件在业务层根据EntityDict的重新声明
|
|
* by Xc 20230807
|
|
*/
|
|
import React from 'react';
|
|
import { EntityDict } from '../oak-app-domain';
|
|
import { ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, ListButtonProps, OakAbsAttrUpsertDef } from 'oak-frontend-base';
|
|
declare const FilterPanel: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
|
|
entity: T;
|
|
columns: ColumnProps<EntityDict, T>[];
|
|
}>) => React.ReactElement;
|
|
declare const List: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
|
|
entity: T;
|
|
extraActions: OakExtraActionProps[] | ((row: RowWithActions<EntityDict, T>) => OakExtraActionProps[]);
|
|
onAction: onActionFnDef;
|
|
disabledOp: boolean;
|
|
attributes: OakAbsAttrDef[];
|
|
data: RowWithActions<EntityDict, T>[];
|
|
loading: boolean;
|
|
tablePagination?: React.ReactNode;
|
|
rowSelection?: any;
|
|
hideHeader?: boolean | undefined;
|
|
disableSerialNumber?: boolean | undefined;
|
|
size?: "small" | "middle" | "large" | undefined;
|
|
scroll?: ({
|
|
x?: string | number | true | undefined;
|
|
y?: string | number | undefined;
|
|
} & {
|
|
scrollToFirstRowOnChange?: boolean | undefined;
|
|
}) | undefined;
|
|
empty?: React.ReactNode;
|
|
opWidth?: number | undefined;
|
|
ellipsis?: boolean | undefined;
|
|
}>) => React.ReactElement;
|
|
declare const ListPro: <T extends keyof EntityDict>(props: {
|
|
title?: any;
|
|
extraContent?: any;
|
|
hideDefaultButtons?: boolean | undefined;
|
|
buttonGroup?: ListButtonProps[] | undefined;
|
|
onReload?: (() => void) | undefined;
|
|
entity: T;
|
|
extraActions?: OakExtraActionProps[] | ((row: RowWithActions<EntityDict, T>) => OakExtraActionProps[]) | undefined;
|
|
onAction?: onActionFnDef | undefined;
|
|
disabledOp?: boolean | undefined;
|
|
attributes: OakAbsAttrDef[];
|
|
data: RowWithActions<EntityDict, T>[];
|
|
loading?: boolean | undefined;
|
|
tablePagination?: any;
|
|
rowSelection?: any;
|
|
disableSerialNumber?: boolean | undefined;
|
|
size?: "small" | "middle" | "large" | undefined;
|
|
scroll?: any;
|
|
empty?: any;
|
|
opWidth?: number | undefined;
|
|
oakPath?: string | undefined;
|
|
}) => React.ReactElement;
|
|
declare const Detail: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
|
|
column?: number | Record<Breakpoint, number> | undefined;
|
|
entity: T;
|
|
attributes: OakAbsAttrDef[];
|
|
data: Partial<EntityDict[T]["Schema"]>;
|
|
title?: string | undefined;
|
|
bordered?: boolean | undefined;
|
|
layout?: "horizontal" | "vertical" | undefined;
|
|
}>) => React.ReactElement;
|
|
declare const Upsert: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
|
|
helps: Record<string, string>;
|
|
entity: T;
|
|
attributes: OakAbsAttrUpsertDef<EntityDict, T, string | number>[];
|
|
data: EntityDict[T]["Schema"];
|
|
layout: "horizontal" | "vertical";
|
|
mode: "default" | "card";
|
|
}>) => React.ReactElement;
|
|
export { FilterPanel, List, ListPro, Detail, Upsert, ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, };
|