diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index 17360af12..8f1e0761d 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -3,22 +3,26 @@ import UiPageNations from "./uiPageNations"; interface UiTableProps { - headName: string; - publicReuseFacility: any[]; - headlist: { id: string; title: string; }[]; + headName: React.ReactNode|undefined; + publicReuseFacility: { [key: string]: string | number | boolean }[]; + headlist: UiHeadProps[]; pageSize: number; total: number; children: React.ReactNode|undefined; } -export function UiTable(UiTableProps: UiTableProps) { - const { publicReuseFacility, headlist,pageSize , total, children,headName} = UiTableProps; - const cur = 1; +interface UiHeadProps{ + id:string; + title:string; + +} +export function UiTable({ publicReuseFacility, headlist,pageSize , total, children,headName}: UiTableProps) { + const cur = 1; return ( <> -

{headName}

+ {headName?headName:<>} {children? <>{children}: @@ -29,7 +33,7 @@ export function UiTable(UiTableProps: UiTableProps) { - {publicReuseFacility.map((el: any,index) => ( + {publicReuseFacility.map((el: { [key: string]: string | number | boolean },index) => ( {headlist.map((head) => ( {el[head.id]}