xmirror-components 1.0.27 → 1.0.28-alpha.2
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/build/dist/index.cjs +14 -14
- package/build/dist/index.mjs +150 -149
- package/build/es/components/IconButton/index.d.ts +2 -2
- package/build/es/components/IconButton/index.js +3 -7
- package/build/es/components/Table/Footer/index.d.ts +5 -0
- package/build/es/components/Table/Footer/index.js +84 -0
- package/build/es/components/Table/PopoverSetColumns/index.d.ts +14 -0
- package/build/es/components/Table/PopoverSetColumns/index.js +174 -0
- package/build/es/components/Table/index.d.ts +5 -0
- package/build/es/components/Table/index.js +189 -0
- package/build/es/components/Table/types.d.ts +63 -0
- package/build/es/components/Table/types.js +1 -0
- package/build/lib/components/IconButton/index.js +3 -7
- package/build/lib/components/Table/Footer/index.js +119 -0
- package/build/lib/components/Table/PopoverSetColumns/index.js +212 -0
- package/build/lib/components/Table/index.js +227 -0
- package/build/lib/components/Table/types.js +2 -0
- package/build/lib/index.d.ts +1 -1
- package/build/package.json +1 -1
- package/build/types/components/IconButton/index.d.ts +2 -2
- package/build/types/components/Table/Footer/index.d.ts +5 -0
- package/build/types/components/Table/PopoverSetColumns/index.d.ts +14 -0
- package/build/types/components/Table/index.d.ts +5 -0
- package/build/types/components/Table/types.d.ts +63 -0
- package/package.json +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type TableProps, type TableColumnType } from 'antd';
|
|
3
|
+
import { type ColumnTitleProps } from 'antd/es/table/interface';
|
|
4
|
+
import type { AnyObject } from 'antd/es/_util/type';
|
|
5
|
+
export type { AnyObject } from 'antd/es/_util/type';
|
|
6
|
+
export type { ColumnTitleProps } from 'antd/es/table/interface';
|
|
7
|
+
export interface TableCache {
|
|
8
|
+
order: string[];
|
|
9
|
+
visibleItems: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface ColumnType<RecordType> extends Omit<TableColumnType<RecordType>, 'title' | 'fixed'> {
|
|
12
|
+
/**
|
|
13
|
+
* 控制该字段是否支持排序,列表 columnsSort 为 true 时有效
|
|
14
|
+
* (columnSortDisabled,尽量只给首尾字段加,中间的字段加了用处不大)
|
|
15
|
+
*/
|
|
16
|
+
columnSortDisabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 控制是否支持字段的显示隐藏功能
|
|
19
|
+
*/
|
|
20
|
+
columnVisibleDisabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 字段的显示隐藏属性
|
|
23
|
+
*/
|
|
24
|
+
columnVisible?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* 字段id
|
|
27
|
+
*/
|
|
28
|
+
dataIndex: string | string[];
|
|
29
|
+
/**
|
|
30
|
+
* 字段id
|
|
31
|
+
*/
|
|
32
|
+
fixed?: 'left' | 'right' | boolean | string;
|
|
33
|
+
/**
|
|
34
|
+
* 标题
|
|
35
|
+
*/
|
|
36
|
+
title?: React.ReactNode | ((props: ColumnTitleProps<RecordType>) => React.ReactNode);
|
|
37
|
+
}
|
|
38
|
+
export interface ColumnGroupType<RecordType = AnyObject> extends Omit<ColumnType<RecordType>, 'dataIndex'> {
|
|
39
|
+
children: TableComponentProps<RecordType>['columns'];
|
|
40
|
+
}
|
|
41
|
+
export type ColumnTypes<RecordType = AnyObject> = ColumnType<RecordType> | ColumnGroupType<RecordType>;
|
|
42
|
+
export interface TableComponentProps<RecordType = AnyObject> extends Omit<TableProps<RecordType>, 'columns'> {
|
|
43
|
+
/**
|
|
44
|
+
* 列表项
|
|
45
|
+
*/
|
|
46
|
+
columns?: Array<ColumnTypes<RecordType>>;
|
|
47
|
+
/**
|
|
48
|
+
* 是否打开列表字段排序功能
|
|
49
|
+
*/
|
|
50
|
+
columnsSort?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* 是否打开列表字段的显示隐藏属性
|
|
53
|
+
*/
|
|
54
|
+
columnsVisible?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* 列表唯一值,用来处理一个页面多个列表且同时开启字段排序或字段隐藏功能
|
|
57
|
+
*/
|
|
58
|
+
tableId?: string;
|
|
59
|
+
/**
|
|
60
|
+
* 中间的批量操作弹出层
|
|
61
|
+
*/
|
|
62
|
+
selectionPopover?: React.ReactNode;
|
|
63
|
+
}
|