yc-pro-components 0.0.42 → 0.0.44
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/es/component.mjs +2 -0
- package/es/components/check-card/index.d.ts +61 -61
- package/es/components/check-card/src/index.vue.d.ts +4 -4
- package/es/components/check-card-group/index.d.ts +43 -43
- package/es/components/check-card-group/src/index.vue.d.ts +3 -3
- package/es/components/date-picker/index.d.ts +20 -20
- package/es/components/date-picker/src/index.vue.d.ts +12 -12
- package/es/components/dialog/index.d.ts +26 -26
- package/es/components/dialog/src/index.vue.d.ts +2 -2
- package/es/components/dialog-form/index.d.ts +31 -31
- package/es/components/dialog-form/src/index.vue.d.ts +9 -9
- package/es/components/display-item/index.d.ts +41 -41
- package/es/components/display-item/src/index.vue.d.ts +22 -22
- package/es/components/drawer-form/index.d.ts +65 -65
- package/es/components/drawer-form/src/index.vue.d.ts +15 -15
- package/es/components/form/index.d.ts +45 -45
- package/es/components/form/src/form-content.vue.d.ts +20 -20
- package/es/components/form/src/index.vue.d.ts +17 -17
- package/es/components/form-item/index.d.ts +48 -48
- package/es/components/form-item/src/index.vue.d.ts +14 -14
- package/es/components/header/index.d.ts +19 -19
- package/es/components/header/src/index.vue.d.ts +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +4 -0
- package/es/components/input-tag/index.d.ts +15 -15
- package/es/components/input-tag/src/index.vue.d.ts +3 -3
- package/es/components/layout/index.d.ts +50 -50
- package/es/components/layout/src/index.vue.d.ts +11 -11
- package/es/components/page/index.d.ts +4166 -2538
- package/es/components/page/src/index.vue.d.ts +712 -137
- package/es/components/page/src/index.vue2.mjs +120 -31
- package/es/components/pagination/index.d.ts +42 -42
- package/es/components/pagination/src/index.vue.d.ts +3 -3
- package/es/components/radio/index.d.ts +35 -35
- package/es/components/radio/src/index.vue.d.ts +27 -27
- package/es/components/render/index.d.ts +3 -3
- package/es/components/render/src/index.vue.d.ts +1 -1
- package/es/components/search/index.d.ts +154 -154
- package/es/components/search/src/index.vue.d.ts +50 -50
- package/es/components/sidebar/index.d.ts +15 -15
- package/es/components/sidebar/src/index.vue.d.ts +5 -5
- package/es/components/steps-form/index.d.ts +23 -23
- package/es/components/steps-form/src/index.vue.d.ts +2 -2
- package/es/components/table/src/table-column.vue.d.ts +37 -37
- package/es/components/utils/index.d.ts +2 -2
- package/es/components/virtual-table/index.d.ts +646 -0
- package/es/components/virtual-table/index.mjs +8 -0
- package/es/components/virtual-table/src/index.vue.d.ts +139 -0
- package/es/components/virtual-table/src/index.vue.mjs +6 -0
- package/es/components/virtual-table/src/index.vue2.mjs +327 -0
- package/es/components/virtual-table/src/type.d.ts +295 -0
- package/es/components/virtual-table/src/type.mjs +1 -0
- package/es/components/virtual-table/src/use-column-adapter.d.ts +40 -0
- package/es/components/virtual-table/src/use-column-adapter.mjs +137 -0
- package/es/components/virtual-table/src/use-virtual-scroll.d.ts +35 -0
- package/es/components/virtual-table/src/use-virtual-scroll.mjs +71 -0
- package/es/components/virtual-table/src/use-virtual-selection.d.ts +40 -0
- package/es/components/virtual-table/src/use-virtual-selection.mjs +112 -0
- package/es/components/virtual-table/src/virtual-table-action-bar.d.ts +11 -0
- package/es/components/virtual-table/src/virtual-table-action-bar.mjs +121 -0
- package/es/components/virtual-table/src/virtual-table-cell-renderer.d.ts +16 -0
- package/es/components/virtual-table/src/virtual-table-cell-renderer.mjs +170 -0
- package/es/components/virtual-table/src/virtual-table-header-renderer.d.ts +10 -0
- package/es/components/virtual-table/src/virtual-table-header-renderer.mjs +51 -0
- package/es/components/virtual-table/style/css.d.ts +3 -0
- package/es/components/virtual-table/style/css.mjs +1 -0
- package/es/components/virtual-table/style/index.d.ts +12 -0
- package/es/components/virtual-table/style/index.mjs +1 -0
- package/es/components/yc-dialog/index.d.ts +24 -24
- package/es/components/yc-download-dialog/index.d.ts +19 -19
- package/es/components/yc-download-dialog/src/index.vue.d.ts +1 -1
- package/es/components/yc-form-container-header/index.d.ts +12 -12
- package/es/components/yc-more-actions/index.d.ts +46 -46
- package/es/components/yc-more-actions/src/index.vue.d.ts +3 -3
- package/es/components/yc-plus-page/src/index.vue.d.ts +2445 -1430
- package/es/components/yc-plus-page/src/index.vue.mjs +1 -1
- package/es/components/yc-plus-page/src/type.d.ts +8 -2
- package/es/components/yc-segmented/index.d.ts +2 -2
- package/es/components/yc-segmented/src/index.d.ts +2 -2
- package/es/components/yc-select-v2/src/index.vue.d.ts +3 -3
- package/es/components/yc-status-dialog/src/index.vue.d.ts +1 -1
- package/es/components/yc-tabs-with-filter/index.d.ts +16 -16
- package/es/components/yc-text/src/index.vue.d.ts +2 -2
- package/es/hooks/usePlusFormReset.d.ts +238 -238
- package/es/index.css +20 -1
- package/es/index.d.ts +1 -0
- package/es/index.mjs +4 -0
- package/es/yc-components/index.d.ts +1 -0
- package/index.css +111 -6
- package/index.js +1141 -149
- package/index.min.css +2 -1
- package/index.min.js +13 -10
- package/index.min.mjs +13 -10
- package/index.mjs +1139 -151
- package/lib/component.js +42 -40
- package/lib/components/check-card/index.d.ts +61 -61
- package/lib/components/check-card/src/index.vue.d.ts +4 -4
- package/lib/components/check-card-group/index.d.ts +43 -43
- package/lib/components/check-card-group/src/index.vue.d.ts +3 -3
- package/lib/components/date-picker/index.d.ts +20 -20
- package/lib/components/date-picker/src/index.vue.d.ts +12 -12
- package/lib/components/dialog/index.d.ts +26 -26
- package/lib/components/dialog/src/index.vue.d.ts +2 -2
- package/lib/components/dialog-form/index.d.ts +31 -31
- package/lib/components/dialog-form/src/index.vue.d.ts +9 -9
- package/lib/components/display-item/index.d.ts +41 -41
- package/lib/components/display-item/src/index.vue.d.ts +22 -22
- package/lib/components/drawer-form/index.d.ts +65 -65
- package/lib/components/drawer-form/src/index.vue.d.ts +15 -15
- package/lib/components/form/index.d.ts +45 -45
- package/lib/components/form/src/form-content.vue.d.ts +20 -20
- package/lib/components/form/src/index.vue.d.ts +17 -17
- package/lib/components/form-item/index.d.ts +48 -48
- package/lib/components/form-item/src/index.vue.d.ts +14 -14
- package/lib/components/header/index.d.ts +19 -19
- package/lib/components/header/src/index.vue.d.ts +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +98 -90
- package/lib/components/input-tag/index.d.ts +15 -15
- package/lib/components/input-tag/src/index.vue.d.ts +3 -3
- package/lib/components/layout/index.d.ts +50 -50
- package/lib/components/layout/src/index.vue.d.ts +11 -11
- package/lib/components/page/index.d.ts +4166 -2538
- package/lib/components/page/src/index.vue.d.ts +712 -137
- package/lib/components/page/src/index.vue2.js +125 -36
- package/lib/components/pagination/index.d.ts +42 -42
- package/lib/components/pagination/src/index.vue.d.ts +3 -3
- package/lib/components/radio/index.d.ts +35 -35
- package/lib/components/radio/src/index.vue.d.ts +27 -27
- package/lib/components/render/index.d.ts +3 -3
- package/lib/components/render/src/index.vue.d.ts +1 -1
- package/lib/components/search/index.d.ts +154 -154
- package/lib/components/search/src/index.vue.d.ts +50 -50
- package/lib/components/sidebar/index.d.ts +15 -15
- package/lib/components/sidebar/src/index.vue.d.ts +5 -5
- package/lib/components/steps-form/index.d.ts +23 -23
- package/lib/components/steps-form/src/index.vue.d.ts +2 -2
- package/lib/components/table/src/table-column.vue.d.ts +37 -37
- package/lib/components/utils/index.d.ts +2 -2
- package/lib/components/virtual-table/index.d.ts +646 -0
- package/lib/components/virtual-table/index.js +13 -0
- package/lib/components/virtual-table/src/index.vue.d.ts +139 -0
- package/lib/components/virtual-table/src/index.vue.js +10 -0
- package/lib/components/virtual-table/src/index.vue2.js +331 -0
- package/lib/components/virtual-table/src/type.d.ts +295 -0
- package/lib/components/virtual-table/src/type.js +2 -0
- package/lib/components/virtual-table/src/use-column-adapter.d.ts +40 -0
- package/lib/components/virtual-table/src/use-column-adapter.js +139 -0
- package/lib/components/virtual-table/src/use-virtual-scroll.d.ts +35 -0
- package/lib/components/virtual-table/src/use-virtual-scroll.js +73 -0
- package/lib/components/virtual-table/src/use-virtual-selection.d.ts +40 -0
- package/lib/components/virtual-table/src/use-virtual-selection.js +114 -0
- package/lib/components/virtual-table/src/virtual-table-action-bar.d.ts +11 -0
- package/lib/components/virtual-table/src/virtual-table-action-bar.js +123 -0
- package/lib/components/virtual-table/src/virtual-table-cell-renderer.d.ts +16 -0
- package/lib/components/virtual-table/src/virtual-table-cell-renderer.js +172 -0
- package/lib/components/virtual-table/src/virtual-table-header-renderer.d.ts +10 -0
- package/lib/components/virtual-table/src/virtual-table-header-renderer.js +53 -0
- package/lib/components/virtual-table/style/css.d.ts +3 -0
- package/lib/components/virtual-table/style/css.js +2 -0
- package/lib/components/virtual-table/style/index.d.ts +12 -0
- package/lib/components/virtual-table/style/index.js +2 -0
- package/lib/components/yc-dialog/index.d.ts +24 -24
- package/lib/components/yc-download-dialog/index.d.ts +19 -19
- package/lib/components/yc-download-dialog/src/index.vue.d.ts +1 -1
- package/lib/components/yc-form-container-header/index.d.ts +12 -12
- package/lib/components/yc-more-actions/index.d.ts +46 -46
- package/lib/components/yc-more-actions/src/index.vue.d.ts +3 -3
- package/lib/components/yc-plus-page/src/index.vue.d.ts +2445 -1430
- package/lib/components/yc-plus-page/src/index.vue.js +1 -1
- package/lib/components/yc-plus-page/src/type.d.ts +8 -2
- package/lib/components/yc-segmented/index.d.ts +2 -2
- package/lib/components/yc-segmented/src/index.d.ts +2 -2
- package/lib/components/yc-select-v2/src/index.vue.d.ts +3 -3
- package/lib/components/yc-status-dialog/src/index.vue.d.ts +1 -1
- package/lib/components/yc-tabs-with-filter/index.d.ts +16 -16
- package/lib/components/yc-text/src/index.vue.d.ts +2 -2
- package/lib/hooks/usePlusFormReset.d.ts +238 -238
- package/lib/index.css +20 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +143 -135
- package/lib/yc-components/index.d.ts +1 -0
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/plus-virtual-table.css +1 -0
- package/theme-chalk/src/index.scss +3 -0
- package/theme-chalk/src/virtual-table.scss +128 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { ComponentSize } from 'element-plus/es/constants';
|
|
2
|
+
import { PlusPaginationProps } from 'yc-pro-components/es/components/pagination';
|
|
3
|
+
import { ActionBarProps, ButtonsCallBackParams } from 'yc-pro-components/es/components/table';
|
|
4
|
+
import { RecordType, PageInfo, PlusColumn } from 'yc-pro-components/es/types';
|
|
5
|
+
import { TableV2FixedDir, CheckboxValueType } from 'element-plus';
|
|
6
|
+
import { CSSProperties, VNode } from 'vue';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* el-table-v2 单元格渲染器参数
|
|
10
|
+
* @see https://element-plus.org/en-US/component/table-v2#column-attribute
|
|
11
|
+
*/
|
|
12
|
+
export interface VirtualCellRendererParams {
|
|
13
|
+
/** 当前单元格数据(row[dataKey] 的值) */
|
|
14
|
+
cellData: unknown;
|
|
15
|
+
/** 当前列配置 */
|
|
16
|
+
column: VirtualTableColumn;
|
|
17
|
+
/** 列索引 */
|
|
18
|
+
columnIndex: number;
|
|
19
|
+
/** 所有列配置 */
|
|
20
|
+
columns: VirtualTableColumn[];
|
|
21
|
+
/** 当前行数据 */
|
|
22
|
+
rowData: RecordType;
|
|
23
|
+
/** 行索引 */
|
|
24
|
+
rowIndex: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* el-table-v2 表头渲染器参数
|
|
28
|
+
*/
|
|
29
|
+
export interface VirtualHeaderRendererParams {
|
|
30
|
+
/** 当前列配置 */
|
|
31
|
+
column: VirtualTableColumn;
|
|
32
|
+
/** 列索引 */
|
|
33
|
+
columnIndex: number;
|
|
34
|
+
/** 所有列配置 */
|
|
35
|
+
columns: VirtualTableColumn[];
|
|
36
|
+
/** 表头索引(多级表头时有用) */
|
|
37
|
+
headerIndex: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* el-table-v2 的列配置类型
|
|
41
|
+
* 这是 el-table-v2 原生要求的列格式
|
|
42
|
+
*/
|
|
43
|
+
export interface VirtualTableColumn {
|
|
44
|
+
/** 列唯一标识(必填) */
|
|
45
|
+
key: string;
|
|
46
|
+
/** 数据字段名(对应 row[dataKey]) */
|
|
47
|
+
dataKey: string;
|
|
48
|
+
/** 表头标题 */
|
|
49
|
+
title: string;
|
|
50
|
+
/** 列宽度(必填,el-table-v2 要求所有列必须指定宽度) */
|
|
51
|
+
width: number;
|
|
52
|
+
/**
|
|
53
|
+
* 列固定方向
|
|
54
|
+
* - true / TableV2FixedDir.LEFT: 固定在左侧
|
|
55
|
+
* - TableV2FixedDir.RIGHT: 固定在右侧
|
|
56
|
+
*/
|
|
57
|
+
fixed?: true | TableV2FixedDir;
|
|
58
|
+
/** 内容对齐方式 */
|
|
59
|
+
align?: 'left' | 'center' | 'right';
|
|
60
|
+
/** 自定义单元格渲染器 */
|
|
61
|
+
cellRenderer?: (params: VirtualCellRendererParams) => VNode | string | number;
|
|
62
|
+
/** 自定义表头渲染器 */
|
|
63
|
+
headerCellRenderer?: (params: VirtualHeaderRendererParams) => VNode | string;
|
|
64
|
+
/** 是否可排序 */
|
|
65
|
+
sortable?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* 内部引用:关联的 PlusColumn 原始配置
|
|
68
|
+
* 用于在渲染器中访问 PlusColumn 的完整配置(如 options、emptyText 等)
|
|
69
|
+
*/
|
|
70
|
+
_plusColumn?: PlusColumn;
|
|
71
|
+
/** CSS 类名 */
|
|
72
|
+
class?: string;
|
|
73
|
+
/** 最大宽度 */
|
|
74
|
+
maxWidth?: number;
|
|
75
|
+
/** 最小宽度 */
|
|
76
|
+
minWidth?: number;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 行选择变化事件参数
|
|
80
|
+
*/
|
|
81
|
+
export interface SelectionChangeParams {
|
|
82
|
+
/** 当前选中的所有行数据 */
|
|
83
|
+
selectedRows: RecordType[];
|
|
84
|
+
/** 当前选中的所有行 Key */
|
|
85
|
+
selectedKeys: Set<string | number>;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* 单行选择事件参数
|
|
89
|
+
*/
|
|
90
|
+
export interface SelectParams {
|
|
91
|
+
/** 变化后的选中行列表 */
|
|
92
|
+
selection: RecordType[];
|
|
93
|
+
/** 触发变化的行数据 */
|
|
94
|
+
row: RecordType;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 全选事件参数
|
|
98
|
+
*/
|
|
99
|
+
export interface SelectAllParams {
|
|
100
|
+
/** 变化后的选中行列表 */
|
|
101
|
+
selection: RecordType[];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* useVirtualSelection composable 的配置
|
|
105
|
+
*/
|
|
106
|
+
export interface UseVirtualSelectionConfig {
|
|
107
|
+
/** 行数据的唯一标识字段名 */
|
|
108
|
+
rowKey: string;
|
|
109
|
+
/** 全部表格数据 */
|
|
110
|
+
data: RecordType[];
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* useVirtualSelection composable 的返回值
|
|
114
|
+
*/
|
|
115
|
+
export interface UseVirtualSelectionReturn {
|
|
116
|
+
/** 当前选中的行 Key 集合 */
|
|
117
|
+
selectedKeys: Set<string | number>;
|
|
118
|
+
/** 是否全选 */
|
|
119
|
+
isAllSelected: boolean;
|
|
120
|
+
/** 是否半选(部分选中) */
|
|
121
|
+
isIndeterminate: boolean;
|
|
122
|
+
/** 切换单行选择 */
|
|
123
|
+
toggleRowSelection: (row: RecordType, selected?: boolean) => void;
|
|
124
|
+
/** 切换全选 */
|
|
125
|
+
toggleAllSelection: (selected?: boolean) => void;
|
|
126
|
+
/** 获取选中的行数据 */
|
|
127
|
+
getSelectionRows: () => RecordType[];
|
|
128
|
+
/** 清空选择 */
|
|
129
|
+
clearSelection: () => void;
|
|
130
|
+
/** 处理 checkbox 变化(单行) */
|
|
131
|
+
handleCheckboxChange: (row: RecordType, value: CheckboxValueType) => void;
|
|
132
|
+
/** 处理全选 checkbox 变化 */
|
|
133
|
+
handleAllCheckboxChange: (value: CheckboxValueType) => void;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* 列适配器配置
|
|
137
|
+
*/
|
|
138
|
+
export interface ColumnAdapterConfig {
|
|
139
|
+
/** 原始 PlusColumn 配置 */
|
|
140
|
+
columns: PlusColumn[];
|
|
141
|
+
/** 是否显示选择列 */
|
|
142
|
+
isSelection?: boolean;
|
|
143
|
+
/** 是否显示序号列 */
|
|
144
|
+
hasIndexColumn?: boolean;
|
|
145
|
+
/** 操作栏配置 */
|
|
146
|
+
actionBar?: false | Partial<ActionBarProps>;
|
|
147
|
+
/** 行唯一标识字段 */
|
|
148
|
+
rowKey?: string;
|
|
149
|
+
/** 默认列宽度(当 PlusColumn 未指定 width 时使用) */
|
|
150
|
+
defaultColumnWidth?: number;
|
|
151
|
+
/** 全局空值文本 */
|
|
152
|
+
columnsEmptyText?: string;
|
|
153
|
+
/** 分页信息(用于计算序号) */
|
|
154
|
+
pageInfo?: PageInfo;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* PlusVirtualTable 组件属性
|
|
158
|
+
*
|
|
159
|
+
* 设计目标:与 PlusTable 的 Props 尽可能对齐,
|
|
160
|
+
* 让上层组件(PlusPage / YcPlusPage)可以透明切换。
|
|
161
|
+
*
|
|
162
|
+
* 不支持的 PlusTable 特性(虚拟模式下不可用):
|
|
163
|
+
* - editable(可编辑单元格)
|
|
164
|
+
* - dragSortable(拖拽排序行)
|
|
165
|
+
* - hasExpand(展开行)
|
|
166
|
+
* - titleBar 中的 columnSetting(列设置)
|
|
167
|
+
* - isRadio(单选模式)
|
|
168
|
+
*/
|
|
169
|
+
export interface PlusVirtualTableProps {
|
|
170
|
+
/** 表格列配置(PlusColumn 格式,内部自动适配为 el-table-v2 格式) */
|
|
171
|
+
columns?: PlusColumn[];
|
|
172
|
+
/**
|
|
173
|
+
* 表格数据(同 data)
|
|
174
|
+
* @deprecated 建议使用 data
|
|
175
|
+
*/
|
|
176
|
+
tableData?: RecordType[];
|
|
177
|
+
/** 表格数据 */
|
|
178
|
+
data?: RecordType[];
|
|
179
|
+
/** 分页参数 */
|
|
180
|
+
pagination?: false | Partial<PlusPaginationProps>;
|
|
181
|
+
/** 操作栏参数 */
|
|
182
|
+
actionBar?: false | Partial<ActionBarProps>;
|
|
183
|
+
/** 是否显示序号列 */
|
|
184
|
+
hasIndexColumn?: boolean;
|
|
185
|
+
/** 是否显示多选列 */
|
|
186
|
+
isSelection?: boolean;
|
|
187
|
+
/** 加载状态 */
|
|
188
|
+
loadingStatus?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* 表格高度
|
|
191
|
+
* 虚拟表格必须指定高度,如不指定则使用 AutoResizer 自动填充父容器
|
|
192
|
+
*/
|
|
193
|
+
height?: number | string;
|
|
194
|
+
/**
|
|
195
|
+
* 表格宽度
|
|
196
|
+
* 如不指定则使用 AutoResizer 自动填充父容器
|
|
197
|
+
*/
|
|
198
|
+
width?: number | string;
|
|
199
|
+
/** 表头样式 */
|
|
200
|
+
headerCellStyle?: CSSProperties;
|
|
201
|
+
/** 行唯一标识字段名,默认 'id' */
|
|
202
|
+
rowKey?: string;
|
|
203
|
+
/** 默认密度 */
|
|
204
|
+
defaultSize?: ComponentSize;
|
|
205
|
+
/** 行高度,默认 50 */
|
|
206
|
+
rowHeight?: number;
|
|
207
|
+
/** 表头高度,默认 50 */
|
|
208
|
+
headerHeight?: number;
|
|
209
|
+
/** 是否启用固定列模式 */
|
|
210
|
+
fixed?: boolean;
|
|
211
|
+
/** 默认列宽度(PlusColumn 未指定时的回退值),默认 150 */
|
|
212
|
+
defaultColumnWidth?: number;
|
|
213
|
+
/**
|
|
214
|
+
* 空值默认文本(全局)
|
|
215
|
+
* 当字段值为 null、undefined 或空字符串时显示此文本
|
|
216
|
+
*/
|
|
217
|
+
columnsEmptyText?: string;
|
|
218
|
+
/**
|
|
219
|
+
* 表格行的 CSS 类名
|
|
220
|
+
* 支持函数方式根据行数据动态设定
|
|
221
|
+
*/
|
|
222
|
+
rowClass?: string | ((params: {
|
|
223
|
+
rowData: RecordType;
|
|
224
|
+
rowIndex: number;
|
|
225
|
+
}) => string);
|
|
226
|
+
/**
|
|
227
|
+
* 表格行样式
|
|
228
|
+
* 支持函数方式根据行数据动态设定
|
|
229
|
+
*/
|
|
230
|
+
rowStyle?: CSSProperties | ((params: {
|
|
231
|
+
rowData: RecordType;
|
|
232
|
+
rowIndex: number;
|
|
233
|
+
}) => CSSProperties);
|
|
234
|
+
/** 滚动条是否常显,默认 true */
|
|
235
|
+
scrollbarAlwaysOn?: boolean;
|
|
236
|
+
/**
|
|
237
|
+
* 是否显示标题栏(仅支持刷新按钮)
|
|
238
|
+
* 虚拟表格的标题栏为简化版,不支持列设置和密度切换
|
|
239
|
+
*/
|
|
240
|
+
titleBar?: boolean | {
|
|
241
|
+
title?: string;
|
|
242
|
+
refresh?: boolean;
|
|
243
|
+
};
|
|
244
|
+
/** 选择列的宽度 */
|
|
245
|
+
selectionColumnWidth?: number;
|
|
246
|
+
/** 序号列的宽度 */
|
|
247
|
+
indexColumnWidth?: number;
|
|
248
|
+
/** 是否显示斑马纹(奇偶行交替背景色),默认 false */
|
|
249
|
+
stripe?: boolean;
|
|
250
|
+
/** 是否显示纵向边框,默认 false */
|
|
251
|
+
border?: boolean;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* PlusVirtualTable 组件事件
|
|
255
|
+
*/
|
|
256
|
+
export interface PlusVirtualTableEmits {
|
|
257
|
+
/** 分页变化 */
|
|
258
|
+
(e: 'paginationChange', pageInfo: PageInfo): void;
|
|
259
|
+
/** 操作栏按钮点击 */
|
|
260
|
+
(e: 'clickAction', data: ButtonsCallBackParams): void;
|
|
261
|
+
/** 选择变化 */
|
|
262
|
+
(e: 'selection-change', selection: RecordType[]): void;
|
|
263
|
+
/** 单行选择 */
|
|
264
|
+
(e: 'select', selection: RecordType[], row: RecordType): void;
|
|
265
|
+
/** 全选 */
|
|
266
|
+
(e: 'select-all', selection: RecordType[]): void;
|
|
267
|
+
/** 刷新 */
|
|
268
|
+
(e: 'refresh'): void;
|
|
269
|
+
/** 行点击 */
|
|
270
|
+
(e: 'row-click', rowData: RecordType, rowIndex: number): void;
|
|
271
|
+
/** 排序变化 */
|
|
272
|
+
(e: 'sort-change', data: {
|
|
273
|
+
column: VirtualTableColumn;
|
|
274
|
+
prop: string;
|
|
275
|
+
order: string | null;
|
|
276
|
+
}): void;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* PlusVirtualTable 暴露的方法和属性
|
|
280
|
+
* 与 PlusTable 的 expose 对齐,保证上层组件可以无缝调用
|
|
281
|
+
*/
|
|
282
|
+
export interface PlusVirtualTableExpose {
|
|
283
|
+
/** 获取选中行 */
|
|
284
|
+
getSelectionRows: () => RecordType[];
|
|
285
|
+
/** 清空选择 */
|
|
286
|
+
clearSelection: () => void;
|
|
287
|
+
/** 切换行选择 */
|
|
288
|
+
toggleRowSelection: (row: RecordType, selected?: boolean) => void;
|
|
289
|
+
/** 切换全选 */
|
|
290
|
+
toggleAllSelection: (selected?: boolean) => void;
|
|
291
|
+
/** 滚动到指定行 */
|
|
292
|
+
scrollToRow: (rowIndex: number) => void;
|
|
293
|
+
/** 表格数据(只读) */
|
|
294
|
+
data: RecordType[];
|
|
295
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ActionBarProps, ButtonsCallBackParams } from 'yc-pro-components/es/components/table';
|
|
2
|
+
import { VirtualTableColumn } from './type';
|
|
3
|
+
import { PlusColumn } from 'yc-pro-components/es/types';
|
|
4
|
+
import { Column } from 'element-plus/es/components/table-v2/src/types';
|
|
5
|
+
import { ComputedRef } from 'vue';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* useColumnAdapter composable
|
|
9
|
+
*
|
|
10
|
+
* 将 PlusColumn[] 转换为 el-table-v2 可消费的 VirtualTableColumn[],
|
|
11
|
+
* 并自动插入选择列、序号列、操作栏列。
|
|
12
|
+
*
|
|
13
|
+
* @param config - 适配器配置(响应式)
|
|
14
|
+
* @returns virtualColumns - 适配后的列配置(ComputedRef)
|
|
15
|
+
*/
|
|
16
|
+
export declare function useColumnAdapter(config: {
|
|
17
|
+
columns: () => PlusColumn[];
|
|
18
|
+
isSelection?: () => boolean;
|
|
19
|
+
hasIndexColumn?: () => boolean;
|
|
20
|
+
actionBar?: () => false | Partial< ActionBarProps> | undefined;
|
|
21
|
+
rowKey?: () => string;
|
|
22
|
+
defaultColumnWidth?: () => number;
|
|
23
|
+
columnsEmptyText?: () => string;
|
|
24
|
+
pageInfo?: () => {
|
|
25
|
+
page: number;
|
|
26
|
+
pageSize: number;
|
|
27
|
+
} | undefined;
|
|
28
|
+
selectionColumnWidth?: () => number;
|
|
29
|
+
indexColumnWidth?: () => number;
|
|
30
|
+
/** 容器实际宽度(用于 minWidth 列的自适应分配) */
|
|
31
|
+
containerWidth?: () => number;
|
|
32
|
+
/** 选择列的渲染器(由 use-virtual-selection 提供) */
|
|
33
|
+
selectionCellRenderer?: () => VirtualTableColumn['cellRenderer'];
|
|
34
|
+
/** 选择列的表头渲染器(由 use-virtual-selection 提供) */
|
|
35
|
+
selectionHeaderRenderer?: () => VirtualTableColumn['headerCellRenderer'];
|
|
36
|
+
/** 操作栏按钮点击回调 */
|
|
37
|
+
onClickAction?: (params: ButtonsCallBackParams) => void;
|
|
38
|
+
}): {
|
|
39
|
+
virtualColumns: ComputedRef<Column<any>[]>;
|
|
40
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { computed, unref } from 'vue';
|
|
2
|
+
import { TableV2FixedDir } from 'element-plus';
|
|
3
|
+
import { createCellRenderer } from './virtual-table-cell-renderer.mjs';
|
|
4
|
+
import { createHeaderRenderer } from './virtual-table-header-renderer.mjs';
|
|
5
|
+
import { createActionBarColumn } from './virtual-table-action-bar.mjs';
|
|
6
|
+
|
|
7
|
+
function resolveFixed(column) {
|
|
8
|
+
var _a;
|
|
9
|
+
const fixed = (_a = column.tableColumnProps) == null ? void 0 : _a.fixed;
|
|
10
|
+
if (!fixed) return void 0;
|
|
11
|
+
if (fixed === true || fixed === "left") return TableV2FixedDir.LEFT;
|
|
12
|
+
if (fixed === "right") return TableV2FixedDir.RIGHT;
|
|
13
|
+
return void 0;
|
|
14
|
+
}
|
|
15
|
+
function resolveWidth(column, defaultWidth) {
|
|
16
|
+
var _a;
|
|
17
|
+
const w = (_a = column.width) != null ? _a : column.minWidth;
|
|
18
|
+
if (typeof w === "number") return w;
|
|
19
|
+
if (typeof w === "string") {
|
|
20
|
+
const parsed = parseInt(w, 10);
|
|
21
|
+
if (!isNaN(parsed)) return parsed;
|
|
22
|
+
}
|
|
23
|
+
return defaultWidth;
|
|
24
|
+
}
|
|
25
|
+
function isFlexColumn(column) {
|
|
26
|
+
return column.width === void 0;
|
|
27
|
+
}
|
|
28
|
+
function distributeRemainingWidth(columns, flexIndices, containerWidth, scrollbarWidth = 0) {
|
|
29
|
+
if (flexIndices.length === 0 || containerWidth <= 0) return;
|
|
30
|
+
const totalFixedWidth = columns.reduce((sum, col) => sum + col.width, 0);
|
|
31
|
+
const availableWidth = containerWidth - scrollbarWidth;
|
|
32
|
+
const remaining = availableWidth - totalFixedWidth;
|
|
33
|
+
if (remaining <= 0) return;
|
|
34
|
+
const totalMinWidth = flexIndices.reduce(
|
|
35
|
+
(sum, idx) => sum + columns[idx].width,
|
|
36
|
+
0
|
|
37
|
+
);
|
|
38
|
+
if (totalMinWidth <= 0) return;
|
|
39
|
+
for (const idx of flexIndices) {
|
|
40
|
+
const col = columns[idx];
|
|
41
|
+
const currentWidth = col.width;
|
|
42
|
+
const extraShare = Math.floor(remaining * (currentWidth / totalMinWidth));
|
|
43
|
+
col.width = currentWidth + extraShare;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function resolveAlign(column) {
|
|
47
|
+
var _a;
|
|
48
|
+
const align = (_a = column.tableColumnProps) == null ? void 0 : _a.align;
|
|
49
|
+
if (align === "left" || align === "center" || align === "right") return align;
|
|
50
|
+
return "left";
|
|
51
|
+
}
|
|
52
|
+
function adaptColumn(column, defaultWidth, columnsEmptyText) {
|
|
53
|
+
const prop = column.prop || "";
|
|
54
|
+
const label = typeof column.label === "string" ? column.label : unref(column.label) || "";
|
|
55
|
+
const adapted = {
|
|
56
|
+
key: prop,
|
|
57
|
+
dataKey: prop,
|
|
58
|
+
title: label,
|
|
59
|
+
width: resolveWidth(column, defaultWidth),
|
|
60
|
+
align: resolveAlign(column),
|
|
61
|
+
fixed: resolveFixed(column),
|
|
62
|
+
_plusColumn: column
|
|
63
|
+
};
|
|
64
|
+
adapted.cellRenderer = createCellRenderer(column, columnsEmptyText);
|
|
65
|
+
if (column.renderHeader || column.tooltip) {
|
|
66
|
+
adapted.headerCellRenderer = createHeaderRenderer(column);
|
|
67
|
+
}
|
|
68
|
+
return adapted;
|
|
69
|
+
}
|
|
70
|
+
function createIndexColumn(width, pageInfo) {
|
|
71
|
+
return {
|
|
72
|
+
key: "__index__",
|
|
73
|
+
dataKey: "__index__",
|
|
74
|
+
title: "#",
|
|
75
|
+
width,
|
|
76
|
+
fixed: TableV2FixedDir.LEFT,
|
|
77
|
+
align: "center",
|
|
78
|
+
cellRenderer: ({ rowIndex }) => {
|
|
79
|
+
const offset = pageInfo ? (pageInfo.page - 1) * pageInfo.pageSize : 0;
|
|
80
|
+
return `${offset + rowIndex + 1}`;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function useColumnAdapter(config) {
|
|
85
|
+
const virtualColumns = computed(() => {
|
|
86
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
87
|
+
const rawColumns = config.columns();
|
|
88
|
+
const isSelection = (_b = (_a = config.isSelection) == null ? void 0 : _a.call(config)) != null ? _b : false;
|
|
89
|
+
const hasIndexColumn = (_d = (_c = config.hasIndexColumn) == null ? void 0 : _c.call(config)) != null ? _d : false;
|
|
90
|
+
const actionBar = (_e = config.actionBar) == null ? void 0 : _e.call(config);
|
|
91
|
+
const defaultWidth = (_g = (_f = config.defaultColumnWidth) == null ? void 0 : _f.call(config)) != null ? _g : 150;
|
|
92
|
+
const emptyText = (_i = (_h = config.columnsEmptyText) == null ? void 0 : _h.call(config)) != null ? _i : "-";
|
|
93
|
+
const pageInfo = (_j = config.pageInfo) == null ? void 0 : _j.call(config);
|
|
94
|
+
const selectionWidth = (_l = (_k = config.selectionColumnWidth) == null ? void 0 : _k.call(config)) != null ? _l : 50;
|
|
95
|
+
const indexWidth = (_n = (_m = config.indexColumnWidth) == null ? void 0 : _m.call(config)) != null ? _n : 60;
|
|
96
|
+
const cWidth = (_p = (_o = config.containerWidth) == null ? void 0 : _o.call(config)) != null ? _p : 0;
|
|
97
|
+
const result = [];
|
|
98
|
+
const flexIndices = [];
|
|
99
|
+
if (isSelection) {
|
|
100
|
+
const selectionCol = {
|
|
101
|
+
key: "__selection__",
|
|
102
|
+
dataKey: "__selection__",
|
|
103
|
+
title: "",
|
|
104
|
+
width: selectionWidth,
|
|
105
|
+
fixed: TableV2FixedDir.LEFT,
|
|
106
|
+
align: "center"
|
|
107
|
+
};
|
|
108
|
+
const cellRenderer = (_q = config.selectionCellRenderer) == null ? void 0 : _q.call(config);
|
|
109
|
+
const headerRenderer = (_r = config.selectionHeaderRenderer) == null ? void 0 : _r.call(config);
|
|
110
|
+
if (cellRenderer) selectionCol.cellRenderer = cellRenderer;
|
|
111
|
+
if (headerRenderer) selectionCol.headerCellRenderer = headerRenderer;
|
|
112
|
+
result.push(selectionCol);
|
|
113
|
+
}
|
|
114
|
+
if (hasIndexColumn) {
|
|
115
|
+
result.push(createIndexColumn(indexWidth, pageInfo));
|
|
116
|
+
}
|
|
117
|
+
const visibleColumns = rawColumns.filter(
|
|
118
|
+
(col) => unref(col.hideInTable) !== true
|
|
119
|
+
);
|
|
120
|
+
for (const col of visibleColumns) {
|
|
121
|
+
const idx = result.length;
|
|
122
|
+
result.push(adaptColumn(col, defaultWidth, emptyText));
|
|
123
|
+
if (isFlexColumn(col)) {
|
|
124
|
+
flexIndices.push(idx);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (actionBar) {
|
|
128
|
+
const actionCol = createActionBarColumn(actionBar, config.onClickAction);
|
|
129
|
+
result.push(actionCol);
|
|
130
|
+
}
|
|
131
|
+
distributeRemainingWidth(result, flexIndices, cWidth);
|
|
132
|
+
return result;
|
|
133
|
+
});
|
|
134
|
+
return { virtualColumns };
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export { useColumnAdapter };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { TableV2Instance } from 'element-plus';
|
|
2
|
+
import { ShallowRef, Ref, CSSProperties, ComputedRef } from 'vue';
|
|
3
|
+
|
|
4
|
+
export interface UseVirtualScrollOptions {
|
|
5
|
+
/** 表格高度(响应式 getter) */
|
|
6
|
+
height?: () => number | string | undefined;
|
|
7
|
+
/** 表格宽度(响应式 getter) */
|
|
8
|
+
width?: () => number | string | undefined;
|
|
9
|
+
/** 行高度 */
|
|
10
|
+
rowHeight?: () => number;
|
|
11
|
+
/** 表头高度 */
|
|
12
|
+
headerHeight?: () => number;
|
|
13
|
+
}
|
|
14
|
+
export interface UseVirtualScrollReturn {
|
|
15
|
+
/** el-table-v2 组件实例引用 */
|
|
16
|
+
tableRef: ShallowRef<TableV2Instance | null>;
|
|
17
|
+
/** 容器 wrapper 元素引用 */
|
|
18
|
+
wrapperRef: ShallowRef<HTMLDivElement | null>;
|
|
19
|
+
/** 滚动到指定行 */
|
|
20
|
+
scrollToRow: (rowIndex: number) => void;
|
|
21
|
+
/** 是否使用 AutoResizer(当未指定固定高宽时启用) */
|
|
22
|
+
useAutoResizer: ComputedRef<boolean>;
|
|
23
|
+
/** 容器样式(当使用 AutoResizer 时需要 100% 高度) */
|
|
24
|
+
containerStyle: ComputedRef<CSSProperties>;
|
|
25
|
+
/** 行高 */
|
|
26
|
+
rowHeight: ComputedRef<number>;
|
|
27
|
+
/** 表头高度 */
|
|
28
|
+
headerHeight: ComputedRef<number>;
|
|
29
|
+
/** 容器实际宽度(通过 ResizeObserver 监听,用于列宽自适应分配) */
|
|
30
|
+
containerWidth: Ref<number>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 虚拟滚动辅助逻辑 composable
|
|
34
|
+
*/
|
|
35
|
+
export declare function useVirtualScroll(options?: UseVirtualScrollOptions): UseVirtualScrollReturn;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { shallowRef, ref, watch, onMounted, onBeforeUnmount, computed } from 'vue';
|
|
2
|
+
|
|
3
|
+
function useVirtualScroll(options = {}) {
|
|
4
|
+
const tableRef = shallowRef(null);
|
|
5
|
+
const wrapperRef = shallowRef(null);
|
|
6
|
+
const containerWidth = ref(0);
|
|
7
|
+
let resizeObserver = null;
|
|
8
|
+
const observeWidth = (el) => {
|
|
9
|
+
resizeObserver == null ? void 0 : resizeObserver.disconnect();
|
|
10
|
+
if (!el) return;
|
|
11
|
+
containerWidth.value = el.clientWidth;
|
|
12
|
+
resizeObserver = new ResizeObserver((entries) => {
|
|
13
|
+
for (const entry of entries) {
|
|
14
|
+
containerWidth.value = entry.contentRect.width;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
resizeObserver.observe(el);
|
|
18
|
+
};
|
|
19
|
+
watch(wrapperRef, (el) => {
|
|
20
|
+
observeWidth(el);
|
|
21
|
+
});
|
|
22
|
+
onMounted(() => {
|
|
23
|
+
if (wrapperRef.value) observeWidth(wrapperRef.value);
|
|
24
|
+
});
|
|
25
|
+
onBeforeUnmount(() => {
|
|
26
|
+
resizeObserver == null ? void 0 : resizeObserver.disconnect();
|
|
27
|
+
});
|
|
28
|
+
const rowHeight = computed(() => {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
return (_b = (_a = options.rowHeight) == null ? void 0 : _a.call(options)) != null ? _b : 50;
|
|
31
|
+
});
|
|
32
|
+
const headerHeight = computed(() => {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
return (_b = (_a = options.headerHeight) == null ? void 0 : _a.call(options)) != null ? _b : 50;
|
|
35
|
+
});
|
|
36
|
+
const useAutoResizer = computed(() => {
|
|
37
|
+
var _a;
|
|
38
|
+
const h = (_a = options.height) == null ? void 0 : _a.call(options);
|
|
39
|
+
return h === void 0 || h === null || h === "";
|
|
40
|
+
});
|
|
41
|
+
const containerStyle = computed(() => {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
if (useAutoResizer.value) {
|
|
44
|
+
return {
|
|
45
|
+
width: "100%"
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const h = (_a = options.height) == null ? void 0 : _a.call(options);
|
|
49
|
+
const w = (_b = options.width) == null ? void 0 : _b.call(options);
|
|
50
|
+
return {
|
|
51
|
+
width: typeof w === "number" ? `${w}px` : w || "100%",
|
|
52
|
+
height: typeof h === "number" ? `${h}px` : h || "400px"
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
const scrollToRow = (rowIndex) => {
|
|
56
|
+
var _a;
|
|
57
|
+
(_a = tableRef.value) == null ? void 0 : _a.scrollToRow(rowIndex);
|
|
58
|
+
};
|
|
59
|
+
return {
|
|
60
|
+
tableRef,
|
|
61
|
+
wrapperRef,
|
|
62
|
+
scrollToRow,
|
|
63
|
+
useAutoResizer,
|
|
64
|
+
containerStyle,
|
|
65
|
+
rowHeight,
|
|
66
|
+
headerHeight,
|
|
67
|
+
containerWidth
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { useVirtualScroll };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { VirtualTableColumn } from './type';
|
|
2
|
+
import { RecordType } from 'yc-pro-components/es/types';
|
|
3
|
+
import { Ref } from 'vue';
|
|
4
|
+
|
|
5
|
+
export interface UseVirtualSelectionOptions {
|
|
6
|
+
/** 行数据的唯一标识字段名 */
|
|
7
|
+
rowKey: () => string;
|
|
8
|
+
/** 全部表格数据(响应式 getter) */
|
|
9
|
+
data: () => RecordType[];
|
|
10
|
+
/** 选择变化回调 */
|
|
11
|
+
onSelectionChange?: (selection: RecordType[]) => void;
|
|
12
|
+
/** 单行选择回调 */
|
|
13
|
+
onSelect?: (selection: RecordType[], row: RecordType) => void;
|
|
14
|
+
/** 全选回调 */
|
|
15
|
+
onSelectAll?: (selection: RecordType[]) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface UseVirtualSelectionReturn {
|
|
18
|
+
/** 选中行 Key 集合(响应式) */
|
|
19
|
+
selectedKeys: Ref<Set<string | number>>;
|
|
20
|
+
/** 是否全选 */
|
|
21
|
+
isAllSelected: Ref<boolean>;
|
|
22
|
+
/** 是否半选 */
|
|
23
|
+
isIndeterminate: Ref<boolean>;
|
|
24
|
+
/** 获取选中行数据 */
|
|
25
|
+
getSelectionRows: () => RecordType[];
|
|
26
|
+
/** 清空选择 */
|
|
27
|
+
clearSelection: () => void;
|
|
28
|
+
/** 切换单行选择 */
|
|
29
|
+
toggleRowSelection: (row: RecordType, selected?: boolean) => void;
|
|
30
|
+
/** 切换全选 */
|
|
31
|
+
toggleAllSelection: (selected?: boolean) => void;
|
|
32
|
+
/** CheckBox 列的单元格渲染器 */
|
|
33
|
+
selectionCellRenderer: VirtualTableColumn['cellRenderer'];
|
|
34
|
+
/** CheckBox 列的表头渲染器 */
|
|
35
|
+
selectionHeaderRenderer: VirtualTableColumn['headerCellRenderer'];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 虚拟表格选择逻辑 composable
|
|
39
|
+
*/
|
|
40
|
+
export declare function useVirtualSelection(options: UseVirtualSelectionOptions): UseVirtualSelectionReturn;
|