erp-plus 1.0.167 → 1.0.168
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/dist/App.vue.d.ts +1 -0
- package/dist/erp-plus.css +1 -1
- package/dist/erp-plus.es.js +2657 -2279
- package/dist/erp-plus.umd.js +33 -33
- package/dist/packages/DictStatus/DictStatus.vue.d.ts +5 -0
- package/dist/packages/VirtualTable/VirtualTable.vue.d.ts +774 -0
- package/dist/packages/VirtualTable/buildColumns.d.ts +26 -0
- package/dist/packages/VirtualTable/index.d.ts +5 -0
- package/dist/packages/VirtualTable/tier.d.ts +14 -0
- package/dist/packages/VirtualTable/types.d.ts +50 -0
- package/package.json +1 -1
|
@@ -0,0 +1,774 @@
|
|
|
1
|
+
import { CSSProperties, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, PropType, VNodeProps, AllowedComponentProps, ComponentCustomProps, GlobalComponents, GlobalDirectives } from 'vue';
|
|
2
|
+
import { TableV2SortOrder, SortBy, HeaderClassNameGetter, RowClassNameGetter, ExtraCellPropGetter, SortState, ColumnSortHandler, ExpandedRowsChangeHandler, RowExpandHandler, RowEventHandlers } from 'element-plus';
|
|
3
|
+
import { VtTableColumn } from './types';
|
|
4
|
+
import { EpPropFinalized, EpPropMergeType } from 'element-plus/es/utils';
|
|
5
|
+
import { KeyType, DataGetter, SortBy } from 'element-plus/es/components/table-v2/src/types';
|
|
6
|
+
import { AnyColumn } from 'element-plus/es/components/table-v2/src/common';
|
|
7
|
+
import { onRowRenderedParams } from 'element-plus/es/components/table-v2/src/grid';
|
|
8
|
+
type KeyType = string | number | symbol;
|
|
9
|
+
interface Props {
|
|
10
|
+
data?: any[];
|
|
11
|
+
columns?: VtTableColumn[];
|
|
12
|
+
/** 行键字段名(默认 'id';校验/选中/行复用都以它为准) */
|
|
13
|
+
rowKey?: string;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
emptyText?: string;
|
|
16
|
+
/** 空值 '-' 兜底开关(同 yw-table) */
|
|
17
|
+
emptyState?: boolean;
|
|
18
|
+
/** 表格级单行省略 + 溢出 tooltip 开关(列级 showOverflowTooltip 优先) */
|
|
19
|
+
showOverflowTooltip?: boolean;
|
|
20
|
+
/** 表格级默认数组连接符(列上的 arraySeparator 优先) */
|
|
21
|
+
arraySeparator?: string;
|
|
22
|
+
/** 内置选择列开关(isSelection=false 时 checkbox/radio 列落回插槽分支,同 yw-table) */
|
|
23
|
+
isSelection?: boolean;
|
|
24
|
+
/** 行高(默认按运行时档位:默认档 40 / 稍小档 32;虚拟滚动要求定值,勿传内容撑高行) */
|
|
25
|
+
rowHeight?: number;
|
|
26
|
+
headerHeight?: number;
|
|
27
|
+
/** 容器最小高度(TableV2 需要确定的渲染高度) */
|
|
28
|
+
minHeight?: string | number;
|
|
29
|
+
/** 视口外缓冲行数(TableV2 cache) */
|
|
30
|
+
overscan?: number;
|
|
31
|
+
scrollbarAlwaysOn?: boolean;
|
|
32
|
+
}
|
|
33
|
+
declare const _default: DefineComponent<Props, {
|
|
34
|
+
validate: () => boolean;
|
|
35
|
+
validateCell: (rowKey: KeyType, prop: string) => boolean;
|
|
36
|
+
clearValidate: () => void;
|
|
37
|
+
clearSelection: () => void;
|
|
38
|
+
getSelectedIds: () => KeyType[];
|
|
39
|
+
/** TableV2 实例:scrollTo / scrollToRow / scrollToTop / scrollToLeft */
|
|
40
|
+
tableRef: globalThis.Ref<any, any>;
|
|
41
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
42
|
+
scroll: (...args: any[]) => void;
|
|
43
|
+
"row-click": (...args: any[]) => void;
|
|
44
|
+
"row-contextmenu": (...args: any[]) => void;
|
|
45
|
+
"row-dblclick": (...args: any[]) => void;
|
|
46
|
+
"sort-change": (...args: any[]) => void;
|
|
47
|
+
"select-change": (...args: any[]) => void;
|
|
48
|
+
}, string, PublicProps, Readonly<Props> & Readonly<{
|
|
49
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
"onRow-click"?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
"onRow-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
52
|
+
"onRow-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
53
|
+
"onSort-change"?: ((...args: any[]) => any) | undefined;
|
|
54
|
+
"onSelect-change"?: ((...args: any[]) => any) | undefined;
|
|
55
|
+
}>, {
|
|
56
|
+
data: any[];
|
|
57
|
+
loading: boolean;
|
|
58
|
+
emptyState: boolean;
|
|
59
|
+
isSelection: boolean;
|
|
60
|
+
showOverflowTooltip: boolean;
|
|
61
|
+
arraySeparator: string;
|
|
62
|
+
columns: VtTableColumn[];
|
|
63
|
+
rowKey: string;
|
|
64
|
+
scrollbarAlwaysOn: boolean;
|
|
65
|
+
minHeight: string | number;
|
|
66
|
+
overscan: number;
|
|
67
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
68
|
+
containerRef: HTMLDivElement;
|
|
69
|
+
tableRef: CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
|
|
70
|
+
readonly cache: EpPropFinalized<NumberConstructor, never, never, 2, false>;
|
|
71
|
+
readonly estimatedRowHeight: {
|
|
72
|
+
readonly default: undefined;
|
|
73
|
+
readonly type: PropType<number>;
|
|
74
|
+
readonly required: false;
|
|
75
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
76
|
+
readonly __epPropKey: true;
|
|
77
|
+
};
|
|
78
|
+
readonly rowKey: EpPropFinalized<(new (
|
|
79
|
+
/**
|
|
80
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
81
|
+
*
|
|
82
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
83
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
84
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
85
|
+
*
|
|
86
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
87
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
88
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
89
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
90
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
91
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
92
|
+
*/
|
|
93
|
+
...args: any[]) => string | number | symbol) | (() => KeyType) | ((new (
|
|
94
|
+
/**
|
|
95
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
96
|
+
*
|
|
97
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
98
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
99
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
100
|
+
*
|
|
101
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
102
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
103
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
104
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
105
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
106
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
107
|
+
*/
|
|
108
|
+
...args: any[]) => string | number | symbol) | (() => KeyType))[], unknown, unknown, "id", boolean>;
|
|
109
|
+
readonly headerClass: {
|
|
110
|
+
readonly type: PropType<EpPropMergeType<(new (
|
|
111
|
+
/**
|
|
112
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
113
|
+
*
|
|
114
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
115
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
116
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
117
|
+
*
|
|
118
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
119
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
120
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
121
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
122
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
123
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
124
|
+
*/
|
|
125
|
+
...args: any[]) => string | HeaderClassNameGetter<any>) | (() => string | HeaderClassNameGetter<any>) | ((new (
|
|
126
|
+
/**
|
|
127
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
128
|
+
*
|
|
129
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
130
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
131
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
132
|
+
*
|
|
133
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
134
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
135
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
136
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
137
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
138
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
139
|
+
*/
|
|
140
|
+
...args: any[]) => string | HeaderClassNameGetter<any>) | (() => string | HeaderClassNameGetter<any>))[], unknown, unknown>>;
|
|
141
|
+
readonly required: false;
|
|
142
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
143
|
+
__epPropKey: true;
|
|
144
|
+
};
|
|
145
|
+
readonly headerProps: {
|
|
146
|
+
readonly type: PropType<any>;
|
|
147
|
+
readonly required: false;
|
|
148
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
149
|
+
__epPropKey: true;
|
|
150
|
+
};
|
|
151
|
+
readonly headerCellProps: {
|
|
152
|
+
readonly type: PropType<any>;
|
|
153
|
+
readonly required: false;
|
|
154
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
155
|
+
__epPropKey: true;
|
|
156
|
+
};
|
|
157
|
+
readonly headerHeight: EpPropFinalized<(new (
|
|
158
|
+
/**
|
|
159
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
160
|
+
*
|
|
161
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
162
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
163
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
164
|
+
*
|
|
165
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
166
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
167
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
168
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
169
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
170
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
171
|
+
*/
|
|
172
|
+
...args: any[]) => number | number[]) | (() => number | number[]) | ((new (
|
|
173
|
+
/**
|
|
174
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
175
|
+
*
|
|
176
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
177
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
178
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
179
|
+
*
|
|
180
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
181
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
182
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
183
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
184
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
185
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
186
|
+
*/
|
|
187
|
+
...args: any[]) => number | number[]) | (() => number | number[]))[], unknown, unknown, 50, boolean>;
|
|
188
|
+
readonly footerHeight: EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
189
|
+
readonly rowClass: {
|
|
190
|
+
readonly type: PropType<EpPropMergeType<(new (
|
|
191
|
+
/**
|
|
192
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
193
|
+
*
|
|
194
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
195
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
196
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
197
|
+
*
|
|
198
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
199
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
200
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
201
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
202
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
203
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
204
|
+
*/
|
|
205
|
+
...args: any[]) => string | RowClassNameGetter<any>) | (() => string | RowClassNameGetter<any>) | ((new (
|
|
206
|
+
/**
|
|
207
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
208
|
+
*
|
|
209
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
210
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
211
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
212
|
+
*
|
|
213
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
214
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
215
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
216
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
217
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
218
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
219
|
+
*/
|
|
220
|
+
...args: any[]) => string | RowClassNameGetter<any>) | (() => string | RowClassNameGetter<any>))[], unknown, unknown>>;
|
|
221
|
+
readonly required: false;
|
|
222
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
223
|
+
__epPropKey: true;
|
|
224
|
+
};
|
|
225
|
+
readonly rowProps: {
|
|
226
|
+
readonly type: PropType<any>;
|
|
227
|
+
readonly required: false;
|
|
228
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
229
|
+
__epPropKey: true;
|
|
230
|
+
};
|
|
231
|
+
readonly rowHeight: EpPropFinalized<NumberConstructor, unknown, unknown, 50, boolean>;
|
|
232
|
+
readonly cellProps: {
|
|
233
|
+
readonly type: PropType<EpPropMergeType<(new (
|
|
234
|
+
/**
|
|
235
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
236
|
+
*
|
|
237
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
238
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
239
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
240
|
+
*
|
|
241
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
242
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
243
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
244
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
245
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
246
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
247
|
+
*/
|
|
248
|
+
...args: any[]) => Record<string, any> | ExtraCellPropGetter<any>) | (() => Record<string, any> | ExtraCellPropGetter<any>) | ((new (
|
|
249
|
+
/**
|
|
250
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
251
|
+
*
|
|
252
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
253
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
254
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
255
|
+
*
|
|
256
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
257
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
258
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
259
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
260
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
261
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
262
|
+
*/
|
|
263
|
+
...args: any[]) => Record<string, any> | ExtraCellPropGetter<any>) | (() => Record<string, any> | ExtraCellPropGetter<any>))[], unknown, unknown>>;
|
|
264
|
+
readonly required: false;
|
|
265
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
266
|
+
__epPropKey: true;
|
|
267
|
+
};
|
|
268
|
+
readonly columns: {
|
|
269
|
+
readonly type: PropType< AnyColumn[]>;
|
|
270
|
+
readonly required: true;
|
|
271
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
272
|
+
__epPropKey: true;
|
|
273
|
+
};
|
|
274
|
+
readonly data: {
|
|
275
|
+
readonly type: PropType<any[]>;
|
|
276
|
+
readonly required: true;
|
|
277
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
278
|
+
__epPropKey: true;
|
|
279
|
+
};
|
|
280
|
+
readonly dataGetter: {
|
|
281
|
+
readonly type: PropType<DataGetter<any>>;
|
|
282
|
+
readonly required: false;
|
|
283
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
284
|
+
__epPropKey: true;
|
|
285
|
+
};
|
|
286
|
+
readonly fixedData: {
|
|
287
|
+
readonly type: PropType<any[]>;
|
|
288
|
+
readonly required: false;
|
|
289
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
290
|
+
__epPropKey: true;
|
|
291
|
+
};
|
|
292
|
+
readonly expandColumnKey: StringConstructor;
|
|
293
|
+
readonly expandedRowKeys: EpPropFinalized<(new (...args: any[]) => KeyType[]) | (() => KeyType[]) | ((new (...args: any[]) => KeyType[]) | (() => KeyType[]))[], unknown, unknown, () => never[], boolean>;
|
|
294
|
+
readonly defaultExpandedRowKeys: EpPropFinalized<(new (...args: any[]) => KeyType[]) | (() => KeyType[]) | ((new (...args: any[]) => KeyType[]) | (() => KeyType[]))[], unknown, unknown, () => never[], boolean>;
|
|
295
|
+
readonly class: StringConstructor;
|
|
296
|
+
readonly fixed: BooleanConstructor;
|
|
297
|
+
readonly style: {
|
|
298
|
+
readonly type: PropType<CSSProperties>;
|
|
299
|
+
readonly required: false;
|
|
300
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
301
|
+
__epPropKey: true;
|
|
302
|
+
};
|
|
303
|
+
readonly width: {
|
|
304
|
+
readonly type: PropType<number>;
|
|
305
|
+
readonly required: true;
|
|
306
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
307
|
+
__epPropKey: true;
|
|
308
|
+
};
|
|
309
|
+
readonly height: {
|
|
310
|
+
readonly type: PropType<number>;
|
|
311
|
+
readonly required: true;
|
|
312
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
313
|
+
__epPropKey: true;
|
|
314
|
+
};
|
|
315
|
+
readonly maxHeight: NumberConstructor;
|
|
316
|
+
readonly useIsScrolling: BooleanConstructor;
|
|
317
|
+
readonly indentSize: EpPropFinalized<NumberConstructor, unknown, unknown, 12, boolean>;
|
|
318
|
+
readonly iconSize: EpPropFinalized<NumberConstructor, unknown, unknown, 12, boolean>;
|
|
319
|
+
readonly hScrollbarSize: EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
|
|
320
|
+
readonly vScrollbarSize: EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
|
|
321
|
+
readonly scrollbarAlwaysOn: BooleanConstructor;
|
|
322
|
+
readonly sortBy: EpPropFinalized<(new (...args: any[]) => SortBy) | (() => SortBy) | ((new (...args: any[]) => SortBy) | (() => SortBy))[], unknown, unknown, () => {
|
|
323
|
+
key: KeyType;
|
|
324
|
+
order: TableV2SortOrder;
|
|
325
|
+
}, boolean>;
|
|
326
|
+
readonly sortState: EpPropFinalized<(new (...args: any[]) => SortState) | (() => SortState) | ((new (...args: any[]) => SortState) | (() => SortState))[], unknown, unknown, undefined, boolean>;
|
|
327
|
+
readonly onColumnSort: {
|
|
328
|
+
readonly type: PropType<ColumnSortHandler<any>>;
|
|
329
|
+
readonly required: false;
|
|
330
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
331
|
+
__epPropKey: true;
|
|
332
|
+
};
|
|
333
|
+
readonly onExpandedRowsChange: {
|
|
334
|
+
readonly type: PropType<ExpandedRowsChangeHandler>;
|
|
335
|
+
readonly required: false;
|
|
336
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
337
|
+
__epPropKey: true;
|
|
338
|
+
};
|
|
339
|
+
readonly onEndReached: {
|
|
340
|
+
readonly type: PropType<(remainDistance: number) => void>;
|
|
341
|
+
readonly required: false;
|
|
342
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
343
|
+
__epPropKey: true;
|
|
344
|
+
};
|
|
345
|
+
readonly onRowExpand: {
|
|
346
|
+
readonly type: PropType<RowExpandHandler>;
|
|
347
|
+
readonly required: false;
|
|
348
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
349
|
+
__epPropKey: true;
|
|
350
|
+
};
|
|
351
|
+
readonly onScroll: {
|
|
352
|
+
readonly type: PropType<(...args: any[]) => void>;
|
|
353
|
+
readonly required: false;
|
|
354
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
355
|
+
__epPropKey: true;
|
|
356
|
+
};
|
|
357
|
+
readonly onRowsRendered: {
|
|
358
|
+
readonly type: PropType<(params: onRowRenderedParams) => void>;
|
|
359
|
+
readonly required: false;
|
|
360
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
361
|
+
__epPropKey: true;
|
|
362
|
+
};
|
|
363
|
+
readonly rowEventHandlers: {
|
|
364
|
+
readonly type: PropType<RowEventHandlers>;
|
|
365
|
+
readonly required: false;
|
|
366
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
367
|
+
__epPropKey: true;
|
|
368
|
+
};
|
|
369
|
+
}>>, () =>
|
|
370
|
+
/**
|
|
371
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
372
|
+
*
|
|
373
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
374
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
375
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
376
|
+
*
|
|
377
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
378
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
379
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
380
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
381
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
382
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
383
|
+
*/
|
|
384
|
+
JSX.
|
|
385
|
+
/**
|
|
386
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
387
|
+
*
|
|
388
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
389
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
390
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
391
|
+
*
|
|
392
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
393
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
394
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
395
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
396
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
397
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
398
|
+
*/
|
|
399
|
+
Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, VNodeProps & AllowedComponentProps & ComponentCustomProps, {
|
|
400
|
+
readonly fixed: boolean;
|
|
401
|
+
readonly rowKey: EpPropMergeType<(new (...args: any[]) => string | number | symbol) | (() => KeyType) | ((new (...args: any[]) => string | number | symbol) | (() => KeyType))[], unknown, unknown>;
|
|
402
|
+
readonly useIsScrolling: boolean;
|
|
403
|
+
readonly scrollbarAlwaysOn: boolean;
|
|
404
|
+
readonly cache: number;
|
|
405
|
+
readonly estimatedRowHeight: number;
|
|
406
|
+
readonly rowHeight: number;
|
|
407
|
+
readonly hScrollbarSize: number;
|
|
408
|
+
readonly vScrollbarSize: number;
|
|
409
|
+
readonly sortBy: SortBy;
|
|
410
|
+
readonly headerHeight: EpPropMergeType<(new (...args: any[]) => number | number[]) | (() => number | number[]) | ((new (...args: any[]) => number | number[]) | (() => number | number[]))[], unknown, unknown>;
|
|
411
|
+
readonly footerHeight: number;
|
|
412
|
+
readonly indentSize: number;
|
|
413
|
+
readonly iconSize: number;
|
|
414
|
+
readonly sortState: SortState;
|
|
415
|
+
readonly expandedRowKeys: KeyType[];
|
|
416
|
+
readonly defaultExpandedRowKeys: KeyType[];
|
|
417
|
+
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
418
|
+
P: {};
|
|
419
|
+
B: {};
|
|
420
|
+
D: {};
|
|
421
|
+
C: {};
|
|
422
|
+
M: {};
|
|
423
|
+
Defaults: {};
|
|
424
|
+
}, Readonly<globalThis.ExtractPropTypes<{
|
|
425
|
+
readonly cache: EpPropFinalized<NumberConstructor, never, never, 2, false>;
|
|
426
|
+
readonly estimatedRowHeight: {
|
|
427
|
+
readonly default: undefined;
|
|
428
|
+
readonly type: PropType<number>;
|
|
429
|
+
readonly required: false;
|
|
430
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
431
|
+
readonly __epPropKey: true;
|
|
432
|
+
};
|
|
433
|
+
readonly rowKey: EpPropFinalized<(new (
|
|
434
|
+
/**
|
|
435
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
436
|
+
*
|
|
437
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
438
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
439
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
440
|
+
*
|
|
441
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
442
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
443
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
444
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
445
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
446
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
447
|
+
*/
|
|
448
|
+
...args: any[]) => string | number | symbol) | (() => KeyType) | ((new (
|
|
449
|
+
/**
|
|
450
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
451
|
+
*
|
|
452
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
453
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
454
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
455
|
+
*
|
|
456
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
457
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
458
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
459
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
460
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
461
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
462
|
+
*/
|
|
463
|
+
...args: any[]) => string | number | symbol) | (() => KeyType))[], unknown, unknown, "id", boolean>;
|
|
464
|
+
readonly headerClass: {
|
|
465
|
+
readonly type: PropType<EpPropMergeType<(new (
|
|
466
|
+
/**
|
|
467
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
468
|
+
*
|
|
469
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
470
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
471
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
472
|
+
*
|
|
473
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
474
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
475
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
476
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
477
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
478
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
479
|
+
*/
|
|
480
|
+
...args: any[]) => string | HeaderClassNameGetter<any>) | (() => string | HeaderClassNameGetter<any>) | ((new (
|
|
481
|
+
/**
|
|
482
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
483
|
+
*
|
|
484
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
485
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
486
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
487
|
+
*
|
|
488
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
489
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
490
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
491
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
492
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
493
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
494
|
+
*/
|
|
495
|
+
...args: any[]) => string | HeaderClassNameGetter<any>) | (() => string | HeaderClassNameGetter<any>))[], unknown, unknown>>;
|
|
496
|
+
readonly required: false;
|
|
497
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
498
|
+
__epPropKey: true;
|
|
499
|
+
};
|
|
500
|
+
readonly headerProps: {
|
|
501
|
+
readonly type: PropType<any>;
|
|
502
|
+
readonly required: false;
|
|
503
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
504
|
+
__epPropKey: true;
|
|
505
|
+
};
|
|
506
|
+
readonly headerCellProps: {
|
|
507
|
+
readonly type: PropType<any>;
|
|
508
|
+
readonly required: false;
|
|
509
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
510
|
+
__epPropKey: true;
|
|
511
|
+
};
|
|
512
|
+
readonly headerHeight: EpPropFinalized<(new (
|
|
513
|
+
/**
|
|
514
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
515
|
+
*
|
|
516
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
517
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
518
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
519
|
+
*
|
|
520
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
521
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
522
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
523
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
524
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
525
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
526
|
+
*/
|
|
527
|
+
...args: any[]) => number | number[]) | (() => number | number[]) | ((new (
|
|
528
|
+
/**
|
|
529
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
530
|
+
*
|
|
531
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
532
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
533
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
534
|
+
*
|
|
535
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
536
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
537
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
538
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
539
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
540
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
541
|
+
*/
|
|
542
|
+
...args: any[]) => number | number[]) | (() => number | number[]))[], unknown, unknown, 50, boolean>;
|
|
543
|
+
readonly footerHeight: EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
544
|
+
readonly rowClass: {
|
|
545
|
+
readonly type: PropType<EpPropMergeType<(new (
|
|
546
|
+
/**
|
|
547
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
548
|
+
*
|
|
549
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
550
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
551
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
552
|
+
*
|
|
553
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
554
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
555
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
556
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
557
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
558
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
559
|
+
*/
|
|
560
|
+
...args: any[]) => string | RowClassNameGetter<any>) | (() => string | RowClassNameGetter<any>) | ((new (
|
|
561
|
+
/**
|
|
562
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
563
|
+
*
|
|
564
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
565
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
566
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
567
|
+
*
|
|
568
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
569
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
570
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
571
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
572
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
573
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
574
|
+
*/
|
|
575
|
+
...args: any[]) => string | RowClassNameGetter<any>) | (() => string | RowClassNameGetter<any>))[], unknown, unknown>>;
|
|
576
|
+
readonly required: false;
|
|
577
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
578
|
+
__epPropKey: true;
|
|
579
|
+
};
|
|
580
|
+
readonly rowProps: {
|
|
581
|
+
readonly type: PropType<any>;
|
|
582
|
+
readonly required: false;
|
|
583
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
584
|
+
__epPropKey: true;
|
|
585
|
+
};
|
|
586
|
+
readonly rowHeight: EpPropFinalized<NumberConstructor, unknown, unknown, 50, boolean>;
|
|
587
|
+
readonly cellProps: {
|
|
588
|
+
readonly type: PropType<EpPropMergeType<(new (
|
|
589
|
+
/**
|
|
590
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
591
|
+
*
|
|
592
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
593
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
594
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
595
|
+
*
|
|
596
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
597
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
598
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
599
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
600
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
601
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
602
|
+
*/
|
|
603
|
+
...args: any[]) => Record<string, any> | ExtraCellPropGetter<any>) | (() => Record<string, any> | ExtraCellPropGetter<any>) | ((new (
|
|
604
|
+
/**
|
|
605
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
606
|
+
*
|
|
607
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
608
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
609
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
610
|
+
*
|
|
611
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
612
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
613
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
614
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
615
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
616
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
617
|
+
*/
|
|
618
|
+
...args: any[]) => Record<string, any> | ExtraCellPropGetter<any>) | (() => Record<string, any> | ExtraCellPropGetter<any>))[], unknown, unknown>>;
|
|
619
|
+
readonly required: false;
|
|
620
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
621
|
+
__epPropKey: true;
|
|
622
|
+
};
|
|
623
|
+
readonly columns: {
|
|
624
|
+
readonly type: PropType< AnyColumn[]>;
|
|
625
|
+
readonly required: true;
|
|
626
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
627
|
+
__epPropKey: true;
|
|
628
|
+
};
|
|
629
|
+
readonly data: {
|
|
630
|
+
readonly type: PropType<any[]>;
|
|
631
|
+
readonly required: true;
|
|
632
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
633
|
+
__epPropKey: true;
|
|
634
|
+
};
|
|
635
|
+
readonly dataGetter: {
|
|
636
|
+
readonly type: PropType<DataGetter<any>>;
|
|
637
|
+
readonly required: false;
|
|
638
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
639
|
+
__epPropKey: true;
|
|
640
|
+
};
|
|
641
|
+
readonly fixedData: {
|
|
642
|
+
readonly type: PropType<any[]>;
|
|
643
|
+
readonly required: false;
|
|
644
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
645
|
+
__epPropKey: true;
|
|
646
|
+
};
|
|
647
|
+
readonly expandColumnKey: StringConstructor;
|
|
648
|
+
readonly expandedRowKeys: EpPropFinalized<(new (...args: any[]) => KeyType[]) | (() => KeyType[]) | ((new (...args: any[]) => KeyType[]) | (() => KeyType[]))[], unknown, unknown, () => never[], boolean>;
|
|
649
|
+
readonly defaultExpandedRowKeys: EpPropFinalized<(new (...args: any[]) => KeyType[]) | (() => KeyType[]) | ((new (...args: any[]) => KeyType[]) | (() => KeyType[]))[], unknown, unknown, () => never[], boolean>;
|
|
650
|
+
readonly class: StringConstructor;
|
|
651
|
+
readonly fixed: BooleanConstructor;
|
|
652
|
+
readonly style: {
|
|
653
|
+
readonly type: PropType<CSSProperties>;
|
|
654
|
+
readonly required: false;
|
|
655
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
656
|
+
__epPropKey: true;
|
|
657
|
+
};
|
|
658
|
+
readonly width: {
|
|
659
|
+
readonly type: PropType<number>;
|
|
660
|
+
readonly required: true;
|
|
661
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
662
|
+
__epPropKey: true;
|
|
663
|
+
};
|
|
664
|
+
readonly height: {
|
|
665
|
+
readonly type: PropType<number>;
|
|
666
|
+
readonly required: true;
|
|
667
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
668
|
+
__epPropKey: true;
|
|
669
|
+
};
|
|
670
|
+
readonly maxHeight: NumberConstructor;
|
|
671
|
+
readonly useIsScrolling: BooleanConstructor;
|
|
672
|
+
readonly indentSize: EpPropFinalized<NumberConstructor, unknown, unknown, 12, boolean>;
|
|
673
|
+
readonly iconSize: EpPropFinalized<NumberConstructor, unknown, unknown, 12, boolean>;
|
|
674
|
+
readonly hScrollbarSize: EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
|
|
675
|
+
readonly vScrollbarSize: EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
|
|
676
|
+
readonly scrollbarAlwaysOn: BooleanConstructor;
|
|
677
|
+
readonly sortBy: EpPropFinalized<(new (...args: any[]) => SortBy) | (() => SortBy) | ((new (...args: any[]) => SortBy) | (() => SortBy))[], unknown, unknown, () => {
|
|
678
|
+
key: KeyType;
|
|
679
|
+
order: TableV2SortOrder;
|
|
680
|
+
}, boolean>;
|
|
681
|
+
readonly sortState: EpPropFinalized<(new (...args: any[]) => SortState) | (() => SortState) | ((new (...args: any[]) => SortState) | (() => SortState))[], unknown, unknown, undefined, boolean>;
|
|
682
|
+
readonly onColumnSort: {
|
|
683
|
+
readonly type: PropType<ColumnSortHandler<any>>;
|
|
684
|
+
readonly required: false;
|
|
685
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
686
|
+
__epPropKey: true;
|
|
687
|
+
};
|
|
688
|
+
readonly onExpandedRowsChange: {
|
|
689
|
+
readonly type: PropType<ExpandedRowsChangeHandler>;
|
|
690
|
+
readonly required: false;
|
|
691
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
692
|
+
__epPropKey: true;
|
|
693
|
+
};
|
|
694
|
+
readonly onEndReached: {
|
|
695
|
+
readonly type: PropType<(remainDistance: number) => void>;
|
|
696
|
+
readonly required: false;
|
|
697
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
698
|
+
__epPropKey: true;
|
|
699
|
+
};
|
|
700
|
+
readonly onRowExpand: {
|
|
701
|
+
readonly type: PropType<RowExpandHandler>;
|
|
702
|
+
readonly required: false;
|
|
703
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
704
|
+
__epPropKey: true;
|
|
705
|
+
};
|
|
706
|
+
readonly onScroll: {
|
|
707
|
+
readonly type: PropType<(...args: any[]) => void>;
|
|
708
|
+
readonly required: false;
|
|
709
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
710
|
+
__epPropKey: true;
|
|
711
|
+
};
|
|
712
|
+
readonly onRowsRendered: {
|
|
713
|
+
readonly type: PropType<(params: onRowRenderedParams) => void>;
|
|
714
|
+
readonly required: false;
|
|
715
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
716
|
+
__epPropKey: true;
|
|
717
|
+
};
|
|
718
|
+
readonly rowEventHandlers: {
|
|
719
|
+
readonly type: PropType<RowEventHandlers>;
|
|
720
|
+
readonly required: false;
|
|
721
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
722
|
+
__epPropKey: true;
|
|
723
|
+
};
|
|
724
|
+
}>>, () =>
|
|
725
|
+
/**
|
|
726
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
727
|
+
*
|
|
728
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
729
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
730
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
731
|
+
*
|
|
732
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
733
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
734
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
735
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
736
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
737
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
738
|
+
*/
|
|
739
|
+
JSX.
|
|
740
|
+
/**
|
|
741
|
+
* YwVirtualTable —— 虚拟化表格(1000+ 行滚动场景)。
|
|
742
|
+
*
|
|
743
|
+
* 方案:封装 Element Plus TableV2(el-table-v2),虚拟滚动由 TableV2 内置实现,
|
|
744
|
+
* 只渲染可视区 ± overscan 行。视觉对齐 yw-table(CSS 变量同源,见非 scoped 样式块)。
|
|
745
|
+
* API 对齐 yw-table:columns 配置式 + slotName 插槽;差异点见 ./types.ts 头注释。
|
|
746
|
+
*
|
|
747
|
+
* 性能纪律(与方案文档 §5 对应):
|
|
748
|
+
* 1. data 不做 deep watch —— 只浅监听引用变化做 errorMap 孤儿清理;
|
|
749
|
+
* 单元格校验由业务在编辑事件里调 validateCell(O(1)),提交前调 validate 全量;
|
|
750
|
+
* 2. 滚动事件只透传,组件内部不在滚动路径上做任何渲染状态更新;
|
|
751
|
+
* 3. 行选中高亮 O(1):直接给行 DOM 打类(同 yw-table 2026-11-10 方案),不走响应式状态;
|
|
752
|
+
* 4. 选中集合用 Set(yw-table 的数组 includes 在 1000 行全选时是 O(n²))。
|
|
753
|
+
*/
|
|
754
|
+
Element, {}, {}, {}, {
|
|
755
|
+
readonly fixed: boolean;
|
|
756
|
+
readonly rowKey: EpPropMergeType<(new (...args: any[]) => string | number | symbol) | (() => KeyType) | ((new (...args: any[]) => string | number | symbol) | (() => KeyType))[], unknown, unknown>;
|
|
757
|
+
readonly useIsScrolling: boolean;
|
|
758
|
+
readonly scrollbarAlwaysOn: boolean;
|
|
759
|
+
readonly cache: number;
|
|
760
|
+
readonly estimatedRowHeight: number;
|
|
761
|
+
readonly rowHeight: number;
|
|
762
|
+
readonly hScrollbarSize: number;
|
|
763
|
+
readonly vScrollbarSize: number;
|
|
764
|
+
readonly sortBy: SortBy;
|
|
765
|
+
readonly headerHeight: EpPropMergeType<(new (...args: any[]) => number | number[]) | (() => number | number[]) | ((new (...args: any[]) => number | number[]) | (() => number | number[]))[], unknown, unknown>;
|
|
766
|
+
readonly footerHeight: number;
|
|
767
|
+
readonly indentSize: number;
|
|
768
|
+
readonly iconSize: number;
|
|
769
|
+
readonly sortState: SortState;
|
|
770
|
+
readonly expandedRowKeys: KeyType[];
|
|
771
|
+
readonly defaultExpandedRowKeys: KeyType[];
|
|
772
|
+
}> | null;
|
|
773
|
+
}, HTMLDivElement>;
|
|
774
|
+
export default _default;
|