chore: get start from deploying

This commit is contained in:
jialin
2025-02-24 11:34:40 +08:00
parent 1dd7037aa0
commit bcbefe29e7
11 changed files with 214 additions and 26 deletions
@@ -9,11 +9,21 @@ interface HeaderPrefixProps {
onSelectAll?: (e: any) => void;
indeterminate?: boolean;
selectAll?: boolean;
hasColumns?: boolean;
}
const HeaderPrefix: React.FC<HeaderPrefixProps> = (props) => {
const { expandable, enableSelection, onSelectAll, indeterminate, selectAll } =
props;
const {
hasColumns,
expandable,
enableSelection,
onSelectAll,
indeterminate,
selectAll
} = props;
if (!hasColumns) {
return null;
}
if (expandable && enableSelection) {
return (
<div className="header-row-prefix-wrapper">
@@ -18,6 +18,7 @@ interface TableBodyProps {
loadChildren?: any;
loadChildrenAPI?: any;
onCell?: any;
empty?: React.ReactNode;
}
const TableBody: React.FC<TableBodyProps> = ({
@@ -34,12 +35,13 @@ const TableBody: React.FC<TableBodyProps> = ({
loadChildren,
loadChildrenAPI,
columns,
onCell
onCell,
empty
}) => {
if (!dataSource.length) {
return (
<div className="empty-wrapper">
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
{empty || <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />}
</div>
);
}
+3
View File
@@ -26,6 +26,7 @@ const SealTable: React.FC<SealTableProps & { pagination: PaginationProps }> = (
watchChildren,
rowSelection,
pagination,
empty,
renderChildren,
loadChildren,
loadChildrenAPI
@@ -116,11 +117,13 @@ const SealTable: React.FC<SealTableProps & { pagination: PaginationProps }> = (
onSelectAll={handleSelectAllChange}
expandable={expandable}
enableSelection={rowSelection?.enableSelection}
hasColumns={parsedColumns.length > 0}
></HeaderPrefix>
<Header onSort={onSort} columns={parsedColumns}></Header>
</div>
<Spin spinning={loading}>
<TableBody
empty={empty}
dataSource={props.dataSource}
columns={parsedColumns}
rowSelection={rowSelection}