ep-craft 0.1.41 → 0.2.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/dist/components/input-number/EpInputNumber.vue.js +62 -63
- package/dist/components/input-number/input-number.d.ts +5 -0
- package/dist/components/input-number/input-number.js +6 -6
- package/dist/components/select/index.d.ts +6 -3
- package/dist/components/select/select.d.ts +1 -0
- package/dist/components/select/select.js +3 -3
- package/dist/components/select/select.vue.d.ts +3 -1
- package/dist/components/select/select.vue.js +9 -9
- package/dist/components/select/select2.vue.js +73 -75
- package/dist/components/select-v2/src/defaults.d.ts +1 -0
- package/dist/components/select-v2/src/defaults.js +1 -1
- package/dist/components/select-v2/src/select.vue.d.ts +3 -1
- package/dist/components/select-v2/src/select.vue.js +21 -21
- package/dist/components/select-v2/src/select2.vue.js +27 -29
- package/dist/components/tree-select/src/tree-select.vue.d.ts +2 -0
- package/dist-ai/components/affix.json +152 -0
- package/dist-ai/components/affix.md +73 -0
- package/dist-ai/components/alert.json +186 -0
- package/dist-ai/components/alert.md +89 -0
- package/dist-ai/components/anchor-link.json +102 -0
- package/dist-ai/components/anchor-link.md +67 -0
- package/dist-ai/components/anchor.json +179 -0
- package/dist-ai/components/anchor.md +87 -0
- package/dist-ai/components/aside.json +87 -0
- package/dist-ai/components/aside.md +63 -0
- package/dist-ai/components/autocomplete.json +613 -0
- package/dist-ai/components/autocomplete.md +140 -0
- package/dist-ai/components/avatar.json +163 -0
- package/dist-ai/components/avatar.md +83 -0
- package/dist-ai/components/backtop.json +118 -0
- package/dist-ai/components/backtop.md +66 -0
- package/dist-ai/components/badge.json +186 -0
- package/dist-ai/components/badge.md +85 -0
- package/dist-ai/components/breadcrumb-item.json +97 -0
- package/dist-ai/components/breadcrumb-item.md +65 -0
- package/dist-ai/components/breadcrumb.json +100 -0
- package/dist-ai/components/breadcrumb.md +68 -0
- package/dist-ai/components/button-group.json +123 -0
- package/dist-ai/components/button-group.md +65 -0
- package/dist-ai/components/button.json +349 -0
- package/dist-ai/components/button.md +124 -0
- package/dist-ai/components/calendar.json +148 -0
- package/dist-ai/components/calendar.md +74 -0
- package/dist-ai/components/card.json +168 -0
- package/dist-ai/components/card.md +87 -0
- package/dist-ai/components/carousel-item.json +99 -0
- package/dist-ai/components/carousel-item.md +68 -0
- package/dist-ai/components/carousel.json +245 -0
- package/dist-ai/components/carousel.md +97 -0
- package/dist-ai/components/cascader-panel.json +242 -0
- package/dist-ai/components/cascader-panel.md +108 -0
- package/dist-ai/components/cascader.json +531 -0
- package/dist-ai/components/cascader.md +146 -0
- package/dist-ai/components/check-tag.json +133 -0
- package/dist-ai/components/check-tag.md +72 -0
- package/dist-ai/components/checkbox-button.json +279 -0
- package/dist-ai/components/checkbox-button.md +94 -0
- package/dist-ai/components/checkbox-group.json +236 -0
- package/dist-ai/components/checkbox-group.md +90 -0
- package/dist-ai/components/checkbox.json +278 -0
- package/dist-ai/components/checkbox.md +91 -0
- package/dist-ai/components/col.json +168 -0
- package/dist-ai/components/col.md +72 -0
- package/dist-ai/components/collapse-item.json +133 -0
- package/dist-ai/components/collapse-item.md +75 -0
- package/dist-ai/components/collapse-transition.json +75 -0
- package/dist-ai/components/collapse-transition.md +59 -0
- package/dist-ai/components/collapse.json +129 -0
- package/dist-ai/components/collapse.md +76 -0
- package/dist-ai/components/color-picker.json +280 -0
- package/dist-ai/components/color-picker.md +85 -0
- package/dist-ai/components/config-provider.json +222 -0
- package/dist-ai/components/config-provider.md +76 -0
- package/dist-ai/components/container.json +95 -0
- package/dist-ai/components/container.md +70 -0
- package/dist-ai/components/countdown.json +155 -0
- package/dist-ai/components/countdown.md +73 -0
- package/dist-ai/components/date-picker-panel.json +346 -0
- package/dist-ai/components/date-picker-panel.md +91 -0
- package/dist-ai/components/date-picker.json +574 -0
- package/dist-ai/components/date-picker.md +153 -0
- package/dist-ai/components/descriptions-item.json +175 -0
- package/dist-ai/components/descriptions-item.md +73 -0
- package/dist-ai/components/descriptions.json +171 -0
- package/dist-ai/components/descriptions.md +78 -0
- package/dist-ai/components/dialog.json +403 -0
- package/dist-ai/components/dialog.md +108 -0
- package/dist-ai/components/divider.json +102 -0
- package/dist-ai/components/divider.md +59 -0
- package/dist-ai/components/drawer.json +468 -0
- package/dist-ai/components/drawer.md +115 -0
- package/dist-ai/components/dropdown-item.json +156 -0
- package/dist-ai/components/dropdown-item.md +84 -0
- package/dist-ai/components/dropdown-menu.json +92 -0
- package/dist-ai/components/dropdown-menu.md +70 -0
- package/dist-ai/components/dropdown.json +374 -0
- package/dist-ai/components/dropdown.md +108 -0
- package/dist-ai/components/empty.json +116 -0
- package/dist-ai/components/empty.md +62 -0
- package/dist-ai/components/footer.json +86 -0
- package/dist-ai/components/footer.md +63 -0
- package/dist-ai/components/form-item.json +242 -0
- package/dist-ai/components/form-item.md +93 -0
- package/dist-ai/components/form.json +277 -0
- package/dist-ai/components/form.md +117 -0
- package/dist-ai/components/header.json +86 -0
- package/dist-ai/components/header.md +63 -0
- package/dist-ai/components/icon.json +95 -0
- package/dist-ai/components/icon.md +61 -0
- package/dist-ai/components/image-viewer.json +235 -0
- package/dist-ai/components/image-viewer.md +88 -0
- package/dist-ai/components/image.json +299 -0
- package/dist-ai/components/image.md +96 -0
- package/dist-ai/components/input-number.json +370 -0
- package/dist-ai/components/input-number.md +127 -0
- package/dist-ai/components/input.json +545 -0
- package/dist-ai/components/input.md +166 -0
- package/dist-ai/components/link.json +162 -0
- package/dist-ai/components/link.md +72 -0
- package/dist-ai/components/main.json +77 -0
- package/dist-ai/components/main.md +58 -0
- package/dist-ai/components/mention.json +598 -0
- package/dist-ai/components/mention.md +136 -0
- package/dist-ai/components/menu-item-group.json +101 -0
- package/dist-ai/components/menu-item-group.md +69 -0
- package/dist-ai/components/menu-item.json +131 -0
- package/dist-ai/components/menu-item.md +76 -0
- package/dist-ai/components/menu.json +314 -0
- package/dist-ai/components/menu.md +104 -0
- package/dist-ai/components/option-group.json +113 -0
- package/dist-ai/components/option-group.md +79 -0
- package/dist-ai/components/option.json +122 -0
- package/dist-ai/components/option.md +70 -0
- package/dist-ai/components/page-header.json +131 -0
- package/dist-ai/components/page-header.md +70 -0
- package/dist-ai/components/pagination.json +325 -0
- package/dist-ai/components/pagination.md +115 -0
- package/dist-ai/components/popconfirm.json +240 -0
- package/dist-ai/components/popconfirm.md +89 -0
- package/dist-ai/components/popover.json +351 -0
- package/dist-ai/components/popover.md +99 -0
- package/dist-ai/components/popper.json +93 -0
- package/dist-ai/components/popper.md +66 -0
- package/dist-ai/components/progress.json +219 -0
- package/dist-ai/components/progress.md +74 -0
- package/dist-ai/components/radio-button.json +142 -0
- package/dist-ai/components/radio-button.md +76 -0
- package/dist-ai/components/radio-group.json +219 -0
- package/dist-ai/components/radio-group.md +88 -0
- package/dist-ai/components/radio.json +177 -0
- package/dist-ai/components/radio.md +83 -0
- package/dist-ai/components/rate.json +286 -0
- package/dist-ai/components/rate.md +83 -0
- package/dist-ai/components/result.json +118 -0
- package/dist-ai/components/result.md +66 -0
- package/dist-ai/components/row.json +115 -0
- package/dist-ai/components/row.md +68 -0
- package/dist-ai/components/scrollbar.json +280 -0
- package/dist-ai/components/scrollbar.md +89 -0
- package/dist-ai/components/segmented.json +204 -0
- package/dist-ai/components/segmented.md +81 -0
- package/dist-ai/components/select-v2.json +729 -0
- package/dist-ai/components/select-v2.md +193 -0
- package/dist-ai/components/select.json +697 -0
- package/dist-ai/components/select.md +188 -0
- package/dist-ai/components/skeleton-item.json +80 -0
- package/dist-ai/components/skeleton-item.md +57 -0
- package/dist-ai/components/skeleton.json +134 -0
- package/dist-ai/components/skeleton.md +65 -0
- package/dist-ai/components/slider.json +326 -0
- package/dist-ai/components/slider.md +88 -0
- package/dist-ai/components/space.json +178 -0
- package/dist-ai/components/space.md +73 -0
- package/dist-ai/components/statistic.json +167 -0
- package/dist-ai/components/statistic.md +66 -0
- package/dist-ai/components/step.json +124 -0
- package/dist-ai/components/step.md +69 -0
- package/dist-ai/components/steps.json +157 -0
- package/dist-ai/components/steps.md +79 -0
- package/dist-ai/components/sub-menu.json +211 -0
- package/dist-ai/components/sub-menu.md +88 -0
- package/dist-ai/components/switch.json +292 -0
- package/dist-ai/components/switch.md +88 -0
- package/dist-ai/components/tab-pane.json +137 -0
- package/dist-ai/components/tab-pane.md +72 -0
- package/dist-ai/components/table-column.json +368 -0
- package/dist-ai/components/table-column.md +103 -0
- package/dist-ai/components/table-v2.json +486 -0
- package/dist-ai/components/table-v2.md +123 -0
- package/dist-ai/components/table.json +734 -0
- package/dist-ai/components/table.md +205 -0
- package/dist-ai/components/tabs.json +231 -0
- package/dist-ai/components/tabs.md +127 -0
- package/dist-ai/components/tag.json +205 -0
- package/dist-ai/components/tag.md +105 -0
- package/dist-ai/components/text.json +143 -0
- package/dist-ai/components/text.md +66 -0
- package/dist-ai/components/time-picker.json +555 -0
- package/dist-ai/components/time-picker.md +123 -0
- package/dist-ai/components/time-select.json +321 -0
- package/dist-ai/components/time-select.md +93 -0
- package/dist-ai/components/timeline-item.json +186 -0
- package/dist-ai/components/timeline-item.md +78 -0
- package/dist-ai/components/timeline.json +99 -0
- package/dist-ai/components/timeline.md +65 -0
- package/dist-ai/components/tooltip.json +599 -0
- package/dist-ai/components/tooltip.md +137 -0
- package/dist-ai/components/tour-step.json +219 -0
- package/dist-ai/components/tour-step.md +88 -0
- package/dist-ai/components/tour.json +258 -0
- package/dist-ai/components/tour.md +96 -0
- package/dist-ai/components/transfer.json +275 -0
- package/dist-ai/components/transfer.md +95 -0
- package/dist-ai/components/tree-select.json +945 -0
- package/dist-ai/components/tree-select.md +181 -0
- package/dist-ai/components/tree-v2.json +395 -0
- package/dist-ai/components/tree-v2.md +113 -0
- package/dist-ai/components/tree.json +485 -0
- package/dist-ai/components/tree.md +131 -0
- package/dist-ai/components/upload.json +382 -0
- package/dist-ai/components/upload.md +130 -0
- package/dist-ai/components/watermark.json +157 -0
- package/dist-ai/components/watermark.md +66 -0
- package/dist-ai/directives/click-outside.json +61 -0
- package/dist-ai/directives/click-outside.md +50 -0
- package/dist-ai/directives/infinite-scroll.json +83 -0
- package/dist-ai/directives/infinite-scroll.md +62 -0
- package/dist-ai/directives/loading.json +89 -0
- package/dist-ai/directives/loading.md +69 -0
- package/dist-ai/directives/mousewheel.json +54 -0
- package/dist-ai/directives/mousewheel.md +48 -0
- package/dist-ai/directives/repeat-click.json +68 -0
- package/dist-ai/directives/repeat-click.md +49 -0
- package/dist-ai/directives/trap-focus.json +46 -0
- package/dist-ai/directives/trap-focus.md +46 -0
- package/dist-ai/icons.json +1 -0
- package/dist-ai/index.json +1 -0
- package/dist-ai/llms.txt +170 -0
- package/dist-ai/manifest.json +26590 -0
- package/dist-ai/schema/manifest.schema.json +793 -0
- package/dist-ai/services/infinite-scroll.json +80 -0
- package/dist-ai/services/infinite-scroll.md +71 -0
- package/dist-ai/services/loading.json +108 -0
- package/dist-ai/services/loading.md +58 -0
- package/dist-ai/services/message-box.json +159 -0
- package/dist-ai/services/message-box.md +78 -0
- package/dist-ai/services/message.json +137 -0
- package/dist-ai/services/message.md +72 -0
- package/dist-ai/services/notification.json +136 -0
- package/dist-ai/services/notification.md +73 -0
- package/package.json +12 -2
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entry": {
|
|
3
|
+
"category": "data",
|
|
4
|
+
"events": [],
|
|
5
|
+
"exampleOmittedReason": null,
|
|
6
|
+
"examples": [
|
|
7
|
+
{
|
|
8
|
+
"code": "<script setup lang=\"ts\">\nimport { EpTableV2 } from 'ep-craft'\n\nconst columns = [\n { key: 'id', title: 'ID', width: 80 },\n { key: 'name', title: '姓名', width: 160 },\n { key: 'role', title: '角色', width: 160 },\n]\nconst data = Array.from({ length: 100 }, (_, index) => ({\n id: index + 1,\n name: `用户 ${index + 1}`,\n role: '成员',\n}))\n</script>\n\n<template>\n <ep-table-v2 :columns=\"columns\" :data=\"data\" :height=\"300\" />\n</template>",
|
|
9
|
+
"id": "table-v2-1",
|
|
10
|
+
"language": "vue",
|
|
11
|
+
"title": "虚拟化表格"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"exposes": [
|
|
15
|
+
{
|
|
16
|
+
"description": "滚动到指定位置",
|
|
17
|
+
"name": "scrollTo",
|
|
18
|
+
"type": "(params: { scrollLeft?: number; scrollTop?: number }) => void"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"description": "横向滚动到指定位置",
|
|
22
|
+
"name": "scrollToLeft",
|
|
23
|
+
"type": "(scrollLeft: number) => void"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"description": "纵向滚动到指定位置",
|
|
27
|
+
"name": "scrollToTop",
|
|
28
|
+
"type": "(scrollTop: number) => void"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"description": "滚动到指定行",
|
|
32
|
+
"name": "scrollToRow",
|
|
33
|
+
"type": "(row: number, strategy?: ScrollStrategy) => void"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"hot": false,
|
|
37
|
+
"id": "component:table-v2",
|
|
38
|
+
"keywords": {
|
|
39
|
+
"en": [
|
|
40
|
+
"table-v2",
|
|
41
|
+
"table",
|
|
42
|
+
"v2",
|
|
43
|
+
"virtual",
|
|
44
|
+
"grid",
|
|
45
|
+
"data"
|
|
46
|
+
],
|
|
47
|
+
"zh": [
|
|
48
|
+
"虚拟化表格",
|
|
49
|
+
"数据"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"kind": "component",
|
|
53
|
+
"name": "EpTableV2",
|
|
54
|
+
"nonUseCases": [
|
|
55
|
+
"数据量极小且无需结构化展示时"
|
|
56
|
+
],
|
|
57
|
+
"props": [
|
|
58
|
+
{
|
|
59
|
+
"alias": null,
|
|
60
|
+
"defaultText": null,
|
|
61
|
+
"description": "虚拟滚动缓存数量",
|
|
62
|
+
"hasDefault": true,
|
|
63
|
+
"name": "cache",
|
|
64
|
+
"required": false,
|
|
65
|
+
"type": "number"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"alias": null,
|
|
69
|
+
"defaultText": null,
|
|
70
|
+
"description": "估算行高,用于虚拟滚动",
|
|
71
|
+
"hasDefault": true,
|
|
72
|
+
"name": "estimatedRowHeight",
|
|
73
|
+
"required": false,
|
|
74
|
+
"type": "number"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"alias": null,
|
|
78
|
+
"defaultText": "id",
|
|
79
|
+
"description": "行数据唯一标识的字段名",
|
|
80
|
+
"hasDefault": true,
|
|
81
|
+
"name": "rowKey",
|
|
82
|
+
"required": false,
|
|
83
|
+
"type": "string | number | symbol"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"alias": null,
|
|
87
|
+
"defaultText": null,
|
|
88
|
+
"description": "表头类名或返回类名的函数",
|
|
89
|
+
"hasDefault": false,
|
|
90
|
+
"name": "headerClass",
|
|
91
|
+
"required": false,
|
|
92
|
+
"type": "string | Function"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"alias": null,
|
|
96
|
+
"defaultText": null,
|
|
97
|
+
"description": "表头属性或返回属性的函数",
|
|
98
|
+
"hasDefault": false,
|
|
99
|
+
"name": "headerProps",
|
|
100
|
+
"required": false,
|
|
101
|
+
"type": "object | Function"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"alias": null,
|
|
105
|
+
"defaultText": null,
|
|
106
|
+
"description": "表头单元格属性或返回属性的函数",
|
|
107
|
+
"hasDefault": false,
|
|
108
|
+
"name": "headerCellProps",
|
|
109
|
+
"required": false,
|
|
110
|
+
"type": "object | Function"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"alias": null,
|
|
114
|
+
"defaultText": null,
|
|
115
|
+
"description": "表头高度",
|
|
116
|
+
"hasDefault": true,
|
|
117
|
+
"name": "headerHeight",
|
|
118
|
+
"required": false,
|
|
119
|
+
"type": "number"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"alias": null,
|
|
123
|
+
"defaultText": "0",
|
|
124
|
+
"description": "底部高度",
|
|
125
|
+
"hasDefault": true,
|
|
126
|
+
"name": "footerHeight",
|
|
127
|
+
"required": false,
|
|
128
|
+
"type": "number"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"alias": null,
|
|
132
|
+
"defaultText": null,
|
|
133
|
+
"description": "行类名或返回类名的函数",
|
|
134
|
+
"hasDefault": false,
|
|
135
|
+
"name": "rowClass",
|
|
136
|
+
"required": false,
|
|
137
|
+
"type": "string | Function"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"alias": null,
|
|
141
|
+
"defaultText": null,
|
|
142
|
+
"description": "行属性或返回属性的函数",
|
|
143
|
+
"hasDefault": false,
|
|
144
|
+
"name": "rowProps",
|
|
145
|
+
"required": false,
|
|
146
|
+
"type": "object | Function"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"alias": null,
|
|
150
|
+
"defaultText": "50",
|
|
151
|
+
"description": "行高",
|
|
152
|
+
"hasDefault": true,
|
|
153
|
+
"name": "rowHeight",
|
|
154
|
+
"required": false,
|
|
155
|
+
"type": "number"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"alias": null,
|
|
159
|
+
"defaultText": null,
|
|
160
|
+
"description": "单元格属性或返回属性的函数",
|
|
161
|
+
"hasDefault": false,
|
|
162
|
+
"name": "cellProps",
|
|
163
|
+
"required": false,
|
|
164
|
+
"type": "object | Function"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"alias": null,
|
|
168
|
+
"defaultText": null,
|
|
169
|
+
"description": "列配置(必填)",
|
|
170
|
+
"hasDefault": false,
|
|
171
|
+
"name": "columns",
|
|
172
|
+
"required": true,
|
|
173
|
+
"type": "Column[]"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"alias": null,
|
|
177
|
+
"defaultText": null,
|
|
178
|
+
"description": "数据源(必填)",
|
|
179
|
+
"hasDefault": false,
|
|
180
|
+
"name": "data",
|
|
181
|
+
"required": true,
|
|
182
|
+
"type": "any[]"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"alias": null,
|
|
186
|
+
"defaultText": null,
|
|
187
|
+
"description": "自定义数据获取器",
|
|
188
|
+
"hasDefault": false,
|
|
189
|
+
"name": "dataGetter",
|
|
190
|
+
"required": false,
|
|
191
|
+
"type": "DataGetter"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"alias": null,
|
|
195
|
+
"defaultText": null,
|
|
196
|
+
"description": "固定列的数据",
|
|
197
|
+
"hasDefault": false,
|
|
198
|
+
"name": "fixedData",
|
|
199
|
+
"required": false,
|
|
200
|
+
"type": "any[]"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"alias": null,
|
|
204
|
+
"defaultText": null,
|
|
205
|
+
"description": "展开列的 key",
|
|
206
|
+
"hasDefault": false,
|
|
207
|
+
"name": "expandColumnKey",
|
|
208
|
+
"required": false,
|
|
209
|
+
"type": "string"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"alias": null,
|
|
213
|
+
"defaultText": "[]",
|
|
214
|
+
"description": "展开行的 key 数组",
|
|
215
|
+
"hasDefault": true,
|
|
216
|
+
"name": "expandedRowKeys",
|
|
217
|
+
"required": false,
|
|
218
|
+
"type": "KeyType[]"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"alias": null,
|
|
222
|
+
"defaultText": "[]",
|
|
223
|
+
"description": "默认展开行的 key 数组",
|
|
224
|
+
"hasDefault": true,
|
|
225
|
+
"name": "defaultExpandedRowKeys",
|
|
226
|
+
"required": false,
|
|
227
|
+
"type": "KeyType[]"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"alias": null,
|
|
231
|
+
"defaultText": null,
|
|
232
|
+
"description": "表格类名",
|
|
233
|
+
"hasDefault": false,
|
|
234
|
+
"name": "class",
|
|
235
|
+
"required": false,
|
|
236
|
+
"type": "string"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"alias": null,
|
|
240
|
+
"defaultText": "false",
|
|
241
|
+
"description": "是否固定表格",
|
|
242
|
+
"hasDefault": false,
|
|
243
|
+
"name": "fixed",
|
|
244
|
+
"required": false,
|
|
245
|
+
"type": "boolean"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"alias": null,
|
|
249
|
+
"defaultText": null,
|
|
250
|
+
"description": "表格样式",
|
|
251
|
+
"hasDefault": false,
|
|
252
|
+
"name": "style",
|
|
253
|
+
"required": false,
|
|
254
|
+
"type": "CSSProperties"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"alias": null,
|
|
258
|
+
"defaultText": null,
|
|
259
|
+
"description": "表格宽度(必填)",
|
|
260
|
+
"hasDefault": false,
|
|
261
|
+
"name": "width",
|
|
262
|
+
"required": true,
|
|
263
|
+
"type": "number"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"alias": null,
|
|
267
|
+
"defaultText": null,
|
|
268
|
+
"description": "表格高度(必填)",
|
|
269
|
+
"hasDefault": false,
|
|
270
|
+
"name": "height",
|
|
271
|
+
"required": true,
|
|
272
|
+
"type": "number"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"alias": null,
|
|
276
|
+
"defaultText": null,
|
|
277
|
+
"description": "表格最大高度",
|
|
278
|
+
"hasDefault": false,
|
|
279
|
+
"name": "maxHeight",
|
|
280
|
+
"required": false,
|
|
281
|
+
"type": "number"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"alias": null,
|
|
285
|
+
"defaultText": "false",
|
|
286
|
+
"description": "是否使用 isScrolling 状态",
|
|
287
|
+
"hasDefault": false,
|
|
288
|
+
"name": "useIsScrolling",
|
|
289
|
+
"required": false,
|
|
290
|
+
"type": "boolean"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"alias": null,
|
|
294
|
+
"defaultText": "12",
|
|
295
|
+
"description": "树形数据缩进,单位 px",
|
|
296
|
+
"hasDefault": true,
|
|
297
|
+
"name": "indentSize",
|
|
298
|
+
"required": false,
|
|
299
|
+
"type": "number"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"alias": null,
|
|
303
|
+
"defaultText": "12",
|
|
304
|
+
"description": "图标尺寸,单位 px",
|
|
305
|
+
"hasDefault": true,
|
|
306
|
+
"name": "iconSize",
|
|
307
|
+
"required": false,
|
|
308
|
+
"type": "number"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"alias": null,
|
|
312
|
+
"defaultText": null,
|
|
313
|
+
"description": "横向滚动条尺寸",
|
|
314
|
+
"hasDefault": true,
|
|
315
|
+
"name": "hScrollbarSize",
|
|
316
|
+
"required": false,
|
|
317
|
+
"type": "number"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"alias": null,
|
|
321
|
+
"defaultText": null,
|
|
322
|
+
"description": "纵向滚动条尺寸",
|
|
323
|
+
"hasDefault": true,
|
|
324
|
+
"name": "vScrollbarSize",
|
|
325
|
+
"required": false,
|
|
326
|
+
"type": "number"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"alias": null,
|
|
330
|
+
"defaultText": null,
|
|
331
|
+
"description": "是否始终显示滚动条",
|
|
332
|
+
"hasDefault": false,
|
|
333
|
+
"name": "scrollbarAlwaysOn",
|
|
334
|
+
"required": false,
|
|
335
|
+
"type": "boolean"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"alias": null,
|
|
339
|
+
"defaultText": "{}",
|
|
340
|
+
"description": "排序配置",
|
|
341
|
+
"hasDefault": true,
|
|
342
|
+
"name": "sortBy",
|
|
343
|
+
"required": false,
|
|
344
|
+
"type": "{ key: KeyType; order: SortOrder }"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"alias": null,
|
|
348
|
+
"defaultText": null,
|
|
349
|
+
"description": "排序状态",
|
|
350
|
+
"hasDefault": true,
|
|
351
|
+
"name": "sortState",
|
|
352
|
+
"required": false,
|
|
353
|
+
"type": "SortState"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"alias": null,
|
|
357
|
+
"defaultText": null,
|
|
358
|
+
"description": "列排序时触发",
|
|
359
|
+
"hasDefault": false,
|
|
360
|
+
"name": "onColumnSort",
|
|
361
|
+
"required": false,
|
|
362
|
+
"type": "(params: ColumnSortParams) => void"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"alias": null,
|
|
366
|
+
"defaultText": null,
|
|
367
|
+
"description": "展开行变化时触发",
|
|
368
|
+
"hasDefault": false,
|
|
369
|
+
"name": "onExpandedRowsChange",
|
|
370
|
+
"required": false,
|
|
371
|
+
"type": "(keys: KeyType[]) => void"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"alias": null,
|
|
375
|
+
"defaultText": null,
|
|
376
|
+
"description": "滚动到底部时触发",
|
|
377
|
+
"hasDefault": false,
|
|
378
|
+
"name": "onEndReached",
|
|
379
|
+
"required": false,
|
|
380
|
+
"type": "(remainDistance: number) => void"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"alias": null,
|
|
384
|
+
"defaultText": null,
|
|
385
|
+
"description": "行展开/收起时触发",
|
|
386
|
+
"hasDefault": false,
|
|
387
|
+
"name": "onRowExpand",
|
|
388
|
+
"required": false,
|
|
389
|
+
"type": "(params: { expanded: boolean; rowData: any; rowIndex: number }) => void"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"alias": null,
|
|
393
|
+
"defaultText": null,
|
|
394
|
+
"description": "滚动时触发",
|
|
395
|
+
"hasDefault": false,
|
|
396
|
+
"name": "onScroll",
|
|
397
|
+
"required": false,
|
|
398
|
+
"type": "(params: { x: number; y: number }) => void"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"alias": null,
|
|
402
|
+
"defaultText": null,
|
|
403
|
+
"description": "行渲染完成时触发",
|
|
404
|
+
"hasDefault": false,
|
|
405
|
+
"name": "onRowsRendered",
|
|
406
|
+
"required": false,
|
|
407
|
+
"type": "(params: { start: number; end: number }) => void"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"alias": null,
|
|
411
|
+
"defaultText": null,
|
|
412
|
+
"description": "行事件处理器",
|
|
413
|
+
"hasDefault": false,
|
|
414
|
+
"name": "rowEventHandlers",
|
|
415
|
+
"required": false,
|
|
416
|
+
"type": "TableV2RowEventHandlers"
|
|
417
|
+
}
|
|
418
|
+
],
|
|
419
|
+
"related": [
|
|
420
|
+
"EpTable",
|
|
421
|
+
"EpTableColumn"
|
|
422
|
+
],
|
|
423
|
+
"relations": {
|
|
424
|
+
"children": [
|
|
425
|
+
"EpTableColumn"
|
|
426
|
+
],
|
|
427
|
+
"combos": [
|
|
428
|
+
"EpTableV2 + EpTableColumn"
|
|
429
|
+
],
|
|
430
|
+
"parents": [],
|
|
431
|
+
"requiredChildren": []
|
|
432
|
+
},
|
|
433
|
+
"slots": [
|
|
434
|
+
{
|
|
435
|
+
"description": "自定义单元格内容,参数为 `{ columns, column, columnIndex, rowData, rowIndex }`",
|
|
436
|
+
"name": "cell"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"description": "自定义表头内容",
|
|
440
|
+
"name": "header"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"description": "自定义行内容",
|
|
444
|
+
"name": "row"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"description": "自定义底部内容",
|
|
448
|
+
"name": "footer"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"description": "无数据时的内容",
|
|
452
|
+
"name": "empty"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"description": "覆盖层内容",
|
|
456
|
+
"name": "overlay"
|
|
457
|
+
}
|
|
458
|
+
],
|
|
459
|
+
"slug": "table-v2",
|
|
460
|
+
"summary": "虚拟化表格,结构化数据展示",
|
|
461
|
+
"tag": "ep-table-v2",
|
|
462
|
+
"useCases": [
|
|
463
|
+
"展示虚拟化表格类结构化数据",
|
|
464
|
+
"需要浏览、比较或定位数据时"
|
|
465
|
+
],
|
|
466
|
+
"variants": [],
|
|
467
|
+
"visual": {
|
|
468
|
+
"cssVars": [
|
|
469
|
+
"--el-border-color-lighter",
|
|
470
|
+
"--el-bg-color",
|
|
471
|
+
"--el-text-color-regular",
|
|
472
|
+
"--el-font-size-base"
|
|
473
|
+
],
|
|
474
|
+
"density": "紧凑",
|
|
475
|
+
"shape": "块级数据区域",
|
|
476
|
+
"slotContent": [
|
|
477
|
+
"cell:自定义单元格内容,参数为 `{ columns, column, columnIndex, rowData, rowIndex }`",
|
|
478
|
+
"header:自定义表头内容",
|
|
479
|
+
"row:自定义行内容"
|
|
480
|
+
]
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"generatedAt": "2026-11-03T03:09:12.050Z",
|
|
484
|
+
"libraryVersion": "0.2.0",
|
|
485
|
+
"schemaVersion": 1
|
|
486
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# EpTableV2
|
|
2
|
+
|
|
3
|
+
`ep-table-v2` · data(数据展示) · `component:table-v2`
|
|
4
|
+
|
|
5
|
+
## 摘要
|
|
6
|
+
|
|
7
|
+
虚拟化表格,结构化数据展示
|
|
8
|
+
|
|
9
|
+
## 适用场景
|
|
10
|
+
|
|
11
|
+
- 适用:展示虚拟化表格类结构化数据
|
|
12
|
+
- 适用:需要浏览、比较或定位数据时
|
|
13
|
+
- 不适用:数据量极小且无需结构化展示时
|
|
14
|
+
|
|
15
|
+
## 关键词
|
|
16
|
+
|
|
17
|
+
- 中文:虚拟化表格、数据
|
|
18
|
+
- English: table-v2, table, v2, virtual, grid, data
|
|
19
|
+
|
|
20
|
+
## Props
|
|
21
|
+
|
|
22
|
+
- cache (number,默认 见文档):虚拟滚动缓存数量
|
|
23
|
+
- estimatedRowHeight (number,默认 见文档):估算行高,用于虚拟滚动
|
|
24
|
+
- rowKey (string | number | symbol,默认 id):行数据唯一标识的字段名
|
|
25
|
+
- headerClass (string | Function):表头类名或返回类名的函数
|
|
26
|
+
- headerProps (object | Function):表头属性或返回属性的函数
|
|
27
|
+
- headerCellProps (object | Function):表头单元格属性或返回属性的函数
|
|
28
|
+
- headerHeight (number,默认 见文档):表头高度
|
|
29
|
+
- footerHeight (number,默认 0):底部高度
|
|
30
|
+
- rowClass (string | Function):行类名或返回类名的函数
|
|
31
|
+
- rowProps (object | Function):行属性或返回属性的函数
|
|
32
|
+
- rowHeight (number,默认 50):行高
|
|
33
|
+
- cellProps (object | Function):单元格属性或返回属性的函数
|
|
34
|
+
- columns (Column[],必填):列配置(必填)
|
|
35
|
+
- data (any[],必填):数据源(必填)
|
|
36
|
+
- dataGetter (DataGetter):自定义数据获取器
|
|
37
|
+
- fixedData (any[]):固定列的数据
|
|
38
|
+
- expandColumnKey (string):展开列的 key
|
|
39
|
+
- expandedRowKeys (KeyType[],默认 []):展开行的 key 数组
|
|
40
|
+
- defaultExpandedRowKeys (KeyType[],默认 []):默认展开行的 key 数组
|
|
41
|
+
- class (string):表格类名
|
|
42
|
+
- fixed (boolean):是否固定表格
|
|
43
|
+
- style (CSSProperties):表格样式
|
|
44
|
+
- width (number,必填):表格宽度(必填)
|
|
45
|
+
- height (number,必填):表格高度(必填)
|
|
46
|
+
- maxHeight (number):表格最大高度
|
|
47
|
+
- useIsScrolling (boolean):是否使用 isScrolling 状态
|
|
48
|
+
- indentSize (number,默认 12):树形数据缩进,单位 px
|
|
49
|
+
- iconSize (number,默认 12):图标尺寸,单位 px
|
|
50
|
+
- hScrollbarSize (number,默认 见文档):横向滚动条尺寸
|
|
51
|
+
- vScrollbarSize (number,默认 见文档):纵向滚动条尺寸
|
|
52
|
+
- scrollbarAlwaysOn (boolean):是否始终显示滚动条
|
|
53
|
+
- sortBy ({ key: KeyType; order: SortOrder },默认 {}):排序配置
|
|
54
|
+
- sortState (SortState,默认 见文档):排序状态
|
|
55
|
+
- onColumnSort ((params: ColumnSortParams) => void):列排序时触发
|
|
56
|
+
- onExpandedRowsChange ((keys: KeyType[]) => void):展开行变化时触发
|
|
57
|
+
- onEndReached ((remainDistance: number) => void):滚动到底部时触发
|
|
58
|
+
- onRowExpand ((params: { expanded: boolean; rowData: any; rowIndex: number }) => void):行展开/收起时触发
|
|
59
|
+
- onScroll ((params: { x: number; y: number }) => void):滚动时触发
|
|
60
|
+
- onRowsRendered ((params: { start: number; end: number }) => void):行渲染完成时触发
|
|
61
|
+
- rowEventHandlers (TableV2RowEventHandlers):行事件处理器
|
|
62
|
+
|
|
63
|
+
## Slots
|
|
64
|
+
|
|
65
|
+
- cell:自定义单元格内容,参数为 `{ columns, column, columnIndex, rowData, rowIndex }`
|
|
66
|
+
- header:自定义表头内容
|
|
67
|
+
- row:自定义行内容
|
|
68
|
+
- footer:自定义底部内容
|
|
69
|
+
- empty:无数据时的内容
|
|
70
|
+
- overlay:覆盖层内容
|
|
71
|
+
|
|
72
|
+
## Exposes
|
|
73
|
+
|
|
74
|
+
- scrollTo((params: { scrollLeft?: number; scrollTop?: number }) => void):滚动到指定位置
|
|
75
|
+
- scrollToLeft((scrollLeft: number) => void):横向滚动到指定位置
|
|
76
|
+
- scrollToTop((scrollTop: number) => void):纵向滚动到指定位置
|
|
77
|
+
- scrollToRow((row: number, strategy?: ScrollStrategy) => void):滚动到指定行
|
|
78
|
+
|
|
79
|
+
## 关系
|
|
80
|
+
|
|
81
|
+
- 子级:EpTableColumn
|
|
82
|
+
- 常用组合:EpTableV2 + EpTableColumn
|
|
83
|
+
|
|
84
|
+
## 视觉提示
|
|
85
|
+
|
|
86
|
+
- 形状:块级数据区域
|
|
87
|
+
- 密度:紧凑
|
|
88
|
+
- 插槽内容:cell:自定义单元格内容,参数为 `{ columns, column, columnIndex, rowData, rowIndex }`;header:自定义表头内容;row:自定义行内容
|
|
89
|
+
- CSS 变量:--el-border-color-lighter、--el-bg-color、--el-text-color-regular、--el-font-size-base
|
|
90
|
+
|
|
91
|
+
## 示例
|
|
92
|
+
|
|
93
|
+
### 虚拟化表格
|
|
94
|
+
|
|
95
|
+
```vue
|
|
96
|
+
<script setup lang="ts">
|
|
97
|
+
import { EpTableV2 } from 'ep-craft'
|
|
98
|
+
|
|
99
|
+
const columns = [
|
|
100
|
+
{ key: 'id', title: 'ID', width: 80 },
|
|
101
|
+
{ key: 'name', title: '姓名', width: 160 },
|
|
102
|
+
{ key: 'role', title: '角色', width: 160 },
|
|
103
|
+
]
|
|
104
|
+
const data = Array.from({ length: 100 }, (_, index) => ({
|
|
105
|
+
id: index + 1,
|
|
106
|
+
name: `用户 ${index + 1}`,
|
|
107
|
+
role: '成员',
|
|
108
|
+
}))
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<template>
|
|
112
|
+
<ep-table-v2 :columns="columns" :data="data" :height="300" />
|
|
113
|
+
</template>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## 相关条目
|
|
117
|
+
|
|
118
|
+
- EpTable
|
|
119
|
+
- EpTableColumn
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
ep-craft 0.2.0
|