@next-bricks/presentational-bricks 1.337.0 → 1.337.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/deploy/contract.yaml +108 -108
- package/dist/bricks.json +22 -22
- package/dist/index.afcbac66.js +2 -0
- package/dist/index.afcbac66.js.map +1 -0
- package/package.json +3 -3
- package/dist/index.81d05616.js +0 -2
- package/dist/index.81d05616.js.map +0 -1
- package/dist/types/agent-status/AgentStatus.d.ts +0 -7
- package/dist/types/agent-status/index.d.ts +0 -59
- package/dist/types/avatar-upload/AvatarUpload.d.ts +0 -10
- package/dist/types/avatar-upload/index.d.ts +0 -51
- package/dist/types/banner-display-card-list/BannerDisplayCardList.d.ts +0 -15
- package/dist/types/banner-display-card-list/index.d.ts +0 -25
- package/dist/types/basic-icon/BasicIcon.d.ts +0 -17
- package/dist/types/basic-icon/index.d.ts +0 -96
- package/dist/types/basic-progress/BasicProgress.d.ts +0 -36
- package/dist/types/basic-progress/index.d.ts +0 -122
- package/dist/types/brick-alert/BrickAlert.d.ts +0 -21
- package/dist/types/brick-alert/index.d.ts +0 -204
- package/dist/types/brick-alert-level/BrickAlertLevel.d.ts +0 -7
- package/dist/types/brick-alert-level/index.d.ts +0 -48
- package/dist/types/brick-alert-number/BrickAlertNumber.d.ts +0 -6
- package/dist/types/brick-alert-number/index.d.ts +0 -27
- package/dist/types/brick-alert-status/BrickAlertStatus.d.ts +0 -8
- package/dist/types/brick-alert-status/index.d.ts +0 -68
- package/dist/types/brick-alert-value/BrickAlertValue.d.ts +0 -7
- package/dist/types/brick-alert-value/index.d.ts +0 -28
- package/dist/types/brick-button/BrickButton.d.ts +0 -11
- package/dist/types/brick-button/index.d.ts +0 -2
- package/dist/types/brick-calendar/index.d.ts +0 -141
- package/dist/types/brick-cluster-type/BrickClusterType.d.ts +0 -8
- package/dist/types/brick-cluster-type/index.d.ts +0 -63
- package/dist/types/brick-code-display/BrickCodeDisplay.d.ts +0 -13
- package/dist/types/brick-code-display/index.d.ts +0 -2
- package/dist/types/brick-collapse-card/BrickCollapseCard.d.ts +0 -25
- package/dist/types/brick-collapse-card/index.d.ts +0 -175
- package/dist/types/brick-collection-instance-execution/BrickCollectionInstanceExecution.d.ts +0 -7
- package/dist/types/brick-collection-instance-execution/index.d.ts +0 -2
- package/dist/types/brick-conditional-display/BrickConditionalDisplay.d.ts +0 -19
- package/dist/types/brick-conditional-display/index.d.ts +0 -99
- package/dist/types/brick-delete-confirm/BrickDeleteConfirm.d.ts +0 -21
- package/dist/types/brick-delete-confirm/index.d.ts +0 -2
- package/dist/types/brick-descriptions/BrickDescriptions.d.ts +0 -22
- package/dist/types/brick-descriptions/index.d.ts +0 -192
- package/dist/types/brick-display-structs/BrickDisplayStructs.d.ts +0 -9
- package/dist/types/brick-display-structs/index.d.ts +0 -66
- package/dist/types/brick-divider/BrickDivider.d.ts +0 -12
- package/dist/types/brick-divider/index.d.ts +0 -76
- package/dist/types/brick-form/BrickForm.d.ts +0 -73
- package/dist/types/brick-form/components/brick-checkbox/BrickCheckbox.d.ts +0 -11
- package/dist/types/brick-form/components/brick-date-picker/BrickDatePicker.d.ts +0 -9
- package/dist/types/brick-form/components/brick-input/BrickInput.d.ts +0 -15
- package/dist/types/brick-form/components/brick-input-number/BrickInputNumber.d.ts +0 -9
- package/dist/types/brick-form/components/brick-instance-selector/BrickInstanceSelector.d.ts +0 -13
- package/dist/types/brick-form/components/brick-radio/BrickRadio.d.ts +0 -12
- package/dist/types/brick-form/components/brick-select/BrickSelect.d.ts +0 -18
- package/dist/types/brick-form/components/brick-switch/BrickSwitch.d.ts +0 -14
- package/dist/types/brick-form/components/brick-time-picker/BrickTimePicker.d.ts +0 -8
- package/dist/types/brick-form/components/wrapper-form-item/WrapperFormItem.d.ts +0 -10
- package/dist/types/brick-form/index.d.ts +0 -12
- package/dist/types/brick-form/interfaces/brick-component.d.ts +0 -5
- package/dist/types/brick-form/interfaces/index.d.ts +0 -1
- package/dist/types/brick-form/processor/handleChange.d.ts +0 -1
- package/dist/types/brick-form/processor/index.d.ts +0 -1
- package/dist/types/brick-general-search/BrickGeneralSearch.d.ts +0 -28
- package/dist/types/brick-general-search/index.d.ts +0 -233
- package/dist/types/brick-humanize-time/BrickHumanizeTime.d.ts +0 -16
- package/dist/types/brick-humanize-time/index.d.ts +0 -101
- package/dist/types/brick-illustration/BrickIllustration.d.ts +0 -14
- package/dist/types/brick-illustration/index.d.ts +0 -87
- package/dist/types/brick-input/BrickInput.d.ts +0 -11
- package/dist/types/brick-input/index.d.ts +0 -73
- package/dist/types/brick-link/BrickLink.d.ts +0 -21
- package/dist/types/brick-link/index.d.ts +0 -208
- package/dist/types/brick-list/BrickList.d.ts +0 -20
- package/dist/types/brick-list/index.d.ts +0 -6
- package/dist/types/brick-placeholder/BrickPlaceholder.d.ts +0 -6
- package/dist/types/brick-placeholder/index.d.ts +0 -59
- package/dist/types/brick-quick-entries/BrickQuickEntries.d.ts +0 -16
- package/dist/types/brick-quick-entries/index.d.ts +0 -153
- package/dist/types/brick-rate/BrickRate.d.ts +0 -11
- package/dist/types/brick-rate/index.d.ts +0 -99
- package/dist/types/brick-result/BrickResult.d.ts +0 -21
- package/dist/types/brick-result/components/IllustrationWrapper.d.ts +0 -16
- package/dist/types/brick-result/index.d.ts +0 -77
- package/dist/types/brick-table/BrickTable.d.ts +0 -57
- package/dist/types/brick-table/brickTableHelper.d.ts +0 -6
- package/dist/types/brick-table/index.d.ts +0 -828
- package/dist/types/brick-tag/BrickTag.d.ts +0 -35
- package/dist/types/brick-tag/index.d.ts +0 -194
- package/dist/types/brick-timeline/BrickTimeline.d.ts +0 -16
- package/dist/types/brick-timeline/TimelineCard.d.ts +0 -15
- package/dist/types/brick-timeline/index.d.ts +0 -119
- package/dist/types/brick-timeline/processor.d.ts +0 -5
- package/dist/types/brick-tree/BrickTree.d.ts +0 -67
- package/dist/types/brick-tree/index.d.ts +0 -325
- package/dist/types/brick-user/BrickUser.d.ts +0 -15
- package/dist/types/brick-user/index.d.ts +0 -130
- package/dist/types/brick-user-group/BrickUserGroup.d.ts +0 -12
- package/dist/types/brick-user-group/index.d.ts +0 -61
- package/dist/types/brick-utils/index.d.ts +0 -44
- package/dist/types/brick-value-mapping/BrickValueMapping.d.ts +0 -24
- package/dist/types/brick-value-mapping/index.d.ts +0 -132
- package/dist/types/button-wrapper/ButtonWrapper.d.ts +0 -7
- package/dist/types/button-wrapper/index.d.ts +0 -4
- package/dist/types/card-item/CardItem.d.ts +0 -52
- package/dist/types/card-item/index.d.ts +0 -392
- package/dist/types/code-editor/CodeEditor.d.ts +0 -19
- package/dist/types/code-editor/brace/mode.d.ts +0 -4
- package/dist/types/code-editor/brace/theme.d.ts +0 -3
- package/dist/types/code-editor/index.d.ts +0 -118
- package/dist/types/collapse-info-list/CollapseInfoList.d.ts +0 -19
- package/dist/types/collapse-info-list/index.d.ts +0 -53
- package/dist/types/collapsible-card-item/CollapsibleCardItem.d.ts +0 -19
- package/dist/types/collapsible-card-item/index.d.ts +0 -165
- package/dist/types/copyable-text/CopyableText.d.ts +0 -12
- package/dist/types/copyable-text/index.d.ts +0 -73
- package/dist/types/cost-time/CostTime.d.ts +0 -9
- package/dist/types/cost-time/i18n/constants.d.ts +0 -20
- package/dist/types/cost-time/index.d.ts +0 -73
- package/dist/types/crontab-display/CrontabDisplay.d.ts +0 -5
- package/dist/types/crontab-display/index.d.ts +0 -47
- package/dist/types/datetime-selector/DatetimeSelector.d.ts +0 -19
- package/dist/types/datetime-selector/index.d.ts +0 -167
- package/dist/types/datetime-selector/processor.d.ts +0 -16
- package/dist/types/digital-number/DigitalNumber.d.ts +0 -21
- package/dist/types/digital-number/index.d.ts +0 -101
- package/dist/types/dropdown-button/DropdownButton.d.ts +0 -17
- package/dist/types/dropdown-button/index.d.ts +0 -106
- package/dist/types/dropdown-select/DropdownSelect.d.ts +0 -37
- package/dist/types/dropdown-select/index.d.ts +0 -231
- package/dist/types/dynamic-content/index.d.ts +0 -35
- package/dist/types/dynamic-grid-container/DynamicGridContainer.d.ts +0 -9
- package/dist/types/dynamic-grid-container/index.d.ts +0 -47
- package/dist/types/entry-card-item/EntryCardItem.d.ts +0 -20
- package/dist/types/entry-card-item/index.d.ts +0 -146
- package/dist/types/general-badge/index.d.ts +0 -95
- package/dist/types/general-carousel/GeneralCarousel.d.ts +0 -28
- package/dist/types/general-carousel/index.d.ts +0 -197
- package/dist/types/general-iframe/index.d.ts +0 -62
- package/dist/types/general-image/GeneralImage.d.ts +0 -14
- package/dist/types/general-image/index.d.ts +0 -124
- package/dist/types/general-label/GeneralLabel.d.ts +0 -12
- package/dist/types/general-label/index.d.ts +0 -79
- package/dist/types/general-list/GeneralList.d.ts +0 -8
- package/dist/types/general-list/index.d.ts +0 -59
- package/dist/types/general-pagination/GeneralPagination.d.ts +0 -12
- package/dist/types/general-pagination/index.d.ts +0 -108
- package/dist/types/general-preview-image/GeneralPreviewImage.d.ts +0 -9
- package/dist/types/general-preview-image/components/Image.d.ts +0 -35
- package/dist/types/general-preview-image/components/Operations.d.ts +0 -20
- package/dist/types/general-preview-image/components/Preview.d.ts +0 -24
- package/dist/types/general-preview-image/components/PreviewGroup.d.ts +0 -40
- package/dist/types/general-preview-image/components/getFixScaleEleTransPosition.d.ts +0 -16
- package/dist/types/general-preview-image/components/hooks/useImageTransform.d.ts +0 -23
- package/dist/types/general-preview-image/components/previewConfig.d.ts +0 -8
- package/dist/types/general-preview-image/index.d.ts +0 -75
- package/dist/types/general-slider/GeneralSlider.d.ts +0 -18
- package/dist/types/general-slider/index.d.ts +0 -118
- package/dist/types/general-tooltip/GeneralTooltip.d.ts +0 -19
- package/dist/types/general-tooltip/index.d.ts +0 -117
- package/dist/types/general-transfer/GeneralTransfer.d.ts +0 -19
- package/dist/types/general-transfer/index.d.ts +0 -160
- package/dist/types/general-video/GeneralVideo.d.ts +0 -11
- package/dist/types/general-video/index.d.ts +0 -51
- package/dist/types/i18n/constants.d.ts +0 -51
- package/dist/types/info-display-card-list/InfoDisplayCardList.d.ts +0 -27
- package/dist/types/info-display-card-list/index.d.ts +0 -148
- package/dist/types/interfaces/brick-collapse-card.d.ts +0 -4
- package/dist/types/interfaces/brick-result.d.ts +0 -27
- package/dist/types/interfaces/brick-tag.d.ts +0 -35
- package/dist/types/interfaces/brick-tree.d.ts +0 -5
- package/dist/types/interfaces/common.d.ts +0 -15
- package/dist/types/interfaces/dropdown-select.d.ts +0 -7
- package/dist/types/interfaces/index.d.ts +0 -2
- package/dist/types/jsx.d.ts +0 -315
- package/dist/types/log-display/LogDisplay.d.ts +0 -8
- package/dist/types/log-display/index.d.ts +0 -54
- package/dist/types/markdown-display/MarkdownDisplay.d.ts +0 -17
- package/dist/types/markdown-display/SyntaxHighlighter.d.ts +0 -13
- package/dist/types/markdown-display/index.d.ts +0 -88
- package/dist/types/markdown-editor/MarkdownEditor.d.ts +0 -23
- package/dist/types/markdown-editor/index.d.ts +0 -154
- package/dist/types/modal-confirm/ModalConfirm.d.ts +0 -30
- package/dist/types/modal-confirm/index.d.ts +0 -231
- package/dist/types/qrcode-download/index.d.ts +0 -77
- package/dist/types/qrcode-download/utils.d.ts +0 -6
- package/dist/types/rank-table/RankTable.d.ts +0 -21
- package/dist/types/rank-table/RankTableHelper.d.ts +0 -14
- package/dist/types/rank-table/index.d.ts +0 -215
- package/dist/types/single-field-edit/SingleFieldEdit.d.ts +0 -22
- package/dist/types/single-field-edit/index.d.ts +0 -148
- package/dist/types/statistic-card/StatisticCard.d.ts +0 -15
- package/dist/types/statistic-card/index.d.ts +0 -130
- package/dist/types/table-transfer/TableTransfer.d.ts +0 -32
- package/dist/types/table-transfer/TableTransferHelper.d.ts +0 -14
- package/dist/types/table-transfer/index.d.ts +0 -123
- package/dist/types/template-breadcrumb/index.d.ts +0 -67
- package/dist/types/text-collapse/TextCollapse.d.ts +0 -7
- package/dist/types/text-collapse/index.d.ts +0 -33
- package/dist/types/tree-transfer/TreeTransfer.d.ts +0 -18
- package/dist/types/tree-transfer/index.d.ts +0 -96
- package/dist/types/tree-transfer/treeShuttleBox/TreeShuttleBox.d.ts +0 -19
- package/dist/types/tree-transfer/treeShuttleBox/TreeShuttleBoxLeft.d.ts +0 -10
- package/dist/types/tree-transfer/treeShuttleBox/TreeShuttleBoxRight.d.ts +0 -9
- package/dist/types/tree-transfer/treeShuttleBox/TreeShuttleButton.d.ts +0 -7
- package/dist/types/tree-transfer/treeShuttleBox/index.d.ts +0 -3
- package/dist/types/tree-transfer/treeShuttleBox/interfaceType.d.ts +0 -14
- package/dist/types/tree-transfer/treeShuttleBox/tool.d.ts +0 -67
- package/dist/types/tree-transfer/treeShuttleBox/useTreeContext.d.ts +0 -35
- package/dist/types/tree-transfer/treeShuttleBox/useTreeShuttle.d.ts +0 -31
|
@@ -1,828 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { UpdatingElement, EventEmitter } from "@next-core/brick-kit";
|
|
3
|
-
import { TableDragInfo } from "./BrickTable";
|
|
4
|
-
import { TablePaginationConfig, TableProps } from "antd/lib/table";
|
|
5
|
-
import { TableRowSelection, RowSelectionType, ExpandableConfig } from "antd/lib/table/interface";
|
|
6
|
-
import { BrickEventsMap, UseBrickConf } from "@next-core/brick-types";
|
|
7
|
-
import { ColumnProps } from "antd/lib/table";
|
|
8
|
-
import { DataIndex } from "rc-table/lib/interface";
|
|
9
|
-
import { MenuIcon } from "@next-core/brick-types";
|
|
10
|
-
import { BrickWrapperConfig } from "../interfaces";
|
|
11
|
-
import { SizeType } from "antd/lib/config-provider/SizeContext";
|
|
12
|
-
export interface BrickTableElementProps {
|
|
13
|
-
rowSelection?: false | TableRowSelection<any>;
|
|
14
|
-
rowKey?: string;
|
|
15
|
-
hiddenColumns?: Array<string | number>;
|
|
16
|
-
filters?: Record<string, string[]>;
|
|
17
|
-
configProps?: any;
|
|
18
|
-
sort?: string;
|
|
19
|
-
order?: string | number;
|
|
20
|
-
rowDisabledConfig?: RowDisabledProps | RowDisabledProps[];
|
|
21
|
-
expandable?: ExpandableConfig<Record<string, unknown>> | false;
|
|
22
|
-
expandedRowBrick?: {
|
|
23
|
-
useBrick?: UseBrickConf;
|
|
24
|
-
};
|
|
25
|
-
emptyUseBrick?: {
|
|
26
|
-
useBrick?: UseBrickConf;
|
|
27
|
-
};
|
|
28
|
-
expandIcon?: {
|
|
29
|
-
collapsedIcon: MenuIcon;
|
|
30
|
-
expandedIcon: MenuIcon;
|
|
31
|
-
};
|
|
32
|
-
expandIconColumnIndex?: number;
|
|
33
|
-
expandRowByClick?: boolean;
|
|
34
|
-
optimizedColumns?: Array<string | number>;
|
|
35
|
-
wrapperConfig?: BrickWrapperConfig;
|
|
36
|
-
defaultExpandAllRows?: boolean;
|
|
37
|
-
expandedRowKeys?: string[];
|
|
38
|
-
selectAllChildren?: boolean;
|
|
39
|
-
defaultSelectAll?: boolean;
|
|
40
|
-
ellipsisInfo?: boolean;
|
|
41
|
-
frontSearch?: boolean;
|
|
42
|
-
exactSearch?: boolean;
|
|
43
|
-
frontSearchFilterKeys?: string[];
|
|
44
|
-
page?: number;
|
|
45
|
-
pageSize?: number;
|
|
46
|
-
scrollConfigs?: TableProps<unknown>["scroll"];
|
|
47
|
-
tableDraggable?: boolean;
|
|
48
|
-
acceptType?: string;
|
|
49
|
-
zebraPattern?: boolean;
|
|
50
|
-
storeCheckedByUrl?: boolean;
|
|
51
|
-
extraRows?: Record<string, unknown>[];
|
|
52
|
-
draggable?: boolean;
|
|
53
|
-
autoSelectParentWhenAllChildrenSelected?: boolean;
|
|
54
|
-
thTransparent?: boolean;
|
|
55
|
-
pagination?: false | TablePaginationConfig;
|
|
56
|
-
size?: SizeType | "x-small";
|
|
57
|
-
type?: RowSelectionType;
|
|
58
|
-
selectedRowKeys?: React.Key[];
|
|
59
|
-
showHeaderExpandAll?: boolean;
|
|
60
|
-
columnKeyBrickMap?: Record<string, {
|
|
61
|
-
useBrick: UseBrickConf;
|
|
62
|
-
}>;
|
|
63
|
-
}
|
|
64
|
-
export interface RowDisabledProps {
|
|
65
|
-
field: string;
|
|
66
|
-
value: any;
|
|
67
|
-
operator: "$eq" | "$ne" | "$lt" | "$lte" | "$gt" | "$gte" | "$isEqual" | "$notEqual" | "$in" | "$nin" | "$exists";
|
|
68
|
-
}
|
|
69
|
-
export interface CustomColumnComponent {
|
|
70
|
-
/** 构件名称 */
|
|
71
|
-
brick: string | any;
|
|
72
|
-
/** 字段值、列表项和 index 对应所用构件的属性的 key */
|
|
73
|
-
fields?: {
|
|
74
|
-
value?: string;
|
|
75
|
-
item?: string;
|
|
76
|
-
index?: string;
|
|
77
|
-
};
|
|
78
|
-
/** 构件属性 */
|
|
79
|
-
properties?: Record<string, any>;
|
|
80
|
-
/** 事件 */
|
|
81
|
-
events?: BrickEventsMap;
|
|
82
|
-
}
|
|
83
|
-
export interface CustomColumn extends ColumnProps<Record<string, any>> {
|
|
84
|
-
/**
|
|
85
|
-
* 支持为某列自定义展示构件
|
|
86
|
-
*/
|
|
87
|
-
useBrick?: UseBrickConf;
|
|
88
|
-
/**
|
|
89
|
-
* 字段的值展示时的后缀
|
|
90
|
-
*/
|
|
91
|
-
valueSuffix?: string;
|
|
92
|
-
/**
|
|
93
|
-
* 支持为某列的表头自定义展示构件,可通过 DATA.title 获取标题文本
|
|
94
|
-
*/
|
|
95
|
-
headerBrick?: {
|
|
96
|
-
useBrick: UseBrickConf;
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* 在渲染自定义构件的场景下额外设置单元格的状态样式, `dataIndex` 表示取哪一列的字段值作为判断数据,不填的话默认取当前列的字段,`mapping` 表示判断的条件,条件被成功匹配时用当前的样式。目前仅支持单元格 `leftBorderColor` 属性的设置
|
|
100
|
-
*/
|
|
101
|
-
cellStatus?: CellStatusProps;
|
|
102
|
-
/**
|
|
103
|
-
* 设置列的每个单元格样式
|
|
104
|
-
*/
|
|
105
|
-
cellStyle?: React.CSSProperties;
|
|
106
|
-
/**
|
|
107
|
-
* [已废弃]支持为某列的标题自定义展示构件,可通过 DATA.title 获取标题文本
|
|
108
|
-
*/
|
|
109
|
-
titleUseBrick?: UseBrickConf;
|
|
110
|
-
/**
|
|
111
|
-
* [已废弃]支持为某列自定义展示构件
|
|
112
|
-
*/
|
|
113
|
-
component?: CustomColumnComponent;
|
|
114
|
-
/**
|
|
115
|
-
* 单元格内元素的垂直对齐方式
|
|
116
|
-
*/
|
|
117
|
-
verticalAlign?: "top" | "bottom";
|
|
118
|
-
/**
|
|
119
|
-
* 每条记录的控制列合并的值的 key
|
|
120
|
-
*/
|
|
121
|
-
colSpanKey?: string;
|
|
122
|
-
/**
|
|
123
|
-
* 每条记录的控制行合并的值的 key
|
|
124
|
-
*/
|
|
125
|
-
rowSpanKey?: string;
|
|
126
|
-
/**
|
|
127
|
-
* 自定义筛选菜单
|
|
128
|
-
*/
|
|
129
|
-
filterDropdownBrick?: {
|
|
130
|
-
useBrick: UseBrickConf;
|
|
131
|
-
};
|
|
132
|
-
/**
|
|
133
|
-
* 自定义筛选图标
|
|
134
|
-
*/
|
|
135
|
-
customFilterIcon?: MenuIcon;
|
|
136
|
-
}
|
|
137
|
-
export interface CellStatusProps {
|
|
138
|
-
dataIndex?: string;
|
|
139
|
-
mapping: Array<{
|
|
140
|
-
leftBorderColor: string;
|
|
141
|
-
value: any;
|
|
142
|
-
}>;
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* @id presentational-bricks.brick-table
|
|
146
|
-
* @name presentational-bricks.brick-table
|
|
147
|
-
* @docKind brick
|
|
148
|
-
* @description 当需要对数据进行排序、搜索、分页、自定义操作等复杂行为时
|
|
149
|
-
* @groupI18N
|
|
150
|
-
* {
|
|
151
|
-
* "paginationAndFilter": {"en": "Pagination/Order/Filter", "zh": "分页/排序及搜索"},
|
|
152
|
-
* "expand": {"en": "Expand/Collapse", "zh": "展开/折叠"},
|
|
153
|
-
* "rowSelection": {"en": "RowSelection", "zh": "行选择配置(rowSelection)"}
|
|
154
|
-
* }
|
|
155
|
-
* @author lynette
|
|
156
|
-
* @slots
|
|
157
|
-
* @history
|
|
158
|
-
* 1.257.2:新增 `select.row.keys.update` 事件
|
|
159
|
-
* 1.230.0:新增属性 `exactSearch` 在开启前端搜索的情况下可以配置精确搜索
|
|
160
|
-
* 1.168.0:新增属性 `optimizedColumns`
|
|
161
|
-
* 1.153.0:`columns` 属性新增 `headerBrick`、废弃 `titleUseBrick`
|
|
162
|
-
* 1.145.0:新增`stripEmptyExpandableChildren`属性
|
|
163
|
-
* 1.143.0:新增属性 `selectedRowKeys`
|
|
164
|
-
* 1.111.0:新增属性 `sortable`
|
|
165
|
-
* 1.105.0:新增属性 `zebraPattern` ,`columns` 属性新增 `titleUseBrick`
|
|
166
|
-
* 1.102.0:新增属性`hiddenColumns`
|
|
167
|
-
* 1.94.0:新增属性`tableDraggable`,预废弃属性 `draggable`
|
|
168
|
-
* 1.92.0:新增属性 `filters`
|
|
169
|
-
* 1.72.0:新增属性 `draggable`,新增事件`row.drag`
|
|
170
|
-
* 1.70.0:新增 `qField` 属性
|
|
171
|
-
* 1.68.0:新增属性 `childrenColumnName`、`selectAllChildren`
|
|
172
|
-
* 1.67.0:新增 `rowKey` 属性
|
|
173
|
-
* 1.63.0:新增行展开功能,新增属性`expandedRowBrick`,`expandedRowBrick`,`expandIconAsCell`,`expandIconColumnIndex`,`expandRowByClick`,`defaultExpandAllRows`,`expandedRowKeys`,新增事件`row.expand`,`expand.rows.change`
|
|
174
|
-
* 1.60.0:新增 `cellStatus` 属性
|
|
175
|
-
* 1.59.0:新增 `rowDisabledConfig` 属性
|
|
176
|
-
* 1.57.1:新增 `shouldUpdateUrlParams` 属性和 `sort.update` 事件
|
|
177
|
-
* @memo
|
|
178
|
-
* > Tips: 在 react 中,boolean 类型的值是合法的子元素,但是不会被渲染出来。如果希望 boolean 值在表格单元格中展示成 `true`|`false`,可以使用平台管道进行转换,例如`@{someProperties|string}`。更多场景下可以结合 [基本数值映射构件](developers/brick-book/brick/presentational-bricks.brick-value-mapping) 把 boolean 类型的值转换成有意义的文本进行展示。
|
|
179
|
-
|
|
180
|
-
* `<presentational-bricks.brick-table>` 为某列自定义展示构件传递的数据源为:
|
|
181
|
-
*
|
|
182
|
-
* | field | type | description |
|
|
183
|
-
* | ----------- | ------ | ----------- |
|
|
184
|
-
* | cellData | any | 单元格数据 |
|
|
185
|
-
* | rowData | any | 整行数据 |
|
|
186
|
-
* | columnIndex | number | 列序号 |
|
|
187
|
-
*
|
|
188
|
-
* `<presentational-bricks.brick-table>` 为自定义行展开的构件传递的数据源为:
|
|
189
|
-
*
|
|
190
|
-
* | field | type | description |
|
|
191
|
-
* | -------- | ------ | ----------- |
|
|
192
|
-
* | rowData | any | 整行数据 |
|
|
193
|
-
* | rowIndex | number | 行序号 |
|
|
194
|
-
*
|
|
195
|
-
* ### pagination 默认配置
|
|
196
|
-
*
|
|
197
|
-
* 如果不希望分页,如下设置即可:
|
|
198
|
-
*
|
|
199
|
-
* ```
|
|
200
|
-
* {
|
|
201
|
-
* "pagination": false
|
|
202
|
-
* }
|
|
203
|
-
* ```
|
|
204
|
-
*
|
|
205
|
-
* 如果希望覆盖默认配置,覆盖对应项即可,相关配置项具体查阅:[pagination](https://ant.design/components/pagination-cn/#API)
|
|
206
|
-
*
|
|
207
|
-
* ```
|
|
208
|
-
* {
|
|
209
|
-
* "pagination": {
|
|
210
|
-
* "pageSizeOptions": ["10","100","1000"]
|
|
211
|
-
* }
|
|
212
|
-
* }
|
|
213
|
-
* ```
|
|
214
|
-
*
|
|
215
|
-
* | property | type | required | default | description |
|
|
216
|
-
* | --------------- | -------- | -------- | ------------------ | ------------------------------------- |
|
|
217
|
-
* | current | string | - | - | 页码,从 page properties 获取 |
|
|
218
|
-
* | pageSize | string | - | - | 每页条数,从 pageSize properties 获取 |
|
|
219
|
-
* | total | object | - | - | 总数,从 dataSource.total 获取 |
|
|
220
|
-
* | showSizeChanger | boolean | - | true | 展示页码变化器 |
|
|
221
|
-
* | pageSizeOptions | array | - | ["10", "20", "50"] | 每页条数选项 |
|
|
222
|
-
* | showTotal | function | - | - | 渲染成"共 xx 条" |
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
* ### rowSelection 默认配置
|
|
226
|
-
*
|
|
227
|
-
* 行选择默认为 false,不配置就不显示。如果要开启如下设置即可,这时 brick-table 会默认配置 onChange 事件:
|
|
228
|
-
*
|
|
229
|
-
* ```
|
|
230
|
-
* {
|
|
231
|
-
* "rowSelection": true
|
|
232
|
-
* }
|
|
233
|
-
* ```
|
|
234
|
-
*
|
|
235
|
-
* 如果希望覆盖或者扩展默认配置,覆盖对应项即可,相关配置项具体查阅:[rowSelection](https://ant.design/components/table-cn/#rowSelection)
|
|
236
|
-
*
|
|
237
|
-
* ```
|
|
238
|
-
* {
|
|
239
|
-
* "rowSelection": {
|
|
240
|
-
* "columnWidth": "88px"
|
|
241
|
-
* }
|
|
242
|
-
* }
|
|
243
|
-
* ```
|
|
244
|
-
*
|
|
245
|
-
* | property | type | required | default | description |
|
|
246
|
-
* | -------- | -------- | -------- | ------- | --------------------------------- |
|
|
247
|
-
* | onChange | function | - | - | 选择行,会抛出事件"select.update" |
|
|
248
|
-
*
|
|
249
|
-
* ### 排序
|
|
250
|
-
*
|
|
251
|
-
* 如果某一列希望排序,则可以设对应列 `sorter:true`,例如:
|
|
252
|
-
*
|
|
253
|
-
* ```
|
|
254
|
-
* {
|
|
255
|
-
* "columns": [
|
|
256
|
-
* {
|
|
257
|
-
* "title": "主机",
|
|
258
|
-
* "key": "hostname",
|
|
259
|
-
* "dataIndex": "hostname",
|
|
260
|
-
* "sorter": true
|
|
261
|
-
* }
|
|
262
|
-
* ]
|
|
263
|
-
* }
|
|
264
|
-
* ```
|
|
265
|
-
*
|
|
266
|
-
* ## flattenTreeDataListAndCalcRowSpan 自定义加工函数
|
|
267
|
-
*
|
|
268
|
-
* 将树形数据列表按照 `options.flattenConfigs` 进行展平,并生成相应的行合并数据
|
|
269
|
-
*
|
|
270
|
-
* ### Params
|
|
271
|
-
*
|
|
272
|
-
* | param | type | required | default | description |
|
|
273
|
-
* | ------------ | ------------------------------------------ | -------- | ------- | ------------------------------------------------------------------------ |
|
|
274
|
-
* | treeDataList | Record<string, unknown>[] | ✔️ | - | 树形数据列表 |
|
|
275
|
-
* | options | FlattenTreeDataListAndCalcRowSpanOptions | ✔️ | - | 函数选项 |
|
|
276
|
-
* | depth | number | - | 0 | 当前展平的深度,用于确定 `options.flattenConfigs` 中的当前层级的展平配置 |
|
|
277
|
-
*
|
|
278
|
-
* ### Returns
|
|
279
|
-
*
|
|
280
|
-
* | type | description |
|
|
281
|
-
* | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
282
|
-
* | Record<string, unknown>[] | 展平后的列表,除了按照 `options.flattenConfigs` 进行展平外,还会生成相应层级以 `options.flattenConfigs[].parentInChildKey + "RowSpan"` 为 key 的行合并数据 |
|
|
283
|
-
*
|
|
284
|
-
* ### FlattenTreeDataListAndCalcRowSpanOptions
|
|
285
|
-
*
|
|
286
|
-
* | property | type | required | default | description |
|
|
287
|
-
* | -------------------- | ----------------- | -------- | ------- | ---------------------------------------- |
|
|
288
|
-
* | flattenConfigs | FlattenConfig[] | ✔️ | - | 展平配置列表,按照由父到子的顺序一一对应 |
|
|
289
|
-
* | omitChildrenInParent | boolean | - | - | 展平后,是否省略父级里的子列表 |
|
|
290
|
-
*
|
|
291
|
-
* ### FlattenConfig
|
|
292
|
-
*
|
|
293
|
-
* | property | type | required | default | description |
|
|
294
|
-
* | ---------------- | -------- | -------- | ------- | ------------------------ |
|
|
295
|
-
* | childrenKey | string | ✔️ | - | 对应层级子列表的 key |
|
|
296
|
-
* | parentInChildKey | string | ✔️ | - | 展平后,父级在子级的 key |
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
* @noInheritDoc
|
|
300
|
-
*/
|
|
301
|
-
export declare class BrickTableElement extends UpdatingElement implements BrickTableElementProps {
|
|
302
|
-
/**
|
|
303
|
-
* @detail {[pagePath]: xxx}
|
|
304
|
-
* @description 页码变化,pagePath 可在 fields.page 中设置,默认为 page
|
|
305
|
-
*/
|
|
306
|
-
pageUpdate: EventEmitter<Record<string, number>>;
|
|
307
|
-
/**
|
|
308
|
-
* @detail {[pagePath]:1,[pageSizePath]:xxx}
|
|
309
|
-
* @description 每页条数变化 ,pagePath 可在 fields.page 中设置,pageSizePath 可在 fields.pageSize 中设置,默认为 pageSize
|
|
310
|
-
*/
|
|
311
|
-
filterUpdate: EventEmitter<Record<string, number>>;
|
|
312
|
-
/**
|
|
313
|
-
* @detail Record<string,any>[]
|
|
314
|
-
* @description【谨慎使用】 勾选框变化,detail 中为所选的行数据,这个事件在后台分页的情况下,可能返回undefined
|
|
315
|
-
*/
|
|
316
|
-
selectUpdate: EventEmitter<Record<string, any>[]>;
|
|
317
|
-
/**
|
|
318
|
-
* @detail Record<string,any>[]
|
|
319
|
-
* @description 勾选框变化,detail 中为所选的行key集合
|
|
320
|
-
*/
|
|
321
|
-
selectRowKeysUpdate: EventEmitter<string[]>;
|
|
322
|
-
/**
|
|
323
|
-
* @detail {sort:string;order:string|number}
|
|
324
|
-
* @description 排序变化,detail 中的 sort 为对应排序列的 key/dataIndex,order 为升序/降序
|
|
325
|
-
*/
|
|
326
|
-
sortUpdate: EventEmitter<{
|
|
327
|
-
sort: string;
|
|
328
|
-
order: string | number;
|
|
329
|
-
}>;
|
|
330
|
-
/**
|
|
331
|
-
* @detail {expanded:boolean;record:Record<string,any>}
|
|
332
|
-
* @description 点击展开图标时触发的事件,事件详情中`expanded`为是否展开,`record`被点击的行信息
|
|
333
|
-
*/
|
|
334
|
-
rowExpand: EventEmitter<{
|
|
335
|
-
expanded: boolean;
|
|
336
|
-
record: Record<string, any>;
|
|
337
|
-
}>;
|
|
338
|
-
/**
|
|
339
|
-
* @detail {expandedRows:string[]| number[]}
|
|
340
|
-
* @description 展开的行变化时触发的事件,事件详情为当前展开的所有行的`rowKey`集合
|
|
341
|
-
*/
|
|
342
|
-
expandRowsChange: EventEmitter<{
|
|
343
|
-
expandedRows: React.Key[];
|
|
344
|
-
}>;
|
|
345
|
-
/**
|
|
346
|
-
* @detail {data:Record<string,any>[]}
|
|
347
|
-
* @description 表格行拖拽结束发生的事件,事件详情为拖拽后重新排序的所有行数据
|
|
348
|
-
*/
|
|
349
|
-
rowDrag: EventEmitter<{
|
|
350
|
-
data: Record<string, any>[];
|
|
351
|
-
info: TableDragInfo;
|
|
352
|
-
}>;
|
|
353
|
-
/**
|
|
354
|
-
* @description 表头过滤变化的事件
|
|
355
|
-
*/
|
|
356
|
-
columnFiltersUpdate: EventEmitter<Record<string, string[]>>;
|
|
357
|
-
/**
|
|
358
|
-
* @kind CustomColumn[]
|
|
359
|
-
* @required false
|
|
360
|
-
* @default -
|
|
361
|
-
* @description 扩展自 ant-design 的 Column 相关配置项,具体查阅:[Column](https://ant.design/components/table-cn/#Column)
|
|
362
|
-
* @group basic
|
|
363
|
-
*/
|
|
364
|
-
set columns(value: CustomColumn[]);
|
|
365
|
-
get columns(): CustomColumn[];
|
|
366
|
-
/**
|
|
367
|
-
* @kind any[]
|
|
368
|
-
* @required false
|
|
369
|
-
* @default -
|
|
370
|
-
* @description 数据源,通过 useResolves 从后台接口获取或者直接在 storyboard 中配置
|
|
371
|
-
* @group basic
|
|
372
|
-
*/
|
|
373
|
-
set dataSource(value: Record<string, any>[]);
|
|
374
|
-
/**
|
|
375
|
-
* @required false
|
|
376
|
-
* @default true
|
|
377
|
-
* @description 是否显示外层卡片
|
|
378
|
-
* @group basic
|
|
379
|
-
*/
|
|
380
|
-
showCard: boolean;
|
|
381
|
-
/**
|
|
382
|
-
* @required false
|
|
383
|
-
* @default -
|
|
384
|
-
* @description 表格行是否可选择,具体查阅:[rowSelection](https://ant.design/components/table-cn/#rowSelection)
|
|
385
|
-
* @group basic
|
|
386
|
-
*/
|
|
387
|
-
rowSelection: false | TableRowSelection<any>;
|
|
388
|
-
/**
|
|
389
|
-
* @required false
|
|
390
|
-
* @default "key"
|
|
391
|
-
* @description 指定每一行的 key,不指定则默认为索引 index。强烈建议设置该属性,否则在某些情况下可能行为不如预期。
|
|
392
|
-
* @group basic
|
|
393
|
-
*/
|
|
394
|
-
rowKey: string;
|
|
395
|
-
/**
|
|
396
|
-
* @required false
|
|
397
|
-
* @default -
|
|
398
|
-
* @description 隐藏相应列(输入对应的 dataIndex 或者 key 即可)
|
|
399
|
-
* @group basic
|
|
400
|
-
*/
|
|
401
|
-
hiddenColumns: Array<string | number>;
|
|
402
|
-
/**
|
|
403
|
-
* @required false
|
|
404
|
-
* @default false
|
|
405
|
-
* @description 是否显示已选择信息和清除按钮。仅在设置了`rowSelection`时有效。默认不显示
|
|
406
|
-
* @group rowSelection
|
|
407
|
-
*/
|
|
408
|
-
showSelectInfo: boolean;
|
|
409
|
-
/**
|
|
410
|
-
* @required false
|
|
411
|
-
* @default -
|
|
412
|
-
* @description 表头过滤的过滤项,key 为 column 的 dataIndex,value 为过滤值集合。
|
|
413
|
-
* @group paginationAndFilter
|
|
414
|
-
*/
|
|
415
|
-
filters: Record<string, string[]>;
|
|
416
|
-
/**
|
|
417
|
-
* @required false
|
|
418
|
-
* @default -
|
|
419
|
-
* @description ant-design 的 Table 相关配置项,具体查阅:[Table](https://ant.design/components/table-cn/#Table),其中分页配置和行选择配值在构件中设置了常用的默认配置,也可自行覆盖,具体描述见下表
|
|
420
|
-
* @group other
|
|
421
|
-
*/
|
|
422
|
-
configProps: any;
|
|
423
|
-
/**
|
|
424
|
-
* @required false
|
|
425
|
-
* @default -
|
|
426
|
-
* @description 被排序列的 dataIndex。通常来自于 url 参数,可以设置成 ${QUERY.sort}。
|
|
427
|
-
* @group paginationAndFilter
|
|
428
|
-
*/
|
|
429
|
-
sort: string;
|
|
430
|
-
/**
|
|
431
|
-
* @required false
|
|
432
|
-
* @default -
|
|
433
|
-
* @description 升序/降序,可以设置成 ${QUERY.order}。
|
|
434
|
-
* @group paginationAndFilter
|
|
435
|
-
*/
|
|
436
|
-
order: string | number;
|
|
437
|
-
/**
|
|
438
|
-
* @required false
|
|
439
|
-
* @default -
|
|
440
|
-
* @description 配置每一行是否禁用,其中 `field` 表示数据源中的字段路径, `value` 表示与其字段比较的值, `operator` 表示两者比较的方法,结果为 `true` 时会禁用当前行, 需要注意的是该配置需要在 `rowSelection: true` 的前提下使用,并且设置 `rowKey` 属性赋予每行唯一的 key,防止顺序变化时造成的错误勾选(如上 demo 所示)
|
|
441
|
-
* @group rowSelection
|
|
442
|
-
*/
|
|
443
|
-
rowDisabledConfig: RowDisabledProps | RowDisabledProps[];
|
|
444
|
-
/**
|
|
445
|
-
* @kind ExpandableConfig<Record<string, unknown>> | false
|
|
446
|
-
* @required false
|
|
447
|
-
* @default -
|
|
448
|
-
* @description 展开配置,详见 [expandable](https://4x.ant.design/components/table-cn/#expandable),为 false 时禁用展开
|
|
449
|
-
* @group expand
|
|
450
|
-
*/
|
|
451
|
-
expandable?: ExpandableConfig<Record<string, unknown>> | false;
|
|
452
|
-
/**
|
|
453
|
-
* @kind {useBrick:UseBrickConf}
|
|
454
|
-
* @required false
|
|
455
|
-
* @default -
|
|
456
|
-
* @description 自定义行展开的构件 [UseBrickConf](/next-docs/docs/api-reference/brick-types.usesinglebrickconf)
|
|
457
|
-
* @group expand
|
|
458
|
-
*/
|
|
459
|
-
expandedRowBrick: {
|
|
460
|
-
useBrick?: UseBrickConf;
|
|
461
|
-
};
|
|
462
|
-
/**
|
|
463
|
-
* @kind {useBrick:UseBrickConf}
|
|
464
|
-
* @required false
|
|
465
|
-
* @default -
|
|
466
|
-
* @description 自定义空状态的构件
|
|
467
|
-
* @group expand
|
|
468
|
-
*/
|
|
469
|
-
emptyUseBrick: {
|
|
470
|
-
useBrick?: UseBrickConf;
|
|
471
|
-
};
|
|
472
|
-
/**
|
|
473
|
-
* @kind { collapsedIcon: MenuIcon,expandedIcon: MenuIcon}
|
|
474
|
-
* @required false
|
|
475
|
-
* @default {collapsedIcon:{lib:'antd',icon:'down',theme:'outlined'},expandedIcon:{lib:'antd',icon:'right',theme:'outlined'}}
|
|
476
|
-
* @description 自定义展开图标。
|
|
477
|
-
* @group expand
|
|
478
|
-
*/
|
|
479
|
-
expandIcon: {
|
|
480
|
-
collapsedIcon: MenuIcon;
|
|
481
|
-
expandedIcon: MenuIcon;
|
|
482
|
-
};
|
|
483
|
-
/**
|
|
484
|
-
* @required false
|
|
485
|
-
* @default true
|
|
486
|
-
* @description 展开的图标是否为一个单元格,默认显示在第一列;设置为 false 的时候,可以通过`expandIconColumnIndex`属性设置展开的图标在哪一列
|
|
487
|
-
* @group expand
|
|
488
|
-
*/
|
|
489
|
-
expandIconAsCell: boolean;
|
|
490
|
-
/**
|
|
491
|
-
* @required false
|
|
492
|
-
* @default -
|
|
493
|
-
* @description 展开的图标显示在哪一列,如果没有 rowSelection,默认显示在第一列,否则显示在选择框后面。当`expandIconAsCell`为 false 时,该属性生效。
|
|
494
|
-
* @group expand
|
|
495
|
-
*/
|
|
496
|
-
expandIconColumnIndex: number;
|
|
497
|
-
/**
|
|
498
|
-
* @required false
|
|
499
|
-
* @default false
|
|
500
|
-
* @description 通过点击行来展开子行
|
|
501
|
-
* @group expand
|
|
502
|
-
*/
|
|
503
|
-
expandRowByClick: boolean;
|
|
504
|
-
/**
|
|
505
|
-
* @required false
|
|
506
|
-
* @default -
|
|
507
|
-
* @description 优化渲染的列(输入对应的 dataIndex),针对配置了 useBrick 的列。当前 antd 在更新 state 的时候,会全量渲染单元格,如果确定某一列在后续操作中不需要重新渲染,例如仅作为展示的单元格,可通过该属性设置以优化性能。注意,在树形表格中,当某一列内包含展开/收起按钮,则不应该设置该列。
|
|
508
|
-
* @group advanced
|
|
509
|
-
*/
|
|
510
|
-
optimizedColumns: Array<string | number>;
|
|
511
|
-
/**
|
|
512
|
-
* @default -
|
|
513
|
-
* @required false
|
|
514
|
-
* @description 设置容器空状态时显示`empty`构件属性
|
|
515
|
-
* @group ui
|
|
516
|
-
*/
|
|
517
|
-
wrapperConfig: BrickWrapperConfig;
|
|
518
|
-
/**
|
|
519
|
-
* @required false
|
|
520
|
-
* @default false
|
|
521
|
-
* @description 树形数据展示时是否需要去除空数组
|
|
522
|
-
* @group expand
|
|
523
|
-
*/
|
|
524
|
-
stripEmptyExpandableChildren: boolean;
|
|
525
|
-
/**
|
|
526
|
-
* @required false
|
|
527
|
-
* @default false
|
|
528
|
-
* @description 初始时,是否展开所有行
|
|
529
|
-
* @group expand
|
|
530
|
-
*/
|
|
531
|
-
defaultExpandAllRows: boolean;
|
|
532
|
-
/**
|
|
533
|
-
* @required false
|
|
534
|
-
* @default -
|
|
535
|
-
* @description 展开的行的 rowKey
|
|
536
|
-
* @group expand
|
|
537
|
-
*/
|
|
538
|
-
expandedRowKeys: string[];
|
|
539
|
-
/**
|
|
540
|
-
* @required false
|
|
541
|
-
* @default false
|
|
542
|
-
* @description 表格树形数据展示的时候,行选择父节点的时候是否同步勾选/取消勾选所有子节点,并且被同步勾选的子节点不能单独取消。注意,该属性必须设置 `rowKey` 属性。
|
|
543
|
-
* @group expand
|
|
544
|
-
*/
|
|
545
|
-
selectAllChildren: boolean;
|
|
546
|
-
/**
|
|
547
|
-
* @required false
|
|
548
|
-
* @default false
|
|
549
|
-
* @description 是否默认选择所有行。注意,该属性必须设置 `rowKey` 属性。
|
|
550
|
-
* @group expand
|
|
551
|
-
*/
|
|
552
|
-
defaultSelectAll: boolean;
|
|
553
|
-
/**
|
|
554
|
-
* @required false
|
|
555
|
-
* @default false
|
|
556
|
-
* @description 是否显示省略信息
|
|
557
|
-
* @group basic
|
|
558
|
-
*/
|
|
559
|
-
ellipsisInfo: boolean;
|
|
560
|
-
private _disabledChildrenKeys;
|
|
561
|
-
/**
|
|
562
|
-
* @required false
|
|
563
|
-
* @default children
|
|
564
|
-
* @description 指定树形结构的列名
|
|
565
|
-
* @group expand
|
|
566
|
-
*/
|
|
567
|
-
childrenColumnName: string;
|
|
568
|
-
/**
|
|
569
|
-
* @required false
|
|
570
|
-
* @default true
|
|
571
|
-
* @description 是否支持排序。默认开启,当对应列的sorter设置成true时则可排序。sortable为false时则排序都不生效。
|
|
572
|
-
* @group paginationAndFilter
|
|
573
|
-
*/
|
|
574
|
-
sortable: boolean;
|
|
575
|
-
/**
|
|
576
|
-
* @kind object
|
|
577
|
-
* @required false
|
|
578
|
-
* @default -
|
|
579
|
-
* @description 设置相关字段取自哪里,具体描述见下表
|
|
580
|
-
* @group advanced
|
|
581
|
-
*/
|
|
582
|
-
set fields(value: any);
|
|
583
|
-
/**
|
|
584
|
-
* @required false
|
|
585
|
-
* @default false
|
|
586
|
-
* @description 是否前端进行搜索,配合`presentational-bricks.brick-input`使用
|
|
587
|
-
* @group paginationAndFilter
|
|
588
|
-
*/
|
|
589
|
-
frontSearch: boolean;
|
|
590
|
-
/**
|
|
591
|
-
* @required false
|
|
592
|
-
* @default -
|
|
593
|
-
* @description 前端搜索参数
|
|
594
|
-
* @group paginationAndFilter
|
|
595
|
-
*/
|
|
596
|
-
frontSearchQuery: string;
|
|
597
|
-
/**
|
|
598
|
-
* @required false
|
|
599
|
-
* @default false
|
|
600
|
-
* @description 是否精确搜索
|
|
601
|
-
* @group paginationAndFilter
|
|
602
|
-
*/
|
|
603
|
-
exactSearch: boolean;
|
|
604
|
-
/**
|
|
605
|
-
* @required false
|
|
606
|
-
* @default -
|
|
607
|
-
* @description 进行前端搜索的字段,支持嵌套的写法如["name","value.a"],不配置的时候默认为对所有 columns 的 dataIndex[]进行前端搜索
|
|
608
|
-
* @group paginationAndFilter
|
|
609
|
-
*/
|
|
610
|
-
frontSearchFilterKeys: string[];
|
|
611
|
-
/**
|
|
612
|
-
* @required false
|
|
613
|
-
* @default -
|
|
614
|
-
* @description 页码。后台搜索的时候一般不需要配置,列表接口返回格式通常为{list:[],page:1,pageSize:10,total:20},即默认取自 page;前台搜索的时候,一般配置成 "${query.page=1|number}"
|
|
615
|
-
* @group paginationAndFilter
|
|
616
|
-
*/
|
|
617
|
-
page: number;
|
|
618
|
-
/**
|
|
619
|
-
* @required false
|
|
620
|
-
* @default -
|
|
621
|
-
* @description 页码条数。后台搜索的时候一般不需要配置,列表接口返回格式通常为{list:[],page:1,pageSize:10,total:20},即默认取自 pageSize/page_size;前台搜索的时候,一般配置成 "${query.pageSize=10|number}"
|
|
622
|
-
* @group paginationAndFilter
|
|
623
|
-
*/
|
|
624
|
-
pageSize: number;
|
|
625
|
-
/**
|
|
626
|
-
* @kind {
|
|
627
|
-
* x?: string | number | true;
|
|
628
|
-
* y?: number | string;
|
|
629
|
-
* } & {
|
|
630
|
-
* scrollToFirstRowOnChange?: boolean;
|
|
631
|
-
* }
|
|
632
|
-
* @required false
|
|
633
|
-
* @default { x: true }
|
|
634
|
-
* @description 表格是否可滚动,也可以指定滚动区域的宽、高,配置项。详见 [scroll](https://ant.design/components/table-cn/#scroll)
|
|
635
|
-
* @group other
|
|
636
|
-
*/
|
|
637
|
-
scrollConfigs: TableProps<unknown>["scroll"];
|
|
638
|
-
/**
|
|
639
|
-
* @required false
|
|
640
|
-
* @default "q"
|
|
641
|
-
* @description 把过滤条件更新到 url 时的字段名
|
|
642
|
-
* @group paginationAndFilter
|
|
643
|
-
*/
|
|
644
|
-
qField: string;
|
|
645
|
-
/**
|
|
646
|
-
* @required false
|
|
647
|
-
* @default false
|
|
648
|
-
* @description 表格行是否可拖拽,注意,如果是树形数据的表格,则各行需要设置__acceptType,并保证同层级的__acceptType值相同
|
|
649
|
-
* [ { id: "parent1", __acceptType: "level-1", children: [ { id: "sub1", __acceptType: "parent1-sub" }, { id: "sub2", __acceptType: "parent1-sub" } ] }, { id: "parent2", __acceptType: "level-1", children: [ { id: "sub3", __acceptType: "parent2-sub" } ] } ]
|
|
650
|
-
* @group basic
|
|
651
|
-
*/
|
|
652
|
-
tableDraggable: boolean;
|
|
653
|
-
/**
|
|
654
|
-
* @required false
|
|
655
|
-
* @default "DraggableBodyRow"
|
|
656
|
-
* @description 指定元素的类型,只有类型相同的元素才能进行drop操作
|
|
657
|
-
* @group basic
|
|
658
|
-
*/
|
|
659
|
-
acceptType: string;
|
|
660
|
-
/**
|
|
661
|
-
* @required false
|
|
662
|
-
* @default false
|
|
663
|
-
* @description 是否展示斑马纹
|
|
664
|
-
* @group ui
|
|
665
|
-
*/
|
|
666
|
-
zebraPattern: boolean;
|
|
667
|
-
/**
|
|
668
|
-
* @required false
|
|
669
|
-
* @default false
|
|
670
|
-
* @description 翻页时是否记住之前选中的项。注意,选中项的rowKey将保存在url中,如果不设置rowKey,该设置不生效。如果选择太多可能会造成url过长,请谨慎使用
|
|
671
|
-
* @group other
|
|
672
|
-
*/
|
|
673
|
-
storeCheckedByUrl: boolean;
|
|
674
|
-
/**
|
|
675
|
-
* @required false
|
|
676
|
-
* @default -
|
|
677
|
-
* @description 额外的行,通常为跨页勾选时,不在当前页的行
|
|
678
|
-
* @group other
|
|
679
|
-
*/
|
|
680
|
-
extraRows: Record<string, unknown>[];
|
|
681
|
-
/**
|
|
682
|
-
* @required false
|
|
683
|
-
* @default false
|
|
684
|
-
* @description [已废弃]请用 tableDraggable 代替
|
|
685
|
-
* @group other
|
|
686
|
-
*/
|
|
687
|
-
draggable: boolean;
|
|
688
|
-
/**
|
|
689
|
-
* @required false
|
|
690
|
-
* @default false
|
|
691
|
-
* @description 当所有子节点选中时,自动选中父节点
|
|
692
|
-
* @group expand
|
|
693
|
-
*/
|
|
694
|
-
autoSelectParentWhenAllChildrenSelected: boolean;
|
|
695
|
-
/**
|
|
696
|
-
* @required -
|
|
697
|
-
* @default -
|
|
698
|
-
* @description 表格表头是否透明
|
|
699
|
-
* @group ui
|
|
700
|
-
*/
|
|
701
|
-
thTransparent: boolean;
|
|
702
|
-
/**
|
|
703
|
-
* @required false
|
|
704
|
-
* @default true
|
|
705
|
-
* @description 是否显示表头
|
|
706
|
-
* @group ui
|
|
707
|
-
*/
|
|
708
|
-
showHeader: boolean;
|
|
709
|
-
/**
|
|
710
|
-
* @required false
|
|
711
|
-
* @default -
|
|
712
|
-
* @description 是否显示分页
|
|
713
|
-
* @group paginationAndFilter
|
|
714
|
-
*/
|
|
715
|
-
pagination: false | TablePaginationConfig;
|
|
716
|
-
/**
|
|
717
|
-
* @required false
|
|
718
|
-
* @default -
|
|
719
|
-
* @description 表格大小(antd原生size)
|
|
720
|
-
* @group ui
|
|
721
|
-
*/
|
|
722
|
-
size: SizeType | "x-small";
|
|
723
|
-
/**
|
|
724
|
-
* @required false
|
|
725
|
-
* @default -
|
|
726
|
-
* @description 选框类型(单选/多选)
|
|
727
|
-
* @group rowSelection
|
|
728
|
-
*/
|
|
729
|
-
type: RowSelectionType;
|
|
730
|
-
/**
|
|
731
|
-
* @required false
|
|
732
|
-
* @default true
|
|
733
|
-
* @description 是否更新 url 参数。设置为否之后,如果是后台进行分页/排序等功能,则需要结合事件进行编排。如果是前台进行分页/排序,则不需要。
|
|
734
|
-
* @group other
|
|
735
|
-
*/
|
|
736
|
-
shouldUpdateUrlParams: boolean;
|
|
737
|
-
/**
|
|
738
|
-
* @required false
|
|
739
|
-
* @default true
|
|
740
|
-
* @description 更新 url 参数时是否触发页面重新渲染。仅在`shouldUpdateUrlParams`为true时有效。
|
|
741
|
-
* @group other
|
|
742
|
-
*/
|
|
743
|
-
shouldRenderWhenUrlParamsUpdate: boolean;
|
|
744
|
-
get processedDataSource(): Record<string, any>[];
|
|
745
|
-
get processConfigProps(): any;
|
|
746
|
-
get processedColumns(): CustomColumn[];
|
|
747
|
-
private _originalDataSource;
|
|
748
|
-
private _dataSource;
|
|
749
|
-
private _pureSource;
|
|
750
|
-
private _columns;
|
|
751
|
-
private _finalConfigProps;
|
|
752
|
-
private _error;
|
|
753
|
-
private _total;
|
|
754
|
-
private _selectUpdateEventName;
|
|
755
|
-
private _selectUpdateEventDetailKeys;
|
|
756
|
-
private _selectUpdateEventDetailField;
|
|
757
|
-
private _selectUpdateEventDetailExtra;
|
|
758
|
-
private _fields;
|
|
759
|
-
/**
|
|
760
|
-
* @default []
|
|
761
|
-
* @required false
|
|
762
|
-
* @description 指定选中项的 key 数组
|
|
763
|
-
* @group rowSelection
|
|
764
|
-
*/
|
|
765
|
-
selectedRowKeys: React.Key[];
|
|
766
|
-
/**
|
|
767
|
-
* @required false
|
|
768
|
-
* @default false
|
|
769
|
-
* @description 是否显示展开全部
|
|
770
|
-
* @group other
|
|
771
|
-
*/
|
|
772
|
-
showHeaderExpandAll: boolean;
|
|
773
|
-
/**
|
|
774
|
-
* @required false
|
|
775
|
-
* @default -
|
|
776
|
-
* @description 列的 key 与对应构件配置的 map。一般在 columns 属性需要动态生成,且希望自定义列的构件(columns.useBrick)时使用。
|
|
777
|
-
* @group advanced
|
|
778
|
-
*/
|
|
779
|
-
columnKeyBrickMap: Record<string, {
|
|
780
|
-
useBrick: UseBrickConf;
|
|
781
|
-
}>;
|
|
782
|
-
private _selected;
|
|
783
|
-
private _selectedRow;
|
|
784
|
-
private _selectedRows;
|
|
785
|
-
private _allChildren;
|
|
786
|
-
private _isInSelect;
|
|
787
|
-
connectedCallback(): void;
|
|
788
|
-
disconnectedCallback(): void;
|
|
789
|
-
/**
|
|
790
|
-
* @description 搜索过滤
|
|
791
|
-
*/
|
|
792
|
-
filterSourceData(event: CustomEvent): void;
|
|
793
|
-
handleFrontendDataChange(data?: Record<string, any>[], columns?: CustomColumn[]): Record<string, any>[];
|
|
794
|
-
handleFrontendFilterSource(data: Record<string, any>[], q: string, columns: CustomColumn[], filterKeys?: DataIndex[]): Record<string, any>[];
|
|
795
|
-
private _getRowKey;
|
|
796
|
-
private _findParentByChildKeyValue;
|
|
797
|
-
private _findSelectedRowsByRowKeys;
|
|
798
|
-
private _handleRowSelectChange;
|
|
799
|
-
private _getSelectedRowsWithChildren;
|
|
800
|
-
private _handleOnSelect;
|
|
801
|
-
private _handleSelectAll;
|
|
802
|
-
private _getCheckedFromUrl;
|
|
803
|
-
private _updateUrlChecked;
|
|
804
|
-
private _handleOnChange;
|
|
805
|
-
private renderSelectInfo;
|
|
806
|
-
private handleFrontendSorter;
|
|
807
|
-
private handleFrontendFilters;
|
|
808
|
-
private frontendSearch;
|
|
809
|
-
private _handleOnExpand;
|
|
810
|
-
private _handleOnExpandedRowsChange;
|
|
811
|
-
private _handleOnDrag;
|
|
812
|
-
/**
|
|
813
|
-
* @description 展开所有行
|
|
814
|
-
*/
|
|
815
|
-
expandAll(): void;
|
|
816
|
-
getModifyColumns(): CustomColumn[];
|
|
817
|
-
protected _render(): void;
|
|
818
|
-
private _getAllRows;
|
|
819
|
-
private _handleDefaultSelectAll;
|
|
820
|
-
private _initConfigProps;
|
|
821
|
-
_test_only_getOriginalDataSource(): Record<string, any>[];
|
|
822
|
-
updateData(event: CustomEvent): void;
|
|
823
|
-
updateError(event: CustomEvent): void;
|
|
824
|
-
set selectUpdateEventName(value: string);
|
|
825
|
-
set selectUpdateEventDetailKeys(value: string[]);
|
|
826
|
-
set selectUpdateEventDetailField(value: string);
|
|
827
|
-
set selectUpdateEventDetailExtra(value: any);
|
|
828
|
-
}
|