Skip to content

Commit 32a3598

Browse files
author
李杨枚
committed
chore: listtable header grouping configuration parameter name modification: column -> header
1 parent 8dd8aa4 commit 32a3598

8 files changed

Lines changed: 32 additions & 32 deletions

File tree

docs/assets/demo/en/basic-functionality/list-table-header-group-collapse.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ option: ListTable-columns-text#columns
99

1010
# List Table - Header Group Collapse
1111

12-
Configure columns as a nested multi-layer structure to achieve multi-layer header grouping effects. Enable tree-style expansion and collapse functionality through `columnHierarchyType: 'grid-tree'`, and set the default expansion level with `columnExpandLevel`.
12+
Configure columns as a nested multi-layer structure to achieve multi-layer header grouping effects. Enable tree-style expansion and collapse functionality through `headerHierarchyType: 'grid-tree'`, and set the default expansion level with `headerExpandLevel`.
1313

1414
## Key Configurations
1515

1616
- columns
17-
- `columnHierarchyType` Set hierarchy display to `grid-tree` to enable tree-style expand/collapse
18-
- `columnExpandLevel` Configure default expansion level (defaults to 1)
17+
- `headerHierarchyType` Set hierarchy display to `grid-tree` to enable tree-style expand/collapse
18+
- `headerExpandLevel` Configure default expansion level (defaults to 1)
1919

2020
## Code demo
2121

@@ -103,8 +103,8 @@ const columns = [
103103
const option = {
104104
records,
105105
columns,
106-
columnHierarchyType: 'grid-tree',
107-
columnExpandLevel: 3,
106+
headerHierarchyType: 'grid-tree',
107+
headerExpandLevel: 3,
108108
widthMode: 'standard',
109109
autoWrapText: true,
110110
autoRowHeight: true,

docs/assets/demo/zh/basic-functionality/list-table-header-group-collapse.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ option: ListTable-columns-text#columns
99

1010
# 基本表格表头分组与折叠
1111

12-
将 columns 配置为嵌套多层结构来实现多层表头分组效果,可通过配置 `columnHierarchyType: 'grid-tree'` 开启树形的展开和折叠,并通过 `columnExpandLevel` 来设置默认展开层级。
12+
将 columns 配置为嵌套多层结构来实现多层表头分组效果,可通过配置 `headerHierarchyType: 'grid-tree'` 开启树形的展开和折叠,并通过 `headerExpandLevel` 来设置默认展开层级。
1313

1414
## 关键配置
1515

1616
- columns
17-
- `columnHierarchyType` 将层级展示设置为 `grid-tree`,开启树形的展开和折叠功能
18-
- `columnExpandLevel` 设置默认展开层级,默认为`1`
17+
- `headerHierarchyType` 将层级展示设置为 `grid-tree`,开启树形的展开和折叠功能
18+
- `headerExpandLevel` 设置默认展开层级,默认为`1`
1919

2020
## 代码演示
2121

@@ -103,8 +103,8 @@ const columns = [
103103
const option = {
104104
records,
105105
columns,
106-
columnHierarchyType: 'grid-tree',
107-
columnExpandLevel: 3,
106+
headerHierarchyType: 'grid-tree',
107+
headerExpandLevel: 3,
108108
widthMode: 'standard',
109109
autoWrapText: true,
110110
autoRowHeight: true,

docs/assets/guide/en/table_type/List_table/columns_tree.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ Define header hierarchies using nested structures in the `columns` configuration
2323

2424
### 2. Enable Tree-Style Collapsing
2525

26-
Set `columnHierarchyType: 'grid-tree'` to enable interactive tree-style collapsing for headers.
26+
Set `headerHierarchyType: 'grid-tree'` to enable interactive tree-style collapsing for headers.
2727

2828
### 3. Set Default Expansion Level
2929

30-
Specify the initial expansion level using `columnExpandLevel` (default: `1`, showing only the first-level groups).
30+
Specify the initial expansion level using `headerExpandLevel` (default: `1`, showing only the first-level groups).
3131

3232
---
3333

@@ -74,8 +74,8 @@ const columns = [
7474
const option = {
7575
records,
7676
columns,
77-
columnHierarchyType: 'grid-tree', // Enable tree-style collapsing
78-
columnExpandLevel: 2, // Expand to the second level by default
77+
headerHierarchyType: 'grid-tree', // Enable tree-style collapsing
78+
headerExpandLevel: 2, // Expand to the second level by default
7979
widthMode: 'standard',
8080
defaultRowHeight: 40
8181
};

docs/assets/guide/zh/table_type/List_table/columns_tree.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919

2020
### 2. 启用树形折叠功能
2121

22-
设置 `columnHierarchyType: 'grid-tree'` 开启表头树形折叠交互。
22+
设置 `headerHierarchyType: 'grid-tree'` 开启表头树形折叠交互。
2323

2424
### 3. 设置默认展开层级
2525

26-
通过 `columnExpandLevel` 指定初始展开层级(默认值为 `1`,即仅展示第一级分组)。
26+
通过 `headerExpandLevel` 指定初始展开层级(默认值为 `1`,即仅展示第一级分组)。
2727

2828
## 示例
2929

@@ -68,8 +68,8 @@ const columns = [
6868
const option = {
6969
records,
7070
columns,
71-
columnHierarchyType: 'grid-tree', // 启用树形折叠
72-
columnExpandLevel: 2, // 默认展开至第二级
71+
headerHierarchyType: 'grid-tree', // 启用树形折叠
72+
headerExpandLevel: 2, // 默认展开至第二级
7373
widthMode: 'standard',
7474
defaultRowHeight: 40
7575
};

docs/assets/option/en/table/listTable.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ When displayed as a tree structure, the number of levels is expanded by default.
9393

9494
Whether nodes at the same level are aligned by text, such as nodes without collapsed expansion icons and nodes with icons. Default is false
9595

96-
## columnHierarchyType('grid-tree')
96+
## headerHierarchyType('grid-tree')
9797

98-
Defines the hierarchy display mode for column headers. When set to 'grid-tree', it enables tree-style expand/collapse functionality in the header structure.
98+
Defines the hierarchy display mode for headers. When set to 'grid-tree', it enables tree-style expand/collapse functionality in the header structure.
9999

100-
## columnExpandLevel(number)
100+
## headerExpandLevel(number)
101101

102-
Sets the initial expansion level of column headers. Defaults to 1.
102+
Sets the initial expansion level of headers. Defaults to 1.
103103

104104
## aggregation(Aggregation|CustomAggregation|Array|Function)
105105

docs/assets/option/zh/table/listTable.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ SortState {
9090

9191
同层级的结点是否按文字对齐 如没有收起展开图标的节点和有图标的节点文字对齐 默认 false
9292

93-
## columnHierarchyType('grid-tree')
93+
## headerHierarchyType('grid-tree')
9494

95-
列表头中层级维度结构显示形式,设置为 'grid-tree' 时开启树形结构的展开折叠功能。
95+
表头中层级维度结构显示形式,设置为 'grid-tree' 时开启树形结构的展开折叠功能。
9696

97-
## columnExpandLevel(number)
97+
## headerExpandLevel(number)
9898

99-
列表头初始化展开层数,默认是 1。
99+
表头初始化展开层数,默认是 1。
100100

101101
## aggregation(Aggregation|CustomAggregation|Array|Function)
102102

packages/vtable/src/layout/simple-header-layout.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ export class SimpleHeaderLayoutMap implements LayoutMapAPI {
8181
this._headerCellIds = [];
8282
this.hierarchyIndent = hierarchyIndent ?? 20;
8383
this.hierarchyTextStartAlignment = table.options.hierarchyTextStartAlignment;
84-
this.columnHierarchyType = table.options.columnHierarchyType;
85-
this.columnExpandLevel = table.options.columnExpandLevel ?? 1;
84+
this.columnHierarchyType = table.options.headerHierarchyType;
85+
this.columnExpandLevel = table.options.headerExpandLevel ?? 1;
8686
this.columnTree = new DimensionTree(
8787
columns as any,
8888
{ seqId: 0 },

packages/vtable/src/ts-types/table-engine.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,10 @@ export interface ListTableConstructorOptions extends BaseTableConstructorOptions
239239
hierarchyExpandLevel?: number;
240240
/** 同层级的结点是否按文字对齐 如没有收起展开图标的节点和有图标的节点文字对齐 默认false */
241241
hierarchyTextStartAlignment?: boolean;
242-
/** 列表头树形展示模式(设置成 'grid-tree' 则支持展开和折叠) */
243-
columnHierarchyType?: 'grid-tree';
244-
/** 列表头默认展开层级(columnHierarchyType 为 'grid-tree' 时有效) */
245-
columnExpandLevel?: number;
242+
/** 表头树形展示模式(设置成 'grid-tree' 则支持展开和折叠) */
243+
headerHierarchyType?: 'grid-tree';
244+
/** 表头默认展开层级(headerHierarchyType 为 'grid-tree' 时有效) */
245+
headerExpandLevel?: number;
246246
/** 分页配置 */
247247
pagination?: IPagination;
248248

0 commit comments

Comments
 (0)