@taocompany/magic-grid 0.14.5 → 0.15.0
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/AGENTS.md +3 -1
- package/README.md +23 -47
- package/dist/api-manifest.json +18 -36
- package/dist/components/MagicGrid/MagicGrid.vue.d.ts +68 -104
- package/dist/components/MagicGrid/MagicGrid.vue.d.ts.map +1 -1
- package/dist/components/MagicGrid/index.d.ts +72 -3
- package/dist/components/MagicGrid/index.d.ts.map +1 -1
- package/dist/components/MagicGrid/magicGridProps.d.ts +2 -18
- package/dist/components/MagicGrid/magicGridProps.d.ts.map +1 -1
- package/dist/components/MagicGrid/useMagicGrid.d.ts.map +1 -1
- package/dist/core/cell/cellCtrl.d.ts +1 -1
- package/dist/core/cell/cellCtrl.d.ts.map +1 -1
- package/dist/core/column/applyHeaderCells.d.ts.map +1 -1
- package/dist/core/column/columnModel.d.ts +4 -1
- package/dist/core/column/columnModel.d.ts.map +1 -1
- package/dist/core/column/createGroupColumnDef.d.ts +0 -2
- package/dist/core/column/createGroupColumnDef.d.ts.map +1 -1
- package/dist/core/column/prepareGridColumnDefs.d.ts +2 -2
- package/dist/core/column/prepareGridColumnDefs.d.ts.map +1 -1
- package/dist/core/column/renderGroupCell.d.ts +7 -4
- package/dist/core/column/renderGroupCell.d.ts.map +1 -1
- package/dist/core/column/renderTreeHeaderCell.d.ts +1 -1
- package/dist/core/editing/cellEditPipeline.d.ts +3 -1
- package/dist/core/editing/cellEditPipeline.d.ts.map +1 -1
- package/dist/core/editing/cellEditorHost.d.ts.map +1 -1
- package/dist/core/grid/grid.d.ts +4 -0
- package/dist/core/grid/grid.d.ts.map +1 -1
- package/dist/core/grid/gridBootstrap.d.ts.map +1 -1
- package/dist/core/grid/gridHierarchyOps.d.ts +1 -0
- package/dist/core/grid/gridHierarchyOps.d.ts.map +1 -1
- package/dist/core/grid/gridInteraction/cellBodyInteractionHandlers.d.ts +2 -0
- package/dist/core/grid/gridInteraction/cellBodyInteractionHandlers.d.ts.map +1 -1
- package/dist/core/grid/gridInteraction/focusController.d.ts.map +1 -1
- package/dist/core/pipeline/stages/mapStage.d.ts +0 -3
- package/dist/core/pipeline/stages/mapStage.d.ts.map +1 -1
- package/dist/core/row/cellComp.d.ts +11 -2
- package/dist/core/row/cellComp.d.ts.map +1 -1
- package/dist/core/selection/cellClipboardCell.d.ts.map +1 -1
- package/dist/core/treeTable/resolveGridHierarchyMode.d.ts +2 -1
- package/dist/core/treeTable/resolveGridHierarchyMode.d.ts.map +1 -1
- package/dist/core/treeTable/treeHierarchyMove.d.ts.map +1 -1
- package/dist/core/treeTable/treeTableService.d.ts.map +1 -1
- package/dist/core/types/column.d.ts +5 -0
- package/dist/core/types/column.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +2 -2
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/types/treeTable.d.ts +37 -33
- package/dist/core/types/treeTable.d.ts.map +1 -1
- package/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +4732 -4719
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/token-catalog.json +2 -2
- package/dist/types/core.d.ts +22 -22
- package/dist/types/core.d.ts.map +1 -1
- package/dist/types/magic-grid.d.ts +19 -14
- package/dist/types/magic-grid.d.ts.map +1 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -35,7 +35,9 @@ import '@taocompany/magic-grid/style.css'
|
|
|
35
35
|
|
|
36
36
|
## 树形
|
|
37
37
|
|
|
38
|
-
- `tree: true` 时必须提供 `getDataPath
|
|
38
|
+
- `tree: true` 或 `tree="列prop"` 时必须提供 `getDataPath`。缺少时不建树,并 `console.warn`。
|
|
39
|
+
- 树列写在 `columns` 里:`isTree: true`。`tree: true` 用其中第一个;`tree="name"` 还要求该列 `prop` 为 `name`。
|
|
40
|
+
- 展示和编辑用这一列的 `prop`、`valueGetter`、`editable`,没有单独的树列配置。
|
|
39
41
|
- `tree` 与 `rowGrouping` 不能同时为 true。
|
|
40
42
|
|
|
41
43
|
## 校验
|
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
| **体验** | 溢出 Tooltip、单元格批注、空态 Overlay、暗色主题、底部状态栏 |
|
|
75
75
|
| **扩展** | 列设置面板、内置编辑器(text/number/checkbox/switch)、Vue 第三方编辑器 Composable、inline 常驻编辑器、async-validator 校验 |
|
|
76
76
|
|
|
77
|
-
当前版本:**0.
|
|
77
|
+
当前版本:**0.15.0**(`@taocompany/magic-grid`)。
|
|
78
78
|
|
|
79
79
|
> **上手路径**:安装 → [快速开始](#快速开始) → 按需查阅 [行移动](#行移动)、[树形表格](#树形表格) 等专题,以及下文 Props / Events / GridApi 索引。
|
|
80
80
|
|
|
@@ -514,7 +514,7 @@ sourceRows(flat)
|
|
|
514
514
|
|------|------------------------|-------------------|
|
|
515
515
|
| 层级来源 | 列值 `rowGroup` 聚合 | `getDataPath` 路径 |
|
|
516
516
|
| 数据行 | leaf + synthetic group 行 | **全部为 user data 行** |
|
|
517
|
-
| 系统列 | auto group 列(`__group__`) |
|
|
517
|
+
| 系统列 | auto group 列(`__group__`) | 无。层级画在 `isTree: true` 的用户列上 |
|
|
518
518
|
| 管线 | `group → filter → sort → aggregate → map` | `tree → filter → sort → map` |
|
|
519
519
|
| 互斥 | 与 `tree` 不得双开 | 与 `rowGrouping` 不得双开 |
|
|
520
520
|
|
|
@@ -547,7 +547,7 @@ const data = ref<OrgRow[]>([
|
|
|
547
547
|
])
|
|
548
548
|
|
|
549
549
|
const columns: ColumnDef[] = [
|
|
550
|
-
{ prop: 'name', label: '名称', width: 140, filterable: true },
|
|
550
|
+
{ prop: 'name', label: '名称', width: 140, filterable: true, isTree: true },
|
|
551
551
|
{ prop: 'headcount', label: '人数', width: 88, sortable: true },
|
|
552
552
|
]
|
|
553
553
|
|
|
@@ -571,7 +571,7 @@ const getDataPath: GetDataPathFn = ({ data }) =>
|
|
|
571
571
|
</template>
|
|
572
572
|
```
|
|
573
573
|
|
|
574
|
-
|
|
574
|
+
效果:在 `isTree: true` 的列上显示缩进和展开按钮,支持折叠/展开、同级排序筛选、父子联动行选。该列的文案和编辑与普通列相同。
|
|
575
575
|
|
|
576
576
|
### 树形表格配置项详解
|
|
577
577
|
|
|
@@ -579,13 +579,9 @@ const getDataPath: GetDataPathFn = ({ data }) =>
|
|
|
579
579
|
|
|
580
580
|
| Prop | 类型 | 默认值 | 说明 |
|
|
581
581
|
|------|------|--------|------|
|
|
582
|
-
| `tree` | `boolean` | `false` | **总闸**。`true`
|
|
583
|
-
| `getDataPath` | `GetDataPathFn` | — | `( { data } ) => string[]
|
|
582
|
+
| `tree` | `boolean \| string` | `false` | **总闸**。`true` 时启用树形,树列取第一个 `isTree: true`。字符串是树列的 `prop`,该列必须同时 `isTree: true` |
|
|
583
|
+
| `getDataPath` | `GetDataPathFn` | — | `( { data } ) => string[]`,每行返回路径。开启 `tree` 时需要;缺失则不建树并 `console.warn` |
|
|
584
584
|
| `groupDefaultExpanded` | `number` | `-1` | 默认展开层级(tree / group **共用**此 prop)。`0` = 全折叠;`1` = 仅展开第一层;`-1` = 全部展开 |
|
|
585
|
-
| `showTreeColumn` | `boolean` | `true` | 是否注入 tree 系统列(colId `__tree__`) |
|
|
586
|
-
| `autoTreeColumnDef` | `Partial<ColumnDef>` | — | 覆盖 tree 列宽、固定、表头等;等价于对内置 tree 系统列的 `ColumnDef` 覆盖 |
|
|
587
|
-
| `treeValueGetter` | `TreeValueGetterFn` | — | 自定义 tree 列展示文案;缺省为 **`dataPath` 末段** |
|
|
588
|
-
| `treeDisplayType` | `'singleColumn'` | `'singleColumn'` | v1 仅单列树展示 |
|
|
589
585
|
| `treeLazyLoad` | `boolean` | `false` | 启用 CSRM 懒加载;`true` 时需 `loadTreeChildren` |
|
|
590
586
|
| `hasTreeChildren` | `HasTreeChildrenFn` | — | lazy:`true` 时即使 source 尚无子孙也展示 expand chevron |
|
|
591
587
|
| `loadTreeChildren` | `LoadTreeChildrenFn` | — | lazy:首次展开且无已加载子行时异步拉取子数据 |
|
|
@@ -598,13 +594,6 @@ const getDataPath: GetDataPathFn = ({ data }) =>
|
|
|
598
594
|
```ts
|
|
599
595
|
type GetDataPathFn = (params: { data: RowData }) => string[]
|
|
600
596
|
|
|
601
|
-
interface TreeValueGetterParams {
|
|
602
|
-
data: RowData
|
|
603
|
-
dataPath: string[]
|
|
604
|
-
treeLevel: number
|
|
605
|
-
}
|
|
606
|
-
type TreeValueGetterFn = (params: TreeValueGetterParams) => string
|
|
607
|
-
|
|
608
597
|
interface HasTreeChildrenParams {
|
|
609
598
|
data: RowData
|
|
610
599
|
dataPath: string[]
|
|
@@ -694,13 +683,14 @@ api.applyTransaction({ remove: ['fe', 'be'] })
|
|
|
694
683
|
|
|
695
684
|
#### 系统列顺序
|
|
696
685
|
|
|
697
|
-
启用 tree
|
|
686
|
+
启用 tree 后,列顺序为:
|
|
698
687
|
|
|
699
688
|
```
|
|
700
|
-
index(可选) → selection(可选) → expand(masterDetail 可选) →
|
|
689
|
+
index(可选) → selection(可选) → expand(masterDetail 可选) → 用户列
|
|
701
690
|
```
|
|
702
691
|
|
|
703
|
-
|
|
692
|
+
树层级画在 `isTree: true` 的那一列上,不再另插系统列。`tree: true` 时取 `columns` 里第一个 `isTree: true`;`tree="name"` 时只认 `prop` 为 `name` 且 `isTree: true` 的列。
|
|
693
|
+
|
|
704
694
|
- 用户 `columns` 中 **不得**占用保留 colId:`__tree__`、`__index__`、`__selection__`、`__expand__`、`__group__`(冲突时 dev 警告并忽略)。
|
|
705
695
|
|
|
706
696
|
#### 展示内容
|
|
@@ -709,34 +699,27 @@ index(可选) → selection(可选) → expand(masterDetail 可选)
|
|
|
709
699
|
|------|------|
|
|
710
700
|
| **缩进** | 每级 `16px`(`padding-left = treeLevel × 16`) |
|
|
711
701
|
| **Chevron** | 可展开节点显示;叶节点隐藏或占位对齐 |
|
|
712
|
-
| **文案** |
|
|
702
|
+
| **文案** | 该列的 `valueGetter` / `formatter` / `prop`。都没有时显示路径末段 |
|
|
713
703
|
| **Loading** | lazy 加载中 chevron 区 spinner + `aria-busy` |
|
|
714
704
|
| **Settings 菜单** | `treeDragScope: 'hierarchy'` 且 `setDataPath` 可用时,hover 显示 settings 按钮 |
|
|
715
705
|
|
|
716
|
-
####
|
|
706
|
+
#### 指定树列
|
|
717
707
|
|
|
718
708
|
```vue
|
|
719
709
|
<MagicGrid
|
|
720
710
|
tree
|
|
721
711
|
:get-data-path="getDataPath"
|
|
722
|
-
:
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
pinned: 'left',
|
|
726
|
-
}"
|
|
727
|
-
:tree-value-getter="({ data, dataPath }) => `${dataPath.join(' / ')} · ${data.name}`"
|
|
712
|
+
:columns="[
|
|
713
|
+
{ prop: 'name', label: '组织结构', width: 240, isTree: true, editable: true },
|
|
714
|
+
]"
|
|
728
715
|
/>
|
|
729
716
|
```
|
|
730
717
|
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
```vue
|
|
734
|
-
<MagicGrid tree :get-data-path="getDataPath" :show-tree-column="false" />
|
|
735
|
-
```
|
|
718
|
+
`tree="name"` 与上面的 `isTree` 列配合,可以在有多列 `isTree: true` 时指定其中一列。不要层级按钮时,把该列的 `showTree` 设为 `false`。
|
|
736
719
|
|
|
737
720
|
#### 键盘与无障碍
|
|
738
721
|
|
|
739
|
-
-
|
|
722
|
+
- 树列不可编辑时,焦点在该格上 **Enter / Space** 切换展开/折叠。可编辑时 Enter 进入编辑,展开仍要点 chevron。
|
|
740
723
|
- Chevron 带 `aria-expanded`;lazy loading 时 `aria-busy="true"`。
|
|
741
724
|
|
|
742
725
|
### 展开与折叠
|
|
@@ -930,7 +913,7 @@ async function persistMove(params: AsyncRowMutationMoveParams): Promise<void> {
|
|
|
930
913
|
|
|
931
914
|
| 场景 | 预期行为 |
|
|
932
915
|
|------|----------|
|
|
933
|
-
| **固定列 / 列虚拟化** |
|
|
916
|
+
| **固定列 / 列虚拟化** | 树列跟随该列自己的 `fixed`;树单元格仍受列窗口约束 |
|
|
934
917
|
| **行虚拟化** | 全部 display 行参与 `rowTop` 累计;百万行靠虚拟化 |
|
|
935
918
|
| **Master Detail** | detail 行紧跟 master leaf;**不参与** tree 路径与子树计数 |
|
|
936
919
|
| **合并单元格** | tree 行 **不参与** colSpan/rowSpan |
|
|
@@ -943,7 +926,7 @@ async function persistMove(params: AsyncRowMutationMoveParams): Promise<void> {
|
|
|
943
926
|
|
|
944
927
|
| 现象 | 可能原因 | 处理 |
|
|
945
928
|
|------|----------|------|
|
|
946
|
-
|
|
|
929
|
+
| 开启 `tree` 后没有层级,控制台 warn 缺少 `getDataPath` | 未传 `getDataPath` | 添加回调。缺路径时不建树,也不 throw |
|
|
947
930
|
| refresh throw `missing parent path` | 子行路径缺父节点行 | 补全中间层或修正 path |
|
|
948
931
|
| refresh throw 重复路径 | 两行 `getDataPath` 相同 | 保证路径唯一 |
|
|
949
932
|
| 双开 tree + rowGrouping 但无分组 | 设计如此,tree 优先 | 二选一 |
|
|
@@ -1096,11 +1079,9 @@ async function persistMove(params: AsyncRowMutationMoveParams): Promise<void> {
|
|
|
1096
1079
|
| `showGroupHeader` / `showGroupFooter` | `false` | 不展示分组头/尾行 |
|
|
1097
1080
|
| `groupDisplayType` | `'singleColumn'` | 单列分组展示 |
|
|
1098
1081
|
| `showGroupColumn` | `false` | 不展示 auto group 列 |
|
|
1099
|
-
| `tree` | `false` |
|
|
1100
|
-
| `showTreeColumn` | `true` | 展示 tree 系统列(启用 tree 后) |
|
|
1082
|
+
| `tree` | `false` | 不启用树形表格。`true` 或列 `prop` 字符串时启用 |
|
|
1101
1083
|
| `treeDragScope` | `'siblings'` | 树拖拽仅同层兄弟 |
|
|
1102
1084
|
| `treeHierarchyActions` | `true` | hierarchy 模式下展示层级快捷菜单 |
|
|
1103
|
-
| `treeDisplayType` | `'singleColumn'` | 单列树展示 |
|
|
1104
1085
|
| `treeLazyLoad` | `false` | 不启用懒加载 |
|
|
1105
1086
|
|
|
1106
1087
|
### 批注
|
|
@@ -1420,16 +1401,12 @@ interface RowSelectionConfig {
|
|
|
1420
1401
|
|
|
1421
1402
|
| Prop | 类型 | 默认值 | 说明 |
|
|
1422
1403
|
|------|------|--------|------|
|
|
1423
|
-
| `tree` | `boolean` | `false` | 启用树形表格(与 `rowGrouping`
|
|
1424
|
-
| `getDataPath` | `GetDataPathFn` | — |
|
|
1404
|
+
| `tree` | `boolean \| string` | `false` | 启用树形表格(与 `rowGrouping` 互斥)。字符串为树列 `prop` |
|
|
1405
|
+
| `getDataPath` | `GetDataPathFn` | — | 树形路径回调。开启 `tree` 时需要;缺失则不建树并 `console.warn` |
|
|
1425
1406
|
| `groupDefaultExpanded` | `number` | `-1` | 默认展开层级:`0` 全折叠 · `1` 第一层 · `-1` 全部(tree / group 共用) |
|
|
1426
1407
|
| `treeDragScope` | `'siblings' \| 'hierarchy'` | `'siblings'` | 树形拖拽范围;`hierarchy` 允许跨父改挂(需 `setDataPath`) |
|
|
1427
1408
|
| `setDataPath` | `SetDataPathFn` | — | `hierarchy` 模式下写回 `dataPath` 到行数据 |
|
|
1428
|
-
| `treeHierarchyActions` | `boolean` | `true` | `hierarchy`
|
|
1429
|
-
| `showTreeColumn` | `boolean` | `true` | 展示 tree 系统列(colId `__tree__`) |
|
|
1430
|
-
| `autoTreeColumnDef` | `Partial<ColumnDef>` | — | 覆盖 tree 系统列 colDef |
|
|
1431
|
-
| `treeValueGetter` | `TreeValueGetterFn` | — | 自定义 tree 列展示值(缺省为 dataPath 末段) |
|
|
1432
|
-
| `treeDisplayType` | `'singleColumn'` | `'singleColumn'` | 树节点展示列模式 |
|
|
1409
|
+
| `treeHierarchyActions` | `boolean` | `true` | `hierarchy` 时在树列展示 **上移一级 / 下移一级** 菜单 |
|
|
1433
1410
|
| `treeLazyLoad` | `boolean` | `false` | 启用树形懒加载(CSRM · 需 `loadTreeChildren`) |
|
|
1434
1411
|
| `hasTreeChildren` | `HasTreeChildrenFn` | — | lazy:节点是否可能有未加载子行(控制 chevron) |
|
|
1435
1412
|
| `loadTreeChildren` | `LoadTreeChildrenFn` | — | lazy:首次展开时拉取子数据 |
|
|
@@ -4291,7 +4268,6 @@ import type {
|
|
|
4291
4268
|
// 树形表格
|
|
4292
4269
|
GetDataPathFn,
|
|
4293
4270
|
SetDataPathFn,
|
|
4294
|
-
TreeValueGetterFn,
|
|
4295
4271
|
HasTreeChildrenFn,
|
|
4296
4272
|
LoadTreeChildrenFn,
|
|
4297
4273
|
TreeDragScope,
|
package/dist/api-manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifestVersion": 1,
|
|
3
|
-
"libraryVersion": "0.
|
|
4
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"libraryVersion": "0.15.0",
|
|
4
|
+
"generatedAt": "2026-11-06T08:32:34.980Z",
|
|
5
5
|
"props": [
|
|
6
6
|
{
|
|
7
7
|
"name": "columns",
|
|
@@ -808,45 +808,17 @@
|
|
|
808
808
|
},
|
|
809
809
|
{
|
|
810
810
|
"name": "tree",
|
|
811
|
-
"type": "boolean",
|
|
811
|
+
"type": "boolean | string",
|
|
812
812
|
"default": "false",
|
|
813
813
|
"required": false,
|
|
814
|
-
"notes": "
|
|
814
|
+
"notes": "树形开关。默认 `false`。与 `rowGrouping` 互斥。"
|
|
815
815
|
},
|
|
816
816
|
{
|
|
817
817
|
"name": "getDataPath",
|
|
818
818
|
"type": "GetDataPathFn",
|
|
819
819
|
"default": "undefined",
|
|
820
820
|
"required": false,
|
|
821
|
-
"notes": "
|
|
822
|
-
},
|
|
823
|
-
{
|
|
824
|
-
"name": "showTreeColumn",
|
|
825
|
-
"type": "boolean",
|
|
826
|
-
"default": "undefined",
|
|
827
|
-
"required": false,
|
|
828
|
-
"notes": "是否展示 tree 系统列。默认 `true`"
|
|
829
|
-
},
|
|
830
|
-
{
|
|
831
|
-
"name": "autoTreeColumnDef",
|
|
832
|
-
"type": "Partial<ColumnDef<TData>>",
|
|
833
|
-
"default": "undefined",
|
|
834
|
-
"required": false,
|
|
835
|
-
"notes": "覆盖 tree 系统列 colDef"
|
|
836
|
-
},
|
|
837
|
-
{
|
|
838
|
-
"name": "treeValueGetter",
|
|
839
|
-
"type": "TreeValueGetterFn",
|
|
840
|
-
"default": "undefined",
|
|
841
|
-
"required": false,
|
|
842
|
-
"notes": "自定义 tree 列展示值"
|
|
843
|
-
},
|
|
844
|
-
{
|
|
845
|
-
"name": "treeDisplayType",
|
|
846
|
-
"type": "TreeDisplayType",
|
|
847
|
-
"default": "undefined",
|
|
848
|
-
"required": false,
|
|
849
|
-
"notes": "树节点展示列模式。当前仅支持 `singleColumn`"
|
|
821
|
+
"notes": "树形路径回调。开启 `tree` 时必填;缺失则不建树并 console.warn"
|
|
850
822
|
},
|
|
851
823
|
{
|
|
852
824
|
"name": "treeDragScope",
|
|
@@ -2451,6 +2423,16 @@
|
|
|
2451
2423
|
"type": "string",
|
|
2452
2424
|
"notes": "覆盖 Grid `groupFooterLabel` 的本列小计文案"
|
|
2453
2425
|
},
|
|
2426
|
+
{
|
|
2427
|
+
"name": "isTree",
|
|
2428
|
+
"type": "boolean",
|
|
2429
|
+
"notes": "树列候选。是否成为树列由 Grid `tree` 决定:"
|
|
2430
|
+
},
|
|
2431
|
+
{
|
|
2432
|
+
"name": "showTree",
|
|
2433
|
+
"type": "boolean",
|
|
2434
|
+
"notes": "选中的树列是否绘制缩进与展开按钮。默认 true。"
|
|
2435
|
+
},
|
|
2454
2436
|
{
|
|
2455
2437
|
"name": "autoHeight",
|
|
2456
2438
|
"type": "boolean",
|
|
@@ -2830,13 +2812,13 @@
|
|
|
2830
2812
|
},
|
|
2831
2813
|
{
|
|
2832
2814
|
"id": "tree",
|
|
2833
|
-
"intent": "树形表格 tree +
|
|
2834
|
-
"code": "<!-- @intent 树形表格 tree +
|
|
2815
|
+
"intent": "树形表格 tree + getDataPath + 列 isTree -->",
|
|
2816
|
+
"code": "<!-- @intent 树形表格 tree + getDataPath + 列 isTree -->\r\n<script setup lang=\"ts\">\r\nimport { ref } from 'vue'\r\nimport MagicGrid from '@taocompany/magic-grid'\r\nimport type { ColumnDef } from '@taocompany/magic-grid/types/core'\r\nimport '@taocompany/magic-grid/tokens.css'\r\nimport '@taocompany/magic-grid/style.css'\r\n\r\ninterface Row { id: string; name: string; pathSegments: string[] }\r\n\r\nconst columns = ref<ColumnDef<Row>[]>([{ prop: 'name', label: '节点', isTree: true }])\r\nconst data = ref<Row[]>([\r\n { id: '1', name: '根', pathSegments: ['根'] },\r\n { id: '1-1', name: '子', pathSegments: ['根', '子'] },\r\n])\r\n\r\nfunction getDataPath({ data }: { data: Row }) {\r\n return data.pathSegments\r\n}\r\n</script>\r\n\r\n<template>\r\n <MagicGrid\r\n :columns=\"columns\"\r\n :data=\"data\"\r\n row-key=\"id\"\r\n tree\r\n :get-data-path=\"getDataPath\"\r\n height=\"360\"\r\n />\r\n</template>\r\n"
|
|
2835
2817
|
},
|
|
2836
2818
|
{
|
|
2837
2819
|
"id": "tree-lazy",
|
|
2838
2820
|
"intent": "树形懒加载 loadTreeChildren -->",
|
|
2839
|
-
"code": "<!-- @intent 树形懒加载 loadTreeChildren -->\r\n<script setup lang=\"ts\">\r\nimport { ref } from 'vue'\r\nimport MagicGrid from '@taocompany/magic-grid'\r\nimport type { ColumnDef } from '@taocompany/magic-grid/types/core'\r\nimport '@taocompany/magic-grid/tokens.css'\r\nimport '@taocompany/magic-grid/style.css'\r\n\r\ninterface Row { id: string; name: string; pathSegments: string[] }\r\n\r\nconst columns = ref<ColumnDef<Row>[]>([{ prop: 'name', label: '节点' }])\r\nconst data = ref<Row[]>([{ id: 'r', name: '根', pathSegments: ['根'] }])\r\n\r\nfunction getDataPath(
|
|
2821
|
+
"code": "<!-- @intent 树形懒加载 loadTreeChildren -->\r\n<script setup lang=\"ts\">\r\nimport { ref } from 'vue'\r\nimport MagicGrid from '@taocompany/magic-grid'\r\nimport type { ColumnDef } from '@taocompany/magic-grid/types/core'\r\nimport '@taocompany/magic-grid/tokens.css'\r\nimport '@taocompany/magic-grid/style.css'\r\n\r\ninterface Row { id: string; name: string; pathSegments: string[] }\r\n\r\nconst columns = ref<ColumnDef<Row>[]>([{ prop: 'name', label: '节点', isTree: true }])\r\nconst data = ref<Row[]>([{ id: 'r', name: '根', pathSegments: ['根'] }])\r\n\r\nfunction getDataPath({ data }: { data: Row }) {\r\n return data.pathSegments\r\n}\r\n\r\nasync function loadTreeChildren({\r\n parentData,\r\n dataPath,\r\n}: {\r\n parentData: Row\r\n dataPath: string[]\r\n}) {\r\n return [{ id: `${parentData.id}-1`, name: '懒加载子节点', pathSegments: [...dataPath, '子'] }]\r\n}\r\n\r\nfunction hasTreeChildren({ dataPath }: { dataPath: string[] }) {\r\n return dataPath.length < 2\r\n}\r\n</script>\r\n\r\n<template>\r\n <MagicGrid\r\n :columns=\"columns\"\r\n :data=\"data\"\r\n row-key=\"id\"\r\n tree\r\n tree-lazy-load\r\n :get-data-path=\"getDataPath\"\r\n :load-tree-children=\"loadTreeChildren\"\r\n :has-tree-children=\"hasTreeChildren\"\r\n height=\"360\"\r\n />\r\n</template>\r\n"
|
|
2840
2822
|
},
|
|
2841
2823
|
{
|
|
2842
2824
|
"id": "master-detail",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { GridApi } from '../../core/api/gridApi';
|
|
2
2
|
import { GridSize, StatusBarHeightInput } from '../../core/theme/gridSize';
|
|
3
|
-
import { DetailRowSlotParams, OverlaySlotParams, ColumnDef, RowData, GridBorder, GridTheme
|
|
3
|
+
import { DetailRowSlotParams, OverlaySlotParams, ColumnDef, RowData, GridBorder, GridTheme } from '../../types/magic-grid';
|
|
4
4
|
import { StatusBarContext, StatusBarRangeAggregationPosition } from '../../types/status-bar';
|
|
5
5
|
import { DefineComponent, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
6
|
-
import { InfiniteRowDatasource, CellEditorFn, CellStyle, IndexColumnOptions, SelectionColumnOptions, SummaryScope, SummaryMethod, GridHorizontalAlign, GridVerticalAlign, RowSelectionInput, SelectableFn, IsRowDisabledFn, RowStyle, CellEditBehavior, CellEditType, EditorOptions, InvalidEditValueMode, RowValidator, AsyncRowMutationHandlers, SortModelItem, GetRowHeightFn, IsRowMasterFn, DetailRowHeightFn, GetDetailRowDataFn, DetailCellRendererFn, LoadMoreRowRendererFn, GroupDisplayType, GroupKeyCreatorFn, GroupComparatorFn, GroupCellRendererFn, GetDataPathFn,
|
|
7
|
-
import { DefaultSelectedRowsInput, ApplyDefaultSelectedRowsOptions, TooltipComponentFactory, OverlayComponentFactory } from '../../types/core';
|
|
6
|
+
import { InfiniteRowDatasource, CellEditorFn, CellStyle, IndexColumnOptions, SelectionColumnOptions, SummaryScope, SummaryMethod, GridHorizontalAlign, GridVerticalAlign, RowSelectionInput, SelectableFn, IsRowDisabledFn, RowStyle, CellEditBehavior, CellEditType, EditorOptions, InvalidEditValueMode, RowValidator, AsyncRowMutationHandlers, SortModelItem, GetRowHeightFn, IsRowMasterFn, DetailRowHeightFn, GetDetailRowDataFn, DetailCellRendererFn, LoadMoreRowRendererFn, GroupDisplayType, GroupKeyCreatorFn, GroupComparatorFn, GroupCellRendererFn, GetDataPathFn, TreeDragScope, SetDataPathFn, HasTreeChildrenFn, LoadTreeChildrenFn, CellCommentsDataSource, CellCommentTrigger, CellSelectionOptions, TooltipShowMode, TooltipComponentType, OverlayType, OverlayComponentType, GridMetrics, FilterModel, GetDataOptions, RowTransaction, RowNodeTransaction, ScrollEvent, LoadMoreEvent, CellClickedEvent, RowClickedEvent, RowDoubleClickedEvent, SelectionChangedEvent, IndexFocusChangedEvent, CellValueChangedEvent, RowDataChangedEvent, RowsDataChangedEvent, CellEditingStartedEvent, CellEditingStoppedEvent, CellCommitStartedEvent, CellCommitFinishedEvent, EditCommitAbortedEvent, RowCommitStartedEvent, RowCommitFinishedEvent, RowEditingStartedEvent, RowEditingStoppedEvent, RowValueChangedEvent, CellValidationFailedEvent, RowValidationFailedEvent, ColumnMovedEvent, ColumnResizedEvent, ColumnPinnedEvent, ColumnHiddenChangedEvent, RowsAddedEvent, RowsRemovedEvent, RowIdPromotedEvent, RowMovedEvent, RowDragEndEvent, RowDragCommitStartedEvent, RowDragCommitFinishedEvent, RowHeightChangedEvent, RowExpansionChangedEvent, RowGroupOpenedEvent, RowGroupChangedEvent, TreeNodeOpenedEvent, TreeChildrenLoadingEvent, TreeChildrenLoadedEvent, TreeChildrenLoadFailedEvent, CellCommentChangedEvent, CellSelectionChangedEvent, CellSelectionDeleteStartEvent, CellSelectionDeleteEndEvent, OverlayShownEvent, OverlayHiddenEvent, InfiniteBlockLoadingEvent, InfiniteBlockLoadedEvent, InfiniteBlockLoadFailedEvent, InfiniteCachePurgedEvent } from '../../core';
|
|
7
|
+
import { DefaultSelectedRowsInput, AutoSizeStrategy, ProcessCellForClipboardFn, ProcessCellFromClipboardFn, ProcessDataFromClipboardFn, ApplyDefaultSelectedRowsOptions, TooltipComponentFactory, OverlayComponentFactory } from '../../types/core';
|
|
8
8
|
import { StatusBarRangeAggregationPrecisionInput } from '../StatusBar/resolveStatusBarRangeAggregationPrecision';
|
|
9
9
|
import { GridReadyEvent, GridDestroyedEvent, FirstRenderedEvent } from '../..';
|
|
10
10
|
type __VLS_Slots = {
|
|
@@ -496,29 +496,13 @@ declare const __VLS_base: DefineComponent<ExtractPropTypes<{
|
|
|
496
496
|
readonly default: undefined;
|
|
497
497
|
};
|
|
498
498
|
readonly tree: {
|
|
499
|
-
readonly type:
|
|
499
|
+
readonly type: PropType<boolean | string>;
|
|
500
500
|
readonly default: false;
|
|
501
501
|
};
|
|
502
502
|
readonly getDataPath: {
|
|
503
503
|
readonly type: PropType<GetDataPathFn>;
|
|
504
504
|
readonly default: undefined;
|
|
505
505
|
};
|
|
506
|
-
readonly showTreeColumn: {
|
|
507
|
-
readonly type: BooleanConstructor;
|
|
508
|
-
readonly default: undefined;
|
|
509
|
-
};
|
|
510
|
-
readonly autoTreeColumnDef: {
|
|
511
|
-
readonly type: PropType<Partial< ColumnDef>>;
|
|
512
|
-
readonly default: undefined;
|
|
513
|
-
};
|
|
514
|
-
readonly treeValueGetter: {
|
|
515
|
-
readonly type: PropType<TreeValueGetterFn>;
|
|
516
|
-
readonly default: undefined;
|
|
517
|
-
};
|
|
518
|
-
readonly treeDisplayType: {
|
|
519
|
-
readonly type: PropType<TreeDisplayType>;
|
|
520
|
-
readonly default: undefined;
|
|
521
|
-
};
|
|
522
506
|
readonly treeDragScope: {
|
|
523
507
|
readonly type: PropType<TreeDragScope>;
|
|
524
508
|
readonly default: undefined;
|
|
@@ -1250,29 +1234,13 @@ declare const __VLS_base: DefineComponent<ExtractPropTypes<{
|
|
|
1250
1234
|
readonly default: undefined;
|
|
1251
1235
|
};
|
|
1252
1236
|
readonly tree: {
|
|
1253
|
-
readonly type:
|
|
1237
|
+
readonly type: PropType<boolean | string>;
|
|
1254
1238
|
readonly default: false;
|
|
1255
1239
|
};
|
|
1256
1240
|
readonly getDataPath: {
|
|
1257
1241
|
readonly type: PropType<GetDataPathFn>;
|
|
1258
1242
|
readonly default: undefined;
|
|
1259
1243
|
};
|
|
1260
|
-
readonly showTreeColumn: {
|
|
1261
|
-
readonly type: BooleanConstructor;
|
|
1262
|
-
readonly default: undefined;
|
|
1263
|
-
};
|
|
1264
|
-
readonly autoTreeColumnDef: {
|
|
1265
|
-
readonly type: PropType<Partial< ColumnDef>>;
|
|
1266
|
-
readonly default: undefined;
|
|
1267
|
-
};
|
|
1268
|
-
readonly treeValueGetter: {
|
|
1269
|
-
readonly type: PropType<TreeValueGetterFn>;
|
|
1270
|
-
readonly default: undefined;
|
|
1271
|
-
};
|
|
1272
|
-
readonly treeDisplayType: {
|
|
1273
|
-
readonly type: PropType<TreeDisplayType>;
|
|
1274
|
-
readonly default: undefined;
|
|
1275
|
-
};
|
|
1276
1244
|
readonly treeDragScope: {
|
|
1277
1245
|
readonly type: PropType<TreeDragScope>;
|
|
1278
1246
|
readonly default: undefined;
|
|
@@ -1518,15 +1486,6 @@ declare const __VLS_base: DefineComponent<ExtractPropTypes<{
|
|
|
1518
1486
|
"onInfinite-cache-purged"?: ((event: InfiniteCachePurgedEvent) => any) | undefined;
|
|
1519
1487
|
}>, {
|
|
1520
1488
|
readonly rounded: number | boolean;
|
|
1521
|
-
readonly tree: boolean;
|
|
1522
|
-
readonly loading: boolean;
|
|
1523
|
-
readonly rowModelType: "clientSide" | "infinite";
|
|
1524
|
-
readonly infiniteDatasource: InfiniteRowDatasource;
|
|
1525
|
-
readonly blockSize: number;
|
|
1526
|
-
readonly maxBlocksInCache: number;
|
|
1527
|
-
readonly infiniteInitialRowCount: number;
|
|
1528
|
-
readonly infiniteMaxRetries: number;
|
|
1529
|
-
readonly infiniteLoadingRowVisible: boolean;
|
|
1530
1489
|
readonly data: RowData[];
|
|
1531
1490
|
readonly rowHeight: number;
|
|
1532
1491
|
readonly cellSelection: boolean | CellSelectionOptions;
|
|
@@ -1554,7 +1513,8 @@ declare const __VLS_base: DefineComponent<ExtractPropTypes<{
|
|
|
1554
1513
|
readonly summaryRowHeight: number;
|
|
1555
1514
|
readonly summaryMethod: SummaryMethod;
|
|
1556
1515
|
readonly isRowDisabled: boolean | IsRowDisabledFn;
|
|
1557
|
-
readonly
|
|
1516
|
+
readonly loading: boolean;
|
|
1517
|
+
readonly colResizeDefault: "shift";
|
|
1558
1518
|
readonly suppressOverlays: OverlayType[];
|
|
1559
1519
|
readonly suppressLoadingOverlay: boolean;
|
|
1560
1520
|
readonly suppressNoRowsOverlay: boolean;
|
|
@@ -1571,21 +1531,22 @@ declare const __VLS_base: DefineComponent<ExtractPropTypes<{
|
|
|
1571
1531
|
readonly overlayComponent: OverlayComponentFactory;
|
|
1572
1532
|
readonly overlayComponentParams: Record<string, unknown>;
|
|
1573
1533
|
readonly overlayInteraction: boolean;
|
|
1574
|
-
readonly border: GridBorder;
|
|
1575
|
-
readonly colResizeDefault: "shift";
|
|
1576
|
-
readonly cellEditorRegistry: Record<string, CellEditorFn>;
|
|
1577
|
-
readonly rowKey: string;
|
|
1578
|
-
readonly stripe: boolean;
|
|
1579
|
-
readonly cellColor: CellStyle;
|
|
1580
|
-
readonly theme: GridTheme;
|
|
1581
1534
|
readonly size: GridSize;
|
|
1535
|
+
readonly editorOptions: EditorOptions;
|
|
1536
|
+
readonly autoSizeStrategy: AutoSizeStrategy;
|
|
1537
|
+
readonly tree: string | boolean;
|
|
1538
|
+
readonly rowKey: string;
|
|
1582
1539
|
readonly headerHeight: number;
|
|
1583
|
-
readonly showIndexColumn: boolean;
|
|
1584
|
-
readonly indexColumn: IndexColumnOptions;
|
|
1585
|
-
readonly selectionColumn: SelectionColumnOptions;
|
|
1586
|
-
readonly navigateHeader: boolean;
|
|
1587
|
-
readonly navigateFooter: boolean;
|
|
1588
1540
|
readonly rowBuffer: number;
|
|
1541
|
+
readonly editBehavior: CellEditBehavior;
|
|
1542
|
+
readonly invalidEditValueMode: InvalidEditValueMode;
|
|
1543
|
+
readonly rowValidator: RowValidator;
|
|
1544
|
+
readonly asyncRowMutation: AsyncRowMutationHandlers;
|
|
1545
|
+
readonly selectable: SelectableFn;
|
|
1546
|
+
readonly reserveSelection: boolean;
|
|
1547
|
+
readonly preserveScrollOnSetData: boolean;
|
|
1548
|
+
readonly quickFilterText: string;
|
|
1549
|
+
readonly floatingFilter: boolean;
|
|
1589
1550
|
readonly scrollEndFlushMs: number;
|
|
1590
1551
|
readonly frameBudgetMs: number;
|
|
1591
1552
|
readonly scrollEndFrameBudgetMs: number;
|
|
@@ -1593,41 +1554,20 @@ declare const __VLS_base: DefineComponent<ExtractPropTypes<{
|
|
|
1593
1554
|
readonly deferRowDestroyOnScroll: boolean;
|
|
1594
1555
|
readonly rendererFrameBudgetMs: number;
|
|
1595
1556
|
readonly cellRendererPresentation: "immediate" | "deferred" | "placeholder-then-vue";
|
|
1596
|
-
readonly
|
|
1597
|
-
readonly
|
|
1598
|
-
readonly
|
|
1599
|
-
readonly editableCellStyle: CellStyle;
|
|
1600
|
-
readonly showEditableCellIcon: boolean;
|
|
1601
|
-
readonly disabledCellStyle: CellStyle;
|
|
1602
|
-
readonly showDisabledCellIcon: boolean;
|
|
1603
|
-
readonly reserveSelection: boolean;
|
|
1604
|
-
readonly preserveScrollOnSetData: boolean;
|
|
1605
|
-
readonly defaultSelectedRows: DefaultSelectedRowsInput;
|
|
1606
|
-
readonly editBehavior: CellEditBehavior;
|
|
1607
|
-
readonly editorOptions: EditorOptions;
|
|
1608
|
-
readonly invalidEditValueMode: InvalidEditValueMode;
|
|
1609
|
-
readonly rowValidator: RowValidator;
|
|
1610
|
-
readonly asyncRowMutation: AsyncRowMutationHandlers;
|
|
1611
|
-
readonly height: string | number;
|
|
1557
|
+
readonly showIndexColumn: boolean;
|
|
1558
|
+
readonly indexColumn: IndexColumnOptions;
|
|
1559
|
+
readonly selectionColumn: SelectionColumnOptions;
|
|
1612
1560
|
readonly defaultSort: SortModelItem[];
|
|
1613
1561
|
readonly enableHeaderSortClick: boolean;
|
|
1562
|
+
readonly showUnsortedSortHintOnHover: boolean;
|
|
1614
1563
|
readonly columnMovable: boolean;
|
|
1615
|
-
readonly skipHeaderOnAutoSize: boolean;
|
|
1616
|
-
readonly autoSizePadding: number;
|
|
1617
1564
|
readonly suppressMoveWhenColumnDragging: boolean;
|
|
1618
1565
|
readonly suppressColumnMoveAnimation: boolean;
|
|
1619
1566
|
readonly allowCrossLaneColumnMove: boolean;
|
|
1620
|
-
readonly
|
|
1621
|
-
readonly
|
|
1622
|
-
readonly floatingFilter: boolean;
|
|
1567
|
+
readonly skipHeaderOnAutoSize: boolean;
|
|
1568
|
+
readonly autoSizePadding: number;
|
|
1623
1569
|
readonly filterSetValueMode: "current" | "reserve";
|
|
1624
|
-
readonly filterSetDateLayoutMode: "
|
|
1625
|
-
readonly showStatusBar: boolean;
|
|
1626
|
-
readonly showDefaultStatusBarPanels: boolean;
|
|
1627
|
-
readonly statusBarHeight: StatusBarHeightInput;
|
|
1628
|
-
readonly showStatusBarRangeAggregation: boolean;
|
|
1629
|
-
readonly statusBarRangeAggregationPosition: StatusBarRangeAggregationPosition;
|
|
1630
|
-
readonly statusBarRangeAggregationPrecision: StatusBarRangeAggregationPrecisionInput;
|
|
1570
|
+
readonly filterSetDateLayoutMode: "list" | "tree";
|
|
1631
1571
|
readonly rowDragManaged: boolean;
|
|
1632
1572
|
readonly getRowHeight: GetRowHeightFn;
|
|
1633
1573
|
readonly rowHeightMin: number;
|
|
@@ -1644,18 +1584,6 @@ declare const __VLS_base: DefineComponent<ExtractPropTypes<{
|
|
|
1644
1584
|
readonly showExpandColumn: boolean;
|
|
1645
1585
|
readonly getDetailRowData: GetDetailRowDataFn;
|
|
1646
1586
|
readonly detailCellRenderer: DetailCellRendererFn;
|
|
1647
|
-
readonly loadMoreRow: {
|
|
1648
|
-
enabled?: boolean;
|
|
1649
|
-
height?: number;
|
|
1650
|
-
loading?: boolean;
|
|
1651
|
-
hasMore?: boolean;
|
|
1652
|
-
labels?: {
|
|
1653
|
-
loadMore?: string;
|
|
1654
|
-
loading?: string;
|
|
1655
|
-
exhausted?: string;
|
|
1656
|
-
};
|
|
1657
|
-
};
|
|
1658
|
-
readonly loadMoreRowRenderer: LoadMoreRowRendererFn;
|
|
1659
1587
|
readonly rowGrouping: boolean;
|
|
1660
1588
|
readonly groupDefaultExpanded: number;
|
|
1661
1589
|
readonly showGroupHeader: boolean;
|
|
@@ -1668,13 +1596,9 @@ declare const __VLS_base: DefineComponent<ExtractPropTypes<{
|
|
|
1668
1596
|
readonly groupSortKey: string;
|
|
1669
1597
|
readonly groupCellRenderer: GroupCellRendererFn;
|
|
1670
1598
|
readonly getDataPath: GetDataPathFn;
|
|
1671
|
-
readonly showTreeColumn: boolean;
|
|
1672
|
-
readonly autoTreeColumnDef: Partial< ColumnDef<RowData>>;
|
|
1673
|
-
readonly treeValueGetter: TreeValueGetterFn;
|
|
1674
|
-
readonly treeDisplayType: "singleColumn";
|
|
1675
1599
|
readonly treeDragScope: TreeDragScope;
|
|
1676
|
-
readonly treeHierarchyActions: boolean;
|
|
1677
1600
|
readonly setDataPath: SetDataPathFn;
|
|
1601
|
+
readonly treeHierarchyActions: boolean;
|
|
1678
1602
|
readonly treeLazyLoad: boolean;
|
|
1679
1603
|
readonly hasTreeChildren: HasTreeChildrenFn;
|
|
1680
1604
|
readonly loadTreeChildren: LoadTreeChildrenFn;
|
|
@@ -1682,6 +1606,11 @@ declare const __VLS_base: DefineComponent<ExtractPropTypes<{
|
|
|
1682
1606
|
readonly cellCommentTrigger: CellCommentTrigger;
|
|
1683
1607
|
readonly cellCommentShowDelay: number;
|
|
1684
1608
|
readonly cellCommentHideDelay: number;
|
|
1609
|
+
readonly rowStyle: RowStyle;
|
|
1610
|
+
readonly editableCellStyle: CellStyle;
|
|
1611
|
+
readonly showEditableCellIcon: boolean;
|
|
1612
|
+
readonly disabledCellStyle: CellStyle;
|
|
1613
|
+
readonly showDisabledCellIcon: boolean;
|
|
1685
1614
|
readonly processCellForClipboard: ProcessCellForClipboardFn;
|
|
1686
1615
|
readonly processCellFromClipboard: ProcessCellFromClipboardFn;
|
|
1687
1616
|
readonly processDataFromClipboard: ProcessDataFromClipboardFn;
|
|
@@ -1692,6 +1621,41 @@ declare const __VLS_base: DefineComponent<ExtractPropTypes<{
|
|
|
1692
1621
|
readonly tooltipHideDelay: number;
|
|
1693
1622
|
readonly tooltipInteraction: boolean;
|
|
1694
1623
|
readonly tooltipMouseTrack: boolean;
|
|
1624
|
+
readonly navigateHeader: boolean;
|
|
1625
|
+
readonly navigateFooter: boolean;
|
|
1626
|
+
readonly rowModelType: "clientSide" | "infinite";
|
|
1627
|
+
readonly infiniteDatasource: InfiniteRowDatasource;
|
|
1628
|
+
readonly blockSize: number;
|
|
1629
|
+
readonly maxBlocksInCache: number;
|
|
1630
|
+
readonly infiniteInitialRowCount: number;
|
|
1631
|
+
readonly infiniteMaxRetries: number;
|
|
1632
|
+
readonly infiniteLoadingRowVisible: boolean;
|
|
1633
|
+
readonly height: string | number;
|
|
1634
|
+
readonly theme: GridTheme;
|
|
1635
|
+
readonly stripe: boolean;
|
|
1636
|
+
readonly rowSelection: RowSelectionInput;
|
|
1637
|
+
readonly border: GridBorder;
|
|
1638
|
+
readonly cellEditorRegistry: Record<string, CellEditorFn>;
|
|
1639
|
+
readonly cellColor: CellStyle;
|
|
1640
|
+
readonly defaultSelectedRows: DefaultSelectedRowsInput;
|
|
1641
|
+
readonly showStatusBar: boolean;
|
|
1642
|
+
readonly showDefaultStatusBarPanels: boolean;
|
|
1643
|
+
readonly statusBarHeight: StatusBarHeightInput;
|
|
1644
|
+
readonly showStatusBarRangeAggregation: boolean;
|
|
1645
|
+
readonly statusBarRangeAggregationPosition: StatusBarRangeAggregationPosition;
|
|
1646
|
+
readonly statusBarRangeAggregationPrecision: StatusBarRangeAggregationPrecisionInput;
|
|
1647
|
+
readonly loadMoreRow: {
|
|
1648
|
+
enabled?: boolean;
|
|
1649
|
+
height?: number;
|
|
1650
|
+
loading?: boolean;
|
|
1651
|
+
hasMore?: boolean;
|
|
1652
|
+
labels?: {
|
|
1653
|
+
loadMore?: string;
|
|
1654
|
+
loading?: string;
|
|
1655
|
+
exhausted?: string;
|
|
1656
|
+
};
|
|
1657
|
+
};
|
|
1658
|
+
readonly loadMoreRowRenderer: LoadMoreRowRendererFn;
|
|
1695
1659
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1696
1660
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
1697
1661
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MagicGrid.vue.d.ts","sourceRoot":"","sources":["../../../src/components/MagicGrid/MagicGrid.vue"],"names":[],"mappings":";;;;;AAmIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK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