@canvas-components/list-table 0.3.17 → 0.3.19
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/README.md +112 -0
- package/dist/index.cjs +12715 -11873
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +123 -17
- package/dist/index.d.ts +123 -17
- package/dist/index.js +12701 -11859
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import { CanvasScrollbarOptions, XlsxExportOptions } from '@canvas-components/utils';
|
|
2
2
|
export { CanvasScrollbarAxisOptions as ListTableScrollbarAxisOptions } from '@canvas-components/utils';
|
|
3
|
-
import { CanvasChartSparklineOption } from '@canvas-components/chart';
|
|
3
|
+
import { CanvasChartPieOption, CanvasChartRadarOption, CanvasChartGaugeOption, CanvasChartSparklineOption } from '@canvas-components/chart';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* 排序状态。
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
key: string | null;
|
|
10
|
-
order: "ascend" | "descend" | null;
|
|
11
|
-
}
|
|
8
|
+
type ListTableSortState = ListTableSortItem[];
|
|
12
9
|
/**
|
|
13
10
|
* 多列排序项。
|
|
14
11
|
*/
|
|
15
12
|
interface ListTableSortItem {
|
|
16
13
|
key: string;
|
|
17
14
|
order: "ascend" | "descend";
|
|
18
|
-
|
|
15
|
+
/** 配置了多列排序时的优先级;未配置表示单列排序。 */
|
|
16
|
+
priority?: number;
|
|
19
17
|
}
|
|
20
18
|
/**
|
|
21
19
|
* 过滤匹配模式。
|
|
@@ -174,7 +172,7 @@ interface ListTableQueryChangeExtra<RecordType> {
|
|
|
174
172
|
filteredDataSource: RecordType[];
|
|
175
173
|
rawFilters: ListTableFilterState;
|
|
176
174
|
sorter: ListTableSortState;
|
|
177
|
-
sorters
|
|
175
|
+
sorters: ListTableSortItem[];
|
|
178
176
|
}
|
|
179
177
|
|
|
180
178
|
/**
|
|
@@ -293,6 +291,37 @@ interface ListTableDebugSnapshot {
|
|
|
293
291
|
hitTest?: DebugHitTestResult;
|
|
294
292
|
}
|
|
295
293
|
|
|
294
|
+
/** 可单独控制持久化的表格配置;列设置及条件格式使用各自已有开关。 */
|
|
295
|
+
type ListTableCacheCategory = "sort" | "filter" | "summary" | "alignment" | "dataFormat" | "density" | "zoom";
|
|
296
|
+
/** 未指定的缓存类别默认开启,持久化需要 storageKey。 */
|
|
297
|
+
type ListTableCachePreferences = Partial<Record<ListTableCacheCategory, boolean>>;
|
|
298
|
+
|
|
299
|
+
/** 当前列原始值的条件比较方式。 */
|
|
300
|
+
type ListTableConditionalOperator = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "between" | "contains" | "empty" | "notEmpty";
|
|
301
|
+
/** 当前列的一项比较条件。 */
|
|
302
|
+
interface ListTableConditionalFormatCondition {
|
|
303
|
+
/** 与上一条件的关系;首项忽略。且优先于或,未指定时兼容规则的统一关系。 */
|
|
304
|
+
relation?: "and" | "or";
|
|
305
|
+
operator: ListTableConditionalOperator;
|
|
306
|
+
value?: string | number;
|
|
307
|
+
endValue?: string | number;
|
|
308
|
+
}
|
|
309
|
+
/** 条件格式规则,按数组顺序匹配,首条命中的背景生效。 */
|
|
310
|
+
interface ListTableConditionalFormatRule {
|
|
311
|
+
id: string;
|
|
312
|
+
name?: string;
|
|
313
|
+
/** 兼容旧版单条件配置;conditions 存在时优先采用条件列表。 */
|
|
314
|
+
operator?: ListTableConditionalOperator;
|
|
315
|
+
value?: string | number;
|
|
316
|
+
endValue?: string | number;
|
|
317
|
+
conditions?: ListTableConditionalFormatCondition[];
|
|
318
|
+
/** 兼容旧版统一关系;各条件的 relation 优先,默认且。 */
|
|
319
|
+
conditionRelation?: "and" | "or";
|
|
320
|
+
backgroundColor: string;
|
|
321
|
+
/** 命中规则时的单元格文本颜色。 */
|
|
322
|
+
textColor: string;
|
|
323
|
+
}
|
|
324
|
+
|
|
296
325
|
/** Canvas 区域支持的 CSS 属性。长度支持数字(px)或 px 字符串,padding 支持 1~2 值。 */
|
|
297
326
|
interface ListTableCSSProperties {
|
|
298
327
|
backgroundColor?: string;
|
|
@@ -379,6 +408,13 @@ interface ListTableTheme {
|
|
|
379
408
|
headerFontWeight: string;
|
|
380
409
|
}
|
|
381
410
|
|
|
411
|
+
/** 排序配置;compare 按升序返回负数、零、正数,降序由表格自动反转。 */
|
|
412
|
+
type ListTableSorter<RecordType> = boolean | {
|
|
413
|
+
/** 多列排序优先级,数值越大越优先。 */
|
|
414
|
+
multiple?: number;
|
|
415
|
+
/** 自定义记录比较,优先于 sortValueGetter;大数据使用主线程可取消分片。 */
|
|
416
|
+
compare?: (a: RecordType, b: RecordType) => number;
|
|
417
|
+
};
|
|
382
418
|
/**
|
|
383
419
|
* 汇总类型说明:
|
|
384
420
|
* - `sum`:对当前列做求和
|
|
@@ -431,6 +467,8 @@ interface ListTableSummaryConfig<RecordType = Record<string, unknown>> {
|
|
|
431
467
|
roundingMode?: ListTableSummaryRoundingMode;
|
|
432
468
|
/** 是否保留精度补齐产生的无效零,默认不保留。 */
|
|
433
469
|
preserveTrailingZeros?: boolean;
|
|
470
|
+
/** 是否展示“求和: ”等汇总方式前缀,默认开启。 */
|
|
471
|
+
showTypePrefix?: boolean;
|
|
434
472
|
}
|
|
435
473
|
/**
|
|
436
474
|
* 路径索引定义。
|
|
@@ -461,7 +499,7 @@ type ListTableSparklineSize = "small" | "medium" | number | [number, number] | {
|
|
|
461
499
|
width?: number;
|
|
462
500
|
height?: number;
|
|
463
501
|
};
|
|
464
|
-
type ListTableChartType = "sparkline" | (string & {});
|
|
502
|
+
type ListTableChartType = "sparkline" | "pie" | "radar" | "gauge" | (string & {});
|
|
465
503
|
type ListTableChartSize = ListTableSparklineSize;
|
|
466
504
|
type ListTableRateSize = "small" | "medium" | "large" | number;
|
|
467
505
|
type ListTableRateSymbolType = "star" | "sun" | "moon";
|
|
@@ -628,6 +666,8 @@ interface ListTableBaseChartCellContent<RecordType = any, ChartType extends stri
|
|
|
628
666
|
/** 是否允许点击预览,默认开启。 */
|
|
629
667
|
preview?: boolean;
|
|
630
668
|
chartType: ChartType;
|
|
669
|
+
/** 仅保留主要图形;折线图只绘制折线。 */
|
|
670
|
+
simple?: boolean;
|
|
631
671
|
option: Option;
|
|
632
672
|
size?: ListTableChartSize;
|
|
633
673
|
}
|
|
@@ -644,6 +684,8 @@ interface ListTableSparklineChartCellContent<RecordType = any> extends ListTable
|
|
|
644
684
|
/** 是否允许点击预览,默认开启。 */
|
|
645
685
|
preview?: boolean;
|
|
646
686
|
chartType: "sparkline";
|
|
687
|
+
/** 仅绘制折线或柱体,隐藏坐标轴、图例等辅助元素。 */
|
|
688
|
+
simple?: boolean;
|
|
647
689
|
option?: CanvasChartSparklineOption;
|
|
648
690
|
values?: number[];
|
|
649
691
|
min?: number;
|
|
@@ -660,7 +702,13 @@ interface ListTableSparklineChartCellContent<RecordType = any> extends ListTable
|
|
|
660
702
|
/**
|
|
661
703
|
* 单元格图表片段。
|
|
662
704
|
*/
|
|
663
|
-
type
|
|
705
|
+
type ListTablePieChartCellContent<RecordType = any> = ListTableBaseChartCellContent<RecordType, "pie", CanvasChartPieOption>;
|
|
706
|
+
/** 单元格雷达图配置。 */
|
|
707
|
+
type ListTableRadarChartCellContent<RecordType = any> = ListTableBaseChartCellContent<RecordType, "radar", CanvasChartRadarOption>;
|
|
708
|
+
/** 单元格仪表盘配置。 */
|
|
709
|
+
type ListTableGaugeChartCellContent<RecordType = any> = ListTableBaseChartCellContent<RecordType, "gauge", CanvasChartGaugeOption>;
|
|
710
|
+
/** 单元格内置及自定义图表。 */
|
|
711
|
+
type ListTableChartCellContent<RecordType = any> = ListTablePieChartCellContent<RecordType> | ListTableRadarChartCellContent<RecordType> | ListTableGaugeChartCellContent<RecordType> | ListTableSparklineChartCellContent<RecordType> | ListTableCustomChartCellContent<RecordType>;
|
|
664
712
|
/**
|
|
665
713
|
* 单元格评分片段。
|
|
666
714
|
*/
|
|
@@ -813,6 +861,8 @@ interface ListTableNestedTableColumn {
|
|
|
813
861
|
formItemProps?: ListTableFormItemProps<Record<string, unknown>>;
|
|
814
862
|
fixed?: "left" | "right";
|
|
815
863
|
allowSort?: boolean;
|
|
864
|
+
/** 配置 multiple 开启多列排序,数值越大优先级越高。 */
|
|
865
|
+
sorter?: ListTableSorter<Record<string, unknown>>;
|
|
816
866
|
sortValueGetter?: (record: Record<string, unknown>) => string | number | null | undefined;
|
|
817
867
|
defaultSortOrder?: "ascend" | "descend";
|
|
818
868
|
allowFilter?: boolean;
|
|
@@ -869,13 +919,17 @@ type ListTableCellRender<RecordType> = (value: unknown, record: RecordType, rowI
|
|
|
869
919
|
*
|
|
870
920
|
* 采用可扩展枚举,便于后续继续补充原生编辑器实现。
|
|
871
921
|
*/
|
|
872
|
-
type ListTableEditValueType = "text" | "number" | "input-range" | "year" | "quarter" | "month" | "time" | "datetime" | "timerange" | "date" | "date-range" | "datetime-range" | "color" | "select" | "auto-complete";
|
|
922
|
+
type ListTableEditValueType = "text" | "number" | "input-range" | "year" | "quarter" | "month" | "time" | "datetime" | "timerange" | "date" | "date-range" | "datetime-range" | "color" | "select" | "cascader" | "auto-complete";
|
|
873
923
|
/**
|
|
874
924
|
* 下拉编辑选项。
|
|
875
925
|
*/
|
|
876
926
|
interface ListTableEditOption {
|
|
877
927
|
label: string;
|
|
878
928
|
value: string | number;
|
|
929
|
+
/** 是否禁用该选项及其下级。 */
|
|
930
|
+
disabled?: boolean;
|
|
931
|
+
/** Cascader 的下级选项。 */
|
|
932
|
+
children?: ListTableEditOption[];
|
|
879
933
|
}
|
|
880
934
|
/**
|
|
881
935
|
* 下拉编辑选项过滤函数。
|
|
@@ -900,6 +954,14 @@ interface ListTableFormItemPropsConfig<RecordType = Record<string, unknown>> {
|
|
|
900
954
|
max?: number | string;
|
|
901
955
|
step?: number | string;
|
|
902
956
|
options?: ListTableEditOption[];
|
|
957
|
+
/** Cascader 是否允许选择非末级,默认 false。 */
|
|
958
|
+
changeOnSelect?: boolean;
|
|
959
|
+
/** Cascader 展开下级的方式,默认 click。 */
|
|
960
|
+
expandTrigger?: "click" | "hover";
|
|
961
|
+
/** Cascader 是否允许清空,默认 true。 */
|
|
962
|
+
allowClear?: boolean;
|
|
963
|
+
/** Cascader 路径显示文本,默认使用 / 分隔。 */
|
|
964
|
+
displayRender?: (labels: string[], selectedOptions: ListTableEditOption[]) => string;
|
|
903
965
|
/** 是否开启下拉选项搜索。 */
|
|
904
966
|
showSearch?: boolean;
|
|
905
967
|
/** 自定义下拉选项过滤逻辑,仅在开启搜索时生效。 */
|
|
@@ -965,7 +1027,8 @@ interface ListTableColumn<RecordType = Record<string, unknown>> {
|
|
|
965
1027
|
allowSort?: boolean;
|
|
966
1028
|
sortValueGetter?: (record: RecordType) => string | number | null | undefined;
|
|
967
1029
|
defaultSortOrder?: "ascend" | "descend";
|
|
968
|
-
|
|
1030
|
+
/** 配置 multiple 开启多列排序,数值越大优先级越高。 */
|
|
1031
|
+
sorter?: ListTableSorter<RecordType>;
|
|
969
1032
|
allowFilter?: boolean;
|
|
970
1033
|
filterModes?: Array<"fuzzy" | "exact">;
|
|
971
1034
|
filterValueGetter?: (record: RecordType) => unknown;
|
|
@@ -985,6 +1048,10 @@ interface ListTableColumn<RecordType = Record<string, unknown>> {
|
|
|
985
1048
|
moneyFormat?: ListTableMoneyFormatOptions;
|
|
986
1049
|
/** 通过列设置覆盖的数据显示格式。 */
|
|
987
1050
|
dataFormat?: ListTableDataFormat;
|
|
1051
|
+
/** 仅当前列数据单元格生效的条件背景规则,首条命中优先。 */
|
|
1052
|
+
conditionalFormats?: ListTableConditionalFormatRule[];
|
|
1053
|
+
/** 是否缓存当前列条件格式,默认开启;持久化需要 storageKey。 */
|
|
1054
|
+
cacheConditionalFormats?: boolean;
|
|
988
1055
|
headerStyle?: ListTableCellStyle;
|
|
989
1056
|
/** 汇总单元格样式,优先于表格 styles.summary。 */
|
|
990
1057
|
summaryStyle?: ListTableCellStyle;
|
|
@@ -1118,6 +1185,11 @@ interface HeaderContextMenuColumnItem {
|
|
|
1118
1185
|
}
|
|
1119
1186
|
type HeaderContextMenuDensity = "comfortable" | "middle" | "compact" | "ultra-compact" | "auto";
|
|
1120
1187
|
interface HeaderContextMenuConfig {
|
|
1188
|
+
conditionalFormats?: ListTableConditionalFormatRule[];
|
|
1189
|
+
cacheConditionalFormats?: boolean;
|
|
1190
|
+
/** 是否已配置持久化存储标识。 */
|
|
1191
|
+
conditionalFormatCacheAvailable?: boolean;
|
|
1192
|
+
onChangeConditionalFormats?: (rules: ListTableConditionalFormatRule[], cache?: boolean) => void;
|
|
1121
1193
|
x: number;
|
|
1122
1194
|
y: number;
|
|
1123
1195
|
columns?: HeaderContextMenuColumnItem[];
|
|
@@ -1131,6 +1203,10 @@ interface HeaderContextMenuConfig {
|
|
|
1131
1203
|
onCopyRowText?: () => void;
|
|
1132
1204
|
onCopyRowJson?: () => void;
|
|
1133
1205
|
onCopySelection?: () => void;
|
|
1206
|
+
/** 复制表格为 PNG 图片。 */
|
|
1207
|
+
onCopyImage?: (scope: "all" | "selection" | "viewport") => void;
|
|
1208
|
+
onExportImage?: (scope: "all" | "selection" | "viewport") => void;
|
|
1209
|
+
canCopySelectionImage?: boolean;
|
|
1134
1210
|
onOpenSearch?: () => void;
|
|
1135
1211
|
customSelection?: {
|
|
1136
1212
|
startRow: number;
|
|
@@ -1184,6 +1260,11 @@ interface HeaderContextMenuConfig {
|
|
|
1184
1260
|
*/
|
|
1185
1261
|
onChangeZoom?: (zoom: number) => void;
|
|
1186
1262
|
onToggleColumn?: (columnKey: string, visible: boolean) => void;
|
|
1263
|
+
cacheColumnSettings?: boolean;
|
|
1264
|
+
columnSettingsCacheAvailable?: boolean;
|
|
1265
|
+
onChangeColumnSettingsCache?: (enabled: boolean) => void;
|
|
1266
|
+
cachePreferences?: ListTableCachePreferences;
|
|
1267
|
+
onChangeCachePreference?: (category: ListTableCacheCategory, enabled: boolean) => void;
|
|
1187
1268
|
alignment?: {
|
|
1188
1269
|
headerHorizontal: ListTableHorizontalAlign;
|
|
1189
1270
|
headerVertical: "top" | "middle" | "bottom";
|
|
@@ -1200,6 +1281,7 @@ interface HeaderContextMenuConfig {
|
|
|
1200
1281
|
summaryPrecision?: number;
|
|
1201
1282
|
summaryRoundingMode?: ListTableSummaryRoundingMode;
|
|
1202
1283
|
summaryPreserveTrailingZeros?: boolean;
|
|
1284
|
+
summaryShowTypePrefix?: boolean;
|
|
1203
1285
|
onToggleSummary?: () => void;
|
|
1204
1286
|
onChangeSummaryTitle?: (title: string) => void;
|
|
1205
1287
|
onClearSummary?: () => void;
|
|
@@ -1207,6 +1289,7 @@ interface HeaderContextMenuConfig {
|
|
|
1207
1289
|
onChangeSummaryPrecision?: (precision: number | undefined) => void;
|
|
1208
1290
|
onChangeSummaryRoundingMode?: (mode: ListTableSummaryRoundingMode) => void;
|
|
1209
1291
|
onChangeSummaryPreserveTrailingZeros?: (value: boolean) => void;
|
|
1292
|
+
onChangeSummaryShowTypePrefix?: (value: boolean) => void;
|
|
1210
1293
|
onClose: () => void;
|
|
1211
1294
|
}
|
|
1212
1295
|
interface ListTableSearchRequest {
|
|
@@ -1234,10 +1317,14 @@ interface PaginationConfig {
|
|
|
1234
1317
|
onChange?: (page: number, pageSize: number) => void;
|
|
1235
1318
|
onPageSizeChange?: (page: number, pageSize: number) => void;
|
|
1236
1319
|
}
|
|
1237
|
-
type ListTableEditorValueType = "text" | "number" | "input-range" | "year" | "quarter" | "month" | "time" | "datetime" | "timerange" | "date" | "date-range" | "datetime-range" | "color" | "select" | "auto-complete";
|
|
1320
|
+
type ListTableEditorValueType = "text" | "number" | "input-range" | "year" | "quarter" | "month" | "time" | "datetime" | "timerange" | "date" | "date-range" | "datetime-range" | "color" | "select" | "cascader" | "auto-complete";
|
|
1238
1321
|
interface ListTableEditorOption {
|
|
1239
1322
|
label: string;
|
|
1240
1323
|
value: string | number;
|
|
1324
|
+
/** 是否禁用该选项及其下级。 */
|
|
1325
|
+
disabled?: boolean;
|
|
1326
|
+
/** Cascader 的下级选项。 */
|
|
1327
|
+
children?: ListTableEditorOption[];
|
|
1241
1328
|
}
|
|
1242
1329
|
type ListTableEditorFilterOption = (input: string, option: ListTableEditorOption) => boolean;
|
|
1243
1330
|
/**
|
|
@@ -1252,6 +1339,14 @@ interface ListTableEditorConfig {
|
|
|
1252
1339
|
max?: number | string;
|
|
1253
1340
|
step?: number | string;
|
|
1254
1341
|
options?: ListTableEditorOption[];
|
|
1342
|
+
/** Cascader 是否允许选择非末级。 */
|
|
1343
|
+
changeOnSelect?: boolean;
|
|
1344
|
+
/** Cascader 展开下级的方式。 */
|
|
1345
|
+
expandTrigger?: "click" | "hover";
|
|
1346
|
+
/** Cascader 是否允许清空。 */
|
|
1347
|
+
allowClear?: boolean;
|
|
1348
|
+
/** Cascader 路径显示文本。 */
|
|
1349
|
+
displayRender?: (labels: string[], selectedOptions: ListTableEditorOption[]) => string;
|
|
1255
1350
|
showSearch?: boolean;
|
|
1256
1351
|
filterOption?: ListTableEditorFilterOption;
|
|
1257
1352
|
onPressEnter?: ListTableEditorAutoCompleteEnter;
|
|
@@ -1505,7 +1600,7 @@ type ListTableHighlightMode = "cell" | "row" | "column" | "cross";
|
|
|
1505
1600
|
/**
|
|
1506
1601
|
* 右键菜单功能项。
|
|
1507
1602
|
*/
|
|
1508
|
-
type ListTableContextMenuFeature = "copy" | "search" | "export" | "downloadContent" | "rowCollapse" | "columnCollapse" | "freeze" | "reset" | "sort" | "density" | "zoom" | "columnWidth" | "alignment" | "dataFormat" | "grouping" | "columnVisibility";
|
|
1603
|
+
type ListTableContextMenuFeature = "copy" | "search" | "export" | "downloadContent" | "rowCollapse" | "columnCollapse" | "freeze" | "reset" | "sort" | "density" | "zoom" | "columnWidth" | "alignment" | "dataFormat" | "conditionalFormat" | "cache" | "grouping" | "columnVisibility";
|
|
1509
1604
|
/**
|
|
1510
1605
|
* 数据分组配置。
|
|
1511
1606
|
*/
|
|
@@ -1639,9 +1734,10 @@ type ListTableServerSummaryValues = ReadonlyMap<string, string | number | bigint
|
|
|
1639
1734
|
* AntD 风格的排序结果。
|
|
1640
1735
|
*/
|
|
1641
1736
|
interface ListTableQuerySorter {
|
|
1642
|
-
columnKey: string
|
|
1737
|
+
columnKey: string;
|
|
1643
1738
|
field?: TableColumnDataIndex;
|
|
1644
|
-
order:
|
|
1739
|
+
order: "ascend" | "descend";
|
|
1740
|
+
priority?: number;
|
|
1645
1741
|
}
|
|
1646
1742
|
/**
|
|
1647
1743
|
* 分页配置。
|
|
@@ -1705,7 +1801,7 @@ interface ListTableRowSelectionOptions<RecordType> {
|
|
|
1705
1801
|
/**
|
|
1706
1802
|
* AntD 风格的四参数查询回调。
|
|
1707
1803
|
*/
|
|
1708
|
-
type ListTableQueryChange<RecordType> = (pagination: ListTableQueryPagination, filters: ListTableQueryFilters, sorter: ListTableQuerySorter, extra: ListTableQueryChangeExtra<RecordType>) => void;
|
|
1804
|
+
type ListTableQueryChange<RecordType> = (pagination: ListTableQueryPagination, filters: ListTableQueryFilters, sorter: ListTableQuerySorter[], extra: ListTableQueryChangeExtra<RecordType>) => void;
|
|
1709
1805
|
/** 本地查询失败通知。 */
|
|
1710
1806
|
interface ListTableQueryErrorInfo {
|
|
1711
1807
|
/** 失败的查询动作。 */
|
|
@@ -1821,6 +1917,10 @@ interface ListTableUiOptions {
|
|
|
1821
1917
|
onDangerConfirmRequest?: (request: ListTableDangerConfirmRequest | null) => void;
|
|
1822
1918
|
/** 持久化配置或内部操作改变表格密度时通知适配层。 */
|
|
1823
1919
|
onDensityChange?: (density: 26 | 32 | 48 | 56 | "auto") => void;
|
|
1920
|
+
/** 同步列设置缓存开关。 */
|
|
1921
|
+
onColumnSettingsCacheChange?: (enabled: boolean) => void;
|
|
1922
|
+
/** 同步各类配置的缓存偏好。 */
|
|
1923
|
+
onCachePreferencesChange?: (preferences: ListTableCachePreferences) => void;
|
|
1824
1924
|
}
|
|
1825
1925
|
/**
|
|
1826
1926
|
* 行选择器配置。
|
|
@@ -1932,6 +2032,10 @@ interface ListTableOptions<RecordType = Record<string, unknown>> {
|
|
|
1932
2032
|
* 分页尺寸单独保存到 localStorage,初始化时恢复;显式 pagination.pageSize 优先于缓存。
|
|
1933
2033
|
*/
|
|
1934
2034
|
storageKey?: string;
|
|
2035
|
+
/** 是否缓存列宽、显隐、固定与顺序,默认开启;需要 storageKey。 */
|
|
2036
|
+
cacheColumnSettings?: boolean;
|
|
2037
|
+
/** 分类缓存开关;不影响当前展示,只控制保存与刷新恢复。 */
|
|
2038
|
+
cachePreferences?: ListTableCachePreferences;
|
|
1935
2039
|
/**
|
|
1936
2040
|
* 受控列设置的修订号。修订号变化时以当前传入的列配置为准并写回持久化存储。
|
|
1937
2041
|
*
|
|
@@ -2067,6 +2171,8 @@ declare class ListTable<RecordType = Record<string, unknown>> {
|
|
|
2067
2171
|
* 设置并持久化内置表格密度。
|
|
2068
2172
|
*/
|
|
2069
2173
|
changeDensity(density: ListTableDensity): void;
|
|
2174
|
+
/** 设置列设置缓存开关,不改变当前列展示。 */
|
|
2175
|
+
setColumnSettingsCache(enabled: boolean): void;
|
|
2070
2176
|
/**
|
|
2071
2177
|
* 销毁实例。
|
|
2072
2178
|
*/
|
|
@@ -2139,4 +2245,4 @@ interface ListTableValidationTarget {
|
|
|
2139
2245
|
columnKey: string;
|
|
2140
2246
|
}
|
|
2141
2247
|
|
|
2142
|
-
export { type CreateCellEditorSessionParams, type DebugHitTestResult, EXPAND_COLUMN, type FilterPanelConfig, type FilterPanelOptionItem, type FilterPanelTexts, type FixedPopupConfig, type HeaderContextMenuColumnItem, type HeaderContextMenuConfig, type HeaderContextMenuDensity, ListTable, type ListTableAutoMergeRule, type ListTableBarcodeCellContent, type ListTableBarcodeFormat, type ListTableButtonCellContent, type ListTableButtonPopconfirmOptions, type ListTableButtonSize, type ListTableButtonType, type ListTableCSSProperties, type ListTableCarouselScrollOptions, type ListTableCellContent, type ListTableCellContentClickContext, type ListTableCellEditorSession, type ListTableCellSpan, type ListTableCellStyle, type ListTableChartCellContent, type ListTableChartSize, type ListTableChartType, type ListTableColorCellContent, type ListTableColumn, type ListTableContextMenuFeature, type ListTableContextMenuOptions, type ListTableCustomChartCellContent, type ListTableDangerConfirmRequest, type ListTableDataFormat, type ListTableDataFormatOptions, type ListTableDataFormatType, type ListTableDebugOptions, type ListTableDebugSnapshot, type ListTableDensity, type ListTableEditAutoCompleteEnter, type ListTableEditFilterOption, type ListTableEditOption, type ListTableEditValueType, type ListTableEditable, type ListTableEditorAutoCompleteEnter, type ListTableEditorConfig, type ListTableEditorFactory, type ListTableEditorFilterOption, type ListTableEditorNavigateDirection, type ListTableEditorOption, type ListTableEditorRect, type ListTableEditorRequest, type ListTableEditorTheme, type ListTableEditorValueType, type ListTableExperimentalOptions, type ListTableExportXlsxOptions, type ListTableFilterCondition$1 as ListTableFilterCondition, type ListTableFilterConditionOperator, type ListTableFilterConditionRelation, type ListTableFilterMatchMode, type ListTableFilterOption, type ListTableFilterOptionValue, type ListTableFilterPanelAdapter, type ListTableFilterState, type ListTableFilterType, type ListTableFilterValue$1 as ListTableFilterValue, type ListTableFixedPopupAdapter, type ListTableFormItemProps, type ListTableFormItemPropsConfig, type ListTableFormRule, type ListTableFormRules, type ListTableGroupingOptions, type ListTableHeaderContextMenuAdapter, type ListTableHighlightMode, type ListTableHorizontalAlign, type ListTableIconCellContent, type ListTableImageCellContent, type ListTableImageObjectFit, type ListTableImagePreviewRequest, type ListTableLoadingAdapter, type ListTableLoadingRequest, type ListTableMergeCellOptions, type ListTableNestedTableCellContent, type ListTableNestedTableColumn, type ListTableOffscreenCanvasStatusInfo, type ListTableOptions, type ListTablePaginationAdapter, type ListTablePaginationCSSProperties, type ListTablePaginationOptions, type ListTablePaginationStyleSlot, type ListTablePaginationStyles, type ListTablePerformanceMetric, type ListTableProgressCellContent, type ListTableProgressShape, type ListTableProgressSize, type ListTableQrCodeCellContent, type ListTableQrCodeLevel, type ListTableQueryChange, type ListTableQueryChangeExtra, type ListTableQueryFilters, type ListTableQueryOptions, type ListTableQueryPagination, type ListTableQuerySorter, type ListTableRateCellContent, type ListTableRateSize, type ListTableRateSymbolType, type ListTableRowDragMode, type ListTableRowDragOptions, type ListTableRowDragPayload, type ListTableRowDragSourceInfo, type ListTableRowDragZone, type ListTableRowEventProps, type ListTableRowSelectionChangeInfo, type ListTableRowSelectionOptions, type ListTableRowSelectorOptions, type ListTableScrollToOptions, type ListTableScrollbarCSSProperties, type ListTableScrollbarOptions, type ListTableSearchRequest, type ListTableSelectionState, type ListTableServerSummaryValues, type ListTableSortItem, type ListTableSortState, type ListTableSparklineChartCellContent, type ListTableSparklineSize, type ListTableStyles, type ListTableSummaryConfig, type ListTableSummaryRoundingMode, type ListTableSummaryType, type ListTableSymbolType, type ListTableTagCellContent, type ListTableTheme, type ListTableTooltipAdapter, type ListTableTooltipRequest, type ListTableUiOptions, type ListTableValidationError, type ListTableValidationErrorField, type ListTableValidationFailure, type ListTableValidationTarget, type PaginationConfig, ROW_SELECTION_COLUMN, type RenderCellDescriptor, SELECTION_COLUMN, getListTableStoredPageSize, resetListTableStoredColumnConfig };
|
|
2248
|
+
export { type CreateCellEditorSessionParams, type DebugHitTestResult, EXPAND_COLUMN, type FilterPanelConfig, type FilterPanelOptionItem, type FilterPanelTexts, type FixedPopupConfig, type HeaderContextMenuColumnItem, type HeaderContextMenuConfig, type HeaderContextMenuDensity, ListTable, type ListTableAutoMergeRule, type ListTableBarcodeCellContent, type ListTableBarcodeFormat, type ListTableButtonCellContent, type ListTableButtonPopconfirmOptions, type ListTableButtonSize, type ListTableButtonType, type ListTableCSSProperties, type ListTableCacheCategory, type ListTableCachePreferences, type ListTableCarouselScrollOptions, type ListTableCellContent, type ListTableCellContentClickContext, type ListTableCellEditorSession, type ListTableCellSpan, type ListTableCellStyle, type ListTableChartCellContent, type ListTableChartSize, type ListTableChartType, type ListTableColorCellContent, type ListTableColumn, type ListTableConditionalFormatCondition, type ListTableConditionalFormatRule, type ListTableConditionalOperator, type ListTableContextMenuFeature, type ListTableContextMenuOptions, type ListTableCustomChartCellContent, type ListTableDangerConfirmRequest, type ListTableDataFormat, type ListTableDataFormatOptions, type ListTableDataFormatType, type ListTableDebugOptions, type ListTableDebugSnapshot, type ListTableDensity, type ListTableEditAutoCompleteEnter, type ListTableEditFilterOption, type ListTableEditOption, type ListTableEditValueType, type ListTableEditable, type ListTableEditorAutoCompleteEnter, type ListTableEditorConfig, type ListTableEditorFactory, type ListTableEditorFilterOption, type ListTableEditorNavigateDirection, type ListTableEditorOption, type ListTableEditorRect, type ListTableEditorRequest, type ListTableEditorTheme, type ListTableEditorValueType, type ListTableExperimentalOptions, type ListTableExportXlsxOptions, type ListTableFilterCondition$1 as ListTableFilterCondition, type ListTableFilterConditionOperator, type ListTableFilterConditionRelation, type ListTableFilterMatchMode, type ListTableFilterOption, type ListTableFilterOptionValue, type ListTableFilterPanelAdapter, type ListTableFilterState, type ListTableFilterType, type ListTableFilterValue$1 as ListTableFilterValue, type ListTableFixedPopupAdapter, type ListTableFormItemProps, type ListTableFormItemPropsConfig, type ListTableFormRule, type ListTableFormRules, type ListTableGaugeChartCellContent, type ListTableGroupingOptions, type ListTableHeaderContextMenuAdapter, type ListTableHighlightMode, type ListTableHorizontalAlign, type ListTableIconCellContent, type ListTableImageCellContent, type ListTableImageObjectFit, type ListTableImagePreviewRequest, type ListTableLoadingAdapter, type ListTableLoadingRequest, type ListTableMergeCellOptions, type ListTableNestedTableCellContent, type ListTableNestedTableColumn, type ListTableOffscreenCanvasStatusInfo, type ListTableOptions, type ListTablePaginationAdapter, type ListTablePaginationCSSProperties, type ListTablePaginationOptions, type ListTablePaginationStyleSlot, type ListTablePaginationStyles, type ListTablePerformanceMetric, type ListTablePieChartCellContent, type ListTableProgressCellContent, type ListTableProgressShape, type ListTableProgressSize, type ListTableQrCodeCellContent, type ListTableQrCodeLevel, type ListTableQueryChange, type ListTableQueryChangeExtra, type ListTableQueryFilters, type ListTableQueryOptions, type ListTableQueryPagination, type ListTableQuerySorter, type ListTableRadarChartCellContent, type ListTableRateCellContent, type ListTableRateSize, type ListTableRateSymbolType, type ListTableRowDragMode, type ListTableRowDragOptions, type ListTableRowDragPayload, type ListTableRowDragSourceInfo, type ListTableRowDragZone, type ListTableRowEventProps, type ListTableRowSelectionChangeInfo, type ListTableRowSelectionOptions, type ListTableRowSelectorOptions, type ListTableScrollToOptions, type ListTableScrollbarCSSProperties, type ListTableScrollbarOptions, type ListTableSearchRequest, type ListTableSelectionState, type ListTableServerSummaryValues, type ListTableSortItem, type ListTableSortState, type ListTableSorter, type ListTableSparklineChartCellContent, type ListTableSparklineSize, type ListTableStyles, type ListTableSummaryConfig, type ListTableSummaryRoundingMode, type ListTableSummaryType, type ListTableSymbolType, type ListTableTagCellContent, type ListTableTheme, type ListTableTooltipAdapter, type ListTableTooltipRequest, type ListTableUiOptions, type ListTableValidationError, type ListTableValidationErrorField, type ListTableValidationFailure, type ListTableValidationTarget, type PaginationConfig, ROW_SELECTION_COLUMN, type RenderCellDescriptor, SELECTION_COLUMN, getListTableStoredPageSize, resetListTableStoredColumnConfig };
|