@cloudtower/eagle 0.29.4 → 0.29.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ export interface ITableSkeletonProps {
3
+ /**
4
+ * rows 默认为 undefined,此情况下组件会根据表格的高度和单项高度计算列数量。
5
+ * 在自动计算的 row 不符合需求时,可以自定义骨架屏 rows 的数量。
6
+ */
7
+ rows?: number;
8
+ /**
9
+ * 在表格加入了 scrollY 属性以后,表格的结构会发生变化。
10
+ * 获取表格高度的选择器有所区别,需要外部将此信息传入。
11
+ */
12
+ scrollY?: boolean;
13
+ /**
14
+ * 默认值骨架屏表头部分高度为 48 px
15
+ * 当存在默认高度不符合实际需求时,可以通过 headerHeight 设置表头处的骨架高度
16
+ */
17
+ headerHeight?: number;
18
+ /**
19
+ * 骨架屏单项高度默认为动态计算
20
+ * 当存在计算错误时,可以通过 itemHeight 设置单项的骨架高度
21
+ */
22
+ itemHeight?: number;
23
+ }
24
+ export declare const TableSkeleton: (props: ITableSkeletonProps) => React.JSX.Element;
@@ -1,4 +1,8 @@
1
1
  import React from "react";
2
+ /**
3
+ * @deprecated
4
+ * use TableSkeleton instead
5
+ */
2
6
  export declare const TableLoading: React.FC;
3
7
  export declare const KitTableContext: React.Context<{
4
8
  onClearSearchButtonEffect?: ((base: string) => void) | undefined;
@@ -7,4 +7,5 @@ declare const Table: <T extends {
7
7
  export default Table;
8
8
  export * from "./common";
9
9
  export * from "./table.type";
10
+ export * from "./TableSkeleton";
10
11
  export * from "./TableWidget";
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { ColumnsType, ColumnType, TableProps as AntdTableProps } from "antd/lib/table";
3
3
  import { TableRowSelection } from "antd/lib/table/interface";
4
+ import { ITableSkeletonProps } from "./TableSkeleton";
4
5
  interface IdObject {
5
6
  id: string;
6
7
  }
@@ -69,5 +70,6 @@ export interface TableProps<T extends {
69
70
  pageSize: number;
70
71
  };
71
72
  onRow?: AntdTableProps<T>["onRow"];
73
+ skeletonProps?: Omit<ITableSkeletonProps, "scrollY">;
72
74
  }
73
75
  export {};
@@ -15,6 +15,10 @@ type Story = StoryObj<typeof Table>;
15
15
  * 显示表格数据
16
16
  */
17
17
  export declare const ShowData: Story;
18
+ /**
19
+ * 自定义骨架屏表头,表身高度
20
+ */
21
+ export declare const CustomHeight: Story;
18
22
  /**
19
23
  * 在 loading error dataSource 存在值的情况下
20
24
  *