@cloudtower/eagle 490.0.6 → 490.0.8
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.
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +2664 -2604
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +3077 -3074
- package/dist/src/core/SearchInput/SearchInput.type.d.ts +89 -18
- package/dist/src/core/Styled/index.d.ts +6 -0
- package/dist/src/core/Table/table.type.d.ts +160 -6
- package/dist/stories/docs/core/Table.stories.d.ts +32 -43
- package/dist/style.css +2664 -2604
- package/docs/core/SearchInput/guide.md +125 -0
- package/docs/core/Table/guide.md +199 -0
- package/docs/llms.txt +2 -2
- package/package.json +4 -4
|
@@ -1,78 +1,149 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { InputProps } from "antd/lib/input";
|
|
3
3
|
import { SrcType } from "../BaseIcon";
|
|
4
|
+
/**
|
|
5
|
+
* @description 搜索输入框组件,基于 Input 封装,提供防抖搜索、结果导航(上一个/下一个)和最近搜索历史功能。
|
|
6
|
+
* 支持受控和非受控两种模式,适用于表格内搜索、页面全局搜索等场景。
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* 基础搜索(带防抖):
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import React, { useState } from "react";
|
|
12
|
+
* import { SearchInput } from "@cloudtower/eagle";
|
|
13
|
+
*
|
|
14
|
+
* const App = () => {
|
|
15
|
+
* const [keyword, setKeyword] = useState("");
|
|
16
|
+
* return (
|
|
17
|
+
* <SearchInput
|
|
18
|
+
* debounceWait={300}
|
|
19
|
+
* onChange={(value) => setKeyword(value)}
|
|
20
|
+
* />
|
|
21
|
+
* );
|
|
22
|
+
* };
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* 带结果导航(显示匹配数和上下翻页):
|
|
27
|
+
* ```tsx
|
|
28
|
+
* import React from "react";
|
|
29
|
+
* import { SearchInput } from "@cloudtower/eagle";
|
|
30
|
+
*
|
|
31
|
+
* const App = () => (
|
|
32
|
+
* <SearchInput
|
|
33
|
+
* total={10}
|
|
34
|
+
* onChange={(value) => console.log("搜索:", value)}
|
|
35
|
+
* onSearchNext={(value, current) => console.log("下一个:", current)}
|
|
36
|
+
* onSearchPrev={(value, current) => console.log("上一个:", current)}
|
|
37
|
+
* />
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* 启用最近搜索历史:
|
|
43
|
+
* ```tsx
|
|
44
|
+
* import React from "react";
|
|
45
|
+
* import { SearchInput } from "@cloudtower/eagle";
|
|
46
|
+
*
|
|
47
|
+
* const App = () => (
|
|
48
|
+
* <SearchInput
|
|
49
|
+
* enableRecentSearch
|
|
50
|
+
* recentSearchLocalStorageKey="vm-search"
|
|
51
|
+
* maxRecentCount={5}
|
|
52
|
+
* onChange={(value) => console.log(value)}
|
|
53
|
+
* />
|
|
54
|
+
* );
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @see Input 基础输入框
|
|
58
|
+
* @see Cascader 级联选择器(内置了 SearchInput 作为搜索区域)
|
|
59
|
+
*/
|
|
4
60
|
export type SearchInputProps = Omit<InputProps, "value" | "onChange"> & {
|
|
5
61
|
/**
|
|
6
|
-
*
|
|
62
|
+
* 输入框的值,用于受控模式。
|
|
63
|
+
* 配置 value 时,需把 debounceWait 设置为 0,否则输入时会有卡顿的问题
|
|
7
64
|
*/
|
|
8
65
|
value?: InputProps["value"];
|
|
9
66
|
/**
|
|
10
|
-
*
|
|
67
|
+
* 防抖延迟时间,单位为毫秒。输入停止后延迟指定时间再触发 onChange
|
|
68
|
+
* @default 300
|
|
11
69
|
*/
|
|
12
70
|
debounceWait?: number;
|
|
13
71
|
/**
|
|
14
|
-
*
|
|
72
|
+
* 搜索结果的总数。设置后,当同时提供 onSearchNext 和 onSearchPrev 时,
|
|
73
|
+
* 输入框后缀区域将显示 "current/total" 计数器和上下翻页按钮
|
|
15
74
|
*/
|
|
16
75
|
total?: number;
|
|
17
76
|
/**
|
|
18
|
-
*
|
|
77
|
+
* 当前选中的结果索引(从 1 开始),可用于外部控制当前位置。
|
|
19
78
|
* 如果不提供,组件将内部管理此状态
|
|
20
79
|
*/
|
|
21
80
|
current?: number;
|
|
22
81
|
/**
|
|
23
|
-
*
|
|
82
|
+
* 点击"下一个"按钮或按下 Enter 键时的回调。
|
|
83
|
+
* 需同时提供 onSearchPrev 才会显示导航按钮
|
|
84
|
+
* @param value - 当前搜索关键词
|
|
85
|
+
* @param current - 导航后的结果索引
|
|
24
86
|
*/
|
|
25
87
|
onSearchNext?: (value: string, current: number) => void;
|
|
26
88
|
/**
|
|
27
|
-
*
|
|
89
|
+
* 点击"上一个"按钮时的回调。
|
|
90
|
+
* 需同时提供 onSearchNext 才会显示导航按钮
|
|
91
|
+
* @param value - 当前搜索关键词
|
|
92
|
+
* @param current - 导航后的结果索引
|
|
28
93
|
*/
|
|
29
94
|
onSearchPrev?: (value: string, current: number) => void;
|
|
30
95
|
/**
|
|
31
|
-
*
|
|
96
|
+
* 输入内容改变时的回调函数(经过防抖处理后触发)
|
|
97
|
+
* @param value - 当前输入的搜索关键词
|
|
32
98
|
*/
|
|
33
99
|
onChange: (value: string) => void;
|
|
34
100
|
/**
|
|
35
|
-
*
|
|
101
|
+
* 自定义搜索图标(输入框前缀),替换默认的放大镜图标
|
|
36
102
|
*/
|
|
37
103
|
searchIcon?: SrcType;
|
|
38
104
|
/**
|
|
39
|
-
*
|
|
105
|
+
* 自定义"上一个"按钮的默认态图标
|
|
40
106
|
*/
|
|
41
107
|
prefixIcon?: SrcType;
|
|
42
108
|
/**
|
|
43
|
-
* 上一个 hover
|
|
109
|
+
* 自定义"上一个"按钮的 hover 态图标
|
|
44
110
|
*/
|
|
45
111
|
prefixHoverIcon?: SrcType;
|
|
46
112
|
/**
|
|
47
|
-
*
|
|
113
|
+
* 自定义"下一个"按钮的默认态图标
|
|
48
114
|
*/
|
|
49
115
|
nextIcon?: SrcType;
|
|
50
116
|
/**
|
|
51
|
-
* 下一个 hover
|
|
117
|
+
* 自定义"下一个"按钮的 hover 态图标
|
|
52
118
|
*/
|
|
53
119
|
nextHoverIcon?: SrcType;
|
|
54
120
|
/**
|
|
55
|
-
*
|
|
121
|
+
* 自定义清空按钮的默认态图标
|
|
56
122
|
*/
|
|
57
123
|
clearIcon?: SrcType;
|
|
58
124
|
/**
|
|
59
|
-
*
|
|
125
|
+
* 自定义清空按钮的 hover 态图标
|
|
60
126
|
*/
|
|
61
127
|
clearHoverIcon?: SrcType;
|
|
62
128
|
/**
|
|
63
|
-
*
|
|
129
|
+
* 搜索框宽度
|
|
130
|
+
* @default 276
|
|
64
131
|
*/
|
|
65
132
|
width?: number | string;
|
|
66
133
|
/**
|
|
67
|
-
*
|
|
134
|
+
* 是否开启最近搜索功能。开启后,聚焦空输入框时会显示最近搜索记录的下拉菜单。
|
|
135
|
+
* 搜索记录通过 localStorage 持久化存储
|
|
136
|
+
* @default false
|
|
68
137
|
*/
|
|
69
138
|
enableRecentSearch?: boolean;
|
|
70
139
|
/**
|
|
71
|
-
*
|
|
140
|
+
* 最近搜索记录在 localStorage 中的存储键名。
|
|
141
|
+
* 开启 enableRecentSearch 时必须提供,不同业务场景应使用不同的 key 以隔离数据
|
|
72
142
|
*/
|
|
73
143
|
recentSearchLocalStorageKey?: string;
|
|
74
144
|
/**
|
|
75
|
-
*
|
|
145
|
+
* 最近搜索记录的最大展示条数
|
|
146
|
+
* @default 5
|
|
76
147
|
*/
|
|
77
148
|
maxRecentCount?: number;
|
|
78
149
|
};
|
|
@@ -19,6 +19,12 @@ export declare const TagSpan: import("@linaria/react").StyledComponent<import("r
|
|
|
19
19
|
export declare const FullView: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
20
20
|
export declare const NameTag: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
21
21
|
export declare const FormItemDiv: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
22
|
+
/**
|
|
23
|
+
* FieldTitle 组件
|
|
24
|
+
* 使用场景:用于表单字段的标题展示
|
|
25
|
+
* 使用地方:主要在 Modal 等表单容器中使用
|
|
26
|
+
* 注意:默认字体大小为 12px,可通过 --field-title-font-size CSS 变量覆盖
|
|
27
|
+
*/
|
|
22
28
|
export declare const FieldTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
23
29
|
export declare const ExpandArrow: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLElement> & import("react").HTMLAttributes<HTMLElement> & Record<never, unknown>>;
|
|
24
30
|
export declare const WarningAlert: import("@linaria/core").LinariaClassName;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { ColumnsType, ColumnType, TableProps as AntdTableProps } from "antd/lib/table";
|
|
3
3
|
import { TableRowSelection, ExpandableConfig } from "antd/lib/table/interface";
|
|
4
4
|
import { ITableSkeletonProps } from "./TableSkeleton";
|
|
@@ -12,39 +12,155 @@ type Columns<T> = ColumnsType<T>[0];
|
|
|
12
12
|
export interface RequiredColumnProps<T> extends Omit<Columns<T>, "onHeaderCell" | "onCell" | "title"> {
|
|
13
13
|
key: Exclude<Columns<T>["key"], undefined | number>;
|
|
14
14
|
dataIndex: Exclude<ColumnType<T>["dataIndex"], undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* 是否支持排序。设置为 true 时,点击表头可触发排序。
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
15
19
|
sortable?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 列宽度。支持数字(像素)或字符串(如 "20%")。
|
|
22
|
+
*/
|
|
16
23
|
width?: number | string;
|
|
17
24
|
onHeaderCell?: (column: ColumnType<T>) => any;
|
|
18
25
|
onCell?: (column: T) => any;
|
|
19
26
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* which cannot access the header params
|
|
27
|
+
* 列标题。支持 React 节点或返回 React 节点的函数。
|
|
28
|
+
* 注意:函数形式不接收参数,与 antd 原生 title 函数签名不同。
|
|
23
29
|
*/
|
|
24
30
|
title: React.ReactNode | (() => React.ReactNode);
|
|
31
|
+
/**
|
|
32
|
+
* 是否允许用户自定义该列。用于列配置功能。
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
25
35
|
customizable?: boolean;
|
|
26
36
|
}
|
|
27
37
|
export type SorterOrder = "descend" | "ascend" | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* 表格组件,基于 antd Table 二次封装,提供统一的 CloudTower 表格样式。
|
|
40
|
+
*
|
|
41
|
+
* @description
|
|
42
|
+
* 用于展示结构化数据列表,支持排序、行选择、展开行、加载状态、错误状态等功能。
|
|
43
|
+
* 数据源要求每条记录包含 id 字段作为唯一标识。
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* // 基础用法
|
|
47
|
+
* import { Table } from "@cloudtower/eagle";
|
|
48
|
+
*
|
|
49
|
+
* interface VMData {
|
|
50
|
+
* id: string;
|
|
51
|
+
* name: string;
|
|
52
|
+
* status: string;
|
|
53
|
+
* cpu: number;
|
|
54
|
+
* }
|
|
55
|
+
*
|
|
56
|
+
* const columns = [
|
|
57
|
+
* { key: "name", title: "名称", dataIndex: "name" },
|
|
58
|
+
* { key: "status", title: "状态", dataIndex: "status" },
|
|
59
|
+
* { key: "cpu", title: "CPU", dataIndex: "cpu" },
|
|
60
|
+
* ];
|
|
61
|
+
*
|
|
62
|
+
* <Table<VMData> columns={columns} dataSource={vms} />
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* // 带行选择
|
|
66
|
+
* import { Table } from "@cloudtower/eagle";
|
|
67
|
+
* import { useState } from "react";
|
|
68
|
+
*
|
|
69
|
+
* const [selectedKeys, setSelectedKeys] = useState<string[]>([]);
|
|
70
|
+
*
|
|
71
|
+
* <Table<VMData>
|
|
72
|
+
* columns={columns}
|
|
73
|
+
* dataSource={vms}
|
|
74
|
+
* rowSelection={{
|
|
75
|
+
* selectedRowKeys: selectedKeys,
|
|
76
|
+
* onChange: (keys) => setSelectedKeys(keys as string[]),
|
|
77
|
+
* }}
|
|
78
|
+
* />
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* // 带排序和加载状态
|
|
82
|
+
* import { Table } from "@cloudtower/eagle";
|
|
83
|
+
*
|
|
84
|
+
* <Table<VMData>
|
|
85
|
+
* columns={columns}
|
|
86
|
+
* dataSource={vms}
|
|
87
|
+
* loading={isLoading}
|
|
88
|
+
* onSorterChange={(order, key) => {
|
|
89
|
+
* console.log("排序:", order, key);
|
|
90
|
+
* }}
|
|
91
|
+
* />
|
|
92
|
+
*
|
|
93
|
+
* @see TableForm - 表格表单,用于行内编辑场景
|
|
94
|
+
* @see SummaryTable - 摘要表格,用于键值对信息展示
|
|
95
|
+
* @see BatchOperation - 批量操作工具栏,配合行选择使用
|
|
96
|
+
*/
|
|
28
97
|
export interface TableProps<T extends {
|
|
29
98
|
id: string;
|
|
30
99
|
}> {
|
|
100
|
+
/**
|
|
101
|
+
* 是否显示边框。
|
|
102
|
+
* @default false
|
|
103
|
+
*/
|
|
31
104
|
bordered?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* 是否显示加载状态。为 true 时显示骨架屏加载动画。
|
|
107
|
+
* @default false
|
|
108
|
+
*/
|
|
32
109
|
loading?: boolean;
|
|
33
110
|
/**
|
|
34
|
-
*
|
|
111
|
+
* 错误状态内容。传入后将覆盖 dataSource,显示错误信息而非数据。
|
|
35
112
|
*/
|
|
36
113
|
error?: React.ReactNode | string;
|
|
114
|
+
/**
|
|
115
|
+
* 数据源数组。每条记录必须包含 id 字段作为唯一标识。
|
|
116
|
+
*/
|
|
37
117
|
dataSource: T[] | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* 列配置数组。定义表格的列结构。
|
|
120
|
+
*/
|
|
38
121
|
columns: RequiredColumnProps<T>[];
|
|
122
|
+
/**
|
|
123
|
+
* 排序变化回调。当用户点击可排序列的表头时触发。
|
|
124
|
+
* @param order - 排序方向:"descend"(降序)、"ascend"(升序)、null(取消排序)
|
|
125
|
+
* @param key - 排序列的 key
|
|
126
|
+
*/
|
|
39
127
|
onSorterChange?: (order: SorterOrder | null, key?: string | number) => void;
|
|
128
|
+
/**
|
|
129
|
+
* 行点击回调。
|
|
130
|
+
* @deprecated 请使用 onRow 替代
|
|
131
|
+
* @param record - 点击行的数据记录
|
|
132
|
+
* @param index - 行索引
|
|
133
|
+
* @param evt - 鼠标事件
|
|
134
|
+
*/
|
|
40
135
|
onRowClick?: (record: T, index: number, evt: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
136
|
+
/**
|
|
137
|
+
* 行样式类名函数。根据行数据和索引返回自定义类名。
|
|
138
|
+
*/
|
|
41
139
|
rowClassName?: (record: T, index: number) => string;
|
|
140
|
+
/**
|
|
141
|
+
* 表格滚动配置。
|
|
142
|
+
* @example
|
|
143
|
+
* // 固定表头,内容区滚动
|
|
144
|
+
* scroll={{ y: 400 }}
|
|
145
|
+
* // 水平滚动
|
|
146
|
+
* scroll={{ x: 1200 }}
|
|
147
|
+
*/
|
|
42
148
|
scroll?: {
|
|
43
149
|
x?: number | string | true;
|
|
44
150
|
y?: number | string;
|
|
45
151
|
};
|
|
152
|
+
/**
|
|
153
|
+
* 列宽调整回调。启用 resizable 后,用户拖拽调整列宽时触发。
|
|
154
|
+
*/
|
|
46
155
|
onResize?: (column: RequiredColumnProps<T>[]) => void;
|
|
156
|
+
/**
|
|
157
|
+
* 是否允许调整列宽。
|
|
158
|
+
* @default false
|
|
159
|
+
*/
|
|
47
160
|
resizable?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* 自定义表格组件。用于覆盖默认的 table/thead/tbody 渲染。
|
|
163
|
+
*/
|
|
48
164
|
components?: {
|
|
49
165
|
table?: (props: any) => any;
|
|
50
166
|
header?: {
|
|
@@ -58,25 +174,63 @@ export interface TableProps<T extends {
|
|
|
58
174
|
cell?: (props: any) => any;
|
|
59
175
|
};
|
|
60
176
|
};
|
|
177
|
+
/**
|
|
178
|
+
* 行操作菜单组件。在每行末尾渲染操作按钮或菜单。
|
|
179
|
+
*/
|
|
61
180
|
RowMenu?: React.FC<{
|
|
62
181
|
record: T;
|
|
63
182
|
index: number;
|
|
64
183
|
}>;
|
|
184
|
+
/**
|
|
185
|
+
* 行选择配置。启用后显示复选框列,支持单选或多选。
|
|
186
|
+
* @see https://ant.design/components/table-cn#rowSelection
|
|
187
|
+
*/
|
|
65
188
|
rowSelection?: TableRowSelection<T>;
|
|
189
|
+
/**
|
|
190
|
+
* 空数据时的显示内容。
|
|
191
|
+
*/
|
|
66
192
|
empty?: string | React.ReactNode;
|
|
193
|
+
/**
|
|
194
|
+
* 表格布局方式。
|
|
195
|
+
* - "fixed":固定布局,列宽由第一行决定
|
|
196
|
+
* - "auto":自动布局,列宽由内容决定
|
|
197
|
+
* @default "fixed"
|
|
198
|
+
*/
|
|
67
199
|
tableLayout?: "fixed" | "auto";
|
|
68
200
|
/**
|
|
69
|
-
*
|
|
201
|
+
* 初始化加载状态。
|
|
202
|
+
* @deprecated 请使用 loading 替代
|
|
70
203
|
*/
|
|
71
204
|
initLoading?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* 行的唯一标识字段。支持字符串或函数。
|
|
207
|
+
* @default "id"
|
|
208
|
+
*/
|
|
72
209
|
rowKey?: AntdTableProps<T>["rowKey"];
|
|
210
|
+
/**
|
|
211
|
+
* 表格容器引用。用于获取表格尺寸信息。
|
|
212
|
+
*/
|
|
73
213
|
wrapper?: React.MutableRefObject<HTMLDivElement | null>;
|
|
214
|
+
/**
|
|
215
|
+
* 分页配置。传入后将启用前端分页,通常用于骨架屏行数计算。
|
|
216
|
+
*/
|
|
74
217
|
pagination?: {
|
|
75
218
|
current: number;
|
|
76
219
|
pageSize: number;
|
|
77
220
|
};
|
|
221
|
+
/**
|
|
222
|
+
* 行属性配置。用于设置行事件(如 onClick、onMouseEnter 等)。
|
|
223
|
+
* @see https://ant.design/components/table-cn#onRow
|
|
224
|
+
*/
|
|
78
225
|
onRow?: AntdTableProps<T>["onRow"];
|
|
226
|
+
/**
|
|
227
|
+
* 骨架屏配置。自定义加载状态下的骨架屏样式。
|
|
228
|
+
*/
|
|
79
229
|
skeletonProps?: ITableSkeletonProps;
|
|
230
|
+
/**
|
|
231
|
+
* 展开行配置。用于渲染可展开的行内容。
|
|
232
|
+
* @see https://ant.design/components/table-cn#expandable
|
|
233
|
+
*/
|
|
80
234
|
expandable?: ExpandableConfig<T>;
|
|
81
235
|
}
|
|
82
236
|
export {};
|
|
@@ -1,77 +1,66 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { Table } from "../../../src/core";
|
|
2
3
|
import { StoryObj } from "@storybook/react";
|
|
3
|
-
import React from "react";
|
|
4
4
|
declare const meta: {
|
|
5
5
|
component: <T extends {
|
|
6
6
|
id: string;
|
|
7
7
|
}>(props: import("../../../src/core").TableProps<T>) => React.JSX.Element;
|
|
8
8
|
title: "Core/Table | 表格组件";
|
|
9
|
+
parameters: {
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
9
16
|
};
|
|
10
17
|
export default meta;
|
|
11
18
|
type Story = StoryObj<typeof Table>;
|
|
12
19
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* 显示表格数据
|
|
20
|
+
* 基础表格展示,仅配置 columns 和 dataSource。
|
|
16
21
|
*/
|
|
17
|
-
export declare const
|
|
22
|
+
export declare const Basic: Story;
|
|
18
23
|
/**
|
|
19
|
-
*
|
|
24
|
+
* 带排序功能的表格,点击表头触发排序回调。
|
|
20
25
|
*/
|
|
21
|
-
export declare const
|
|
26
|
+
export declare const WithSorter: Story;
|
|
22
27
|
/**
|
|
23
|
-
*
|
|
28
|
+
* 带行选择的表格,支持多选和全选。
|
|
24
29
|
*/
|
|
25
|
-
export declare const
|
|
30
|
+
export declare const WithRowSelection: Story;
|
|
26
31
|
/**
|
|
27
|
-
*
|
|
32
|
+
* 带行操作菜单的表格,在每行末尾渲染操作按钮。
|
|
28
33
|
*/
|
|
29
|
-
export declare const
|
|
34
|
+
export declare const WithRowMenu: Story;
|
|
30
35
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* 显示 loading
|
|
36
|
+
* 加载状态,显示骨架屏动画。
|
|
34
37
|
*/
|
|
35
|
-
export declare const
|
|
38
|
+
export declare const Loading: Story;
|
|
36
39
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* 显示 error
|
|
40
|
+
* 自定义骨架屏配置,可调整行数、表头高度、行高度。
|
|
40
41
|
*/
|
|
41
|
-
export declare const
|
|
42
|
+
export declare const CustomSkeleton: Story;
|
|
42
43
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* 显示 loading
|
|
44
|
+
* 错误状态,显示错误信息替代数据。
|
|
46
45
|
*/
|
|
47
|
-
export declare const
|
|
46
|
+
export declare const ErrorState: Story;
|
|
48
47
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* 显示空表格
|
|
48
|
+
* 空数据状态,显示空状态提示。
|
|
52
49
|
*/
|
|
53
|
-
export declare const
|
|
50
|
+
export declare const Empty: Story;
|
|
54
51
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* 显示 Loading
|
|
52
|
+
* 固定表头,内容区滚动。
|
|
58
53
|
*/
|
|
59
|
-
export declare const
|
|
54
|
+
export declare const FixedHeader: Story;
|
|
60
55
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* 显示 data
|
|
56
|
+
* 可展开行,点击展开显示详细信息。
|
|
64
57
|
*/
|
|
65
|
-
export declare const
|
|
58
|
+
export declare const Expandable: Story;
|
|
66
59
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* 固定表头显示空表格
|
|
60
|
+
* 使用 onRow 设置行事件。
|
|
70
61
|
*/
|
|
71
|
-
export declare const
|
|
62
|
+
export declare const WithOnRow: Story;
|
|
72
63
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* 显示表格数据,表格可以展开
|
|
64
|
+
* @deprecated 请使用 loading 替代
|
|
76
65
|
*/
|
|
77
|
-
export declare const
|
|
66
|
+
export declare const InitLoading: Story;
|