vxe-table 4.23.7 → 4.23.9
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/all.esm.js +5859 -4018
- package/es/colgroup/index.js +1 -1
- package/es/column/index.js +1 -1
- package/es/components.d.ts +3 -0
- package/es/components.js +4 -8
- package/es/grid/index.js +1 -1
- package/es/grid/src/emits.js +1 -15
- package/es/grid/src/grid.js +398 -121
- package/es/grid/src/props.js +1 -1
- package/es/index.esm.js +6 -0
- package/es/index.js +6 -0
- package/es/table/index.js +1 -1
- package/es/table/module/custom/hook.js +50 -43
- package/es/table/module/custom/panel.js +778 -528
- package/es/table/module/edit/hook.js +141 -63
- package/es/table/module/export/export-panel.js +400 -317
- package/es/table/module/export/hook.js +396 -338
- package/es/table/module/export/import-panel.js +153 -124
- package/es/table/module/filter/hook.js +17 -3
- package/es/table/module/filter/panel.js +147 -85
- package/es/table/module/keyboard/hook.js +9 -5
- package/es/table/module/menu/hook.js +1 -1
- package/es/table/module/menu/panel.js +198 -127
- package/es/table/module/validator/hook.js +1 -1
- package/es/table/render/index.js +152 -99
- package/es/table/src/body.js +356 -234
- package/es/table/src/cell.js +427 -270
- package/es/table/src/columnInfo.js +2 -1
- package/es/table/src/footer.js +145 -100
- package/es/table/src/group.js +7 -3
- package/es/table/src/header.js +230 -173
- package/es/table/src/props.js +1 -1
- package/es/table/src/table.js +1504 -1031
- package/es/table/src/util.js +15 -19
- package/es/toolbar/index.js +1 -1
- package/es/toolbar/src/toolbar.js +133 -76
- package/es/ui/index.d.ts +0 -1
- package/es/ui/index.js +1 -2
- package/es/ui/src/dom.js +9 -6
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.d.ts +1 -1
- package/es/v-x-e-table/index.d.ts +0 -1
- package/es/v-x-e-table/index.js +0 -1
- package/lib/colgroup/index.js +5 -5
- package/lib/column/index.js +5 -5
- package/lib/components.js +8 -12
- package/lib/grid/index.js +4 -4
- package/lib/grid/src/emits.js +1 -15
- package/lib/grid/src/grid.js +419 -142
- package/lib/grid/src/props.js +2 -2
- package/lib/index.common.js +6 -0
- package/lib/index.js +6 -0
- package/lib/index.umd.js +5825 -3945
- package/lib/index.umd.min.js +3 -3
- package/lib/table/index.js +5 -5
- package/lib/table/module/custom/hook.js +51 -44
- package/lib/table/module/custom/panel.js +790 -540
- package/lib/table/module/edit/hook.js +142 -64
- package/lib/table/module/export/export-panel.js +406 -323
- package/lib/table/module/export/hook.js +419 -361
- package/lib/table/module/export/import-panel.js +157 -128
- package/lib/table/module/filter/hook.js +18 -4
- package/lib/table/module/filter/panel.js +149 -87
- package/lib/table/module/keyboard/hook.js +10 -6
- package/lib/table/module/menu/hook.js +2 -2
- package/lib/table/module/menu/panel.js +199 -128
- package/lib/table/module/validator/hook.js +2 -2
- package/lib/table/render/index.js +153 -100
- package/lib/table/src/body.js +357 -235
- package/lib/table/src/cell.js +428 -271
- package/lib/table/src/columnInfo.js +3 -2
- package/lib/table/src/footer.js +146 -101
- package/lib/table/src/group.js +7 -3
- package/lib/table/src/header.js +231 -174
- package/lib/table/src/props.js +2 -2
- package/lib/table/src/table.js +1487 -1045
- package/lib/table/src/util.js +15 -19
- package/lib/toolbar/index.js +4 -4
- package/lib/toolbar/src/toolbar.js +135 -78
- package/lib/ui/index.js +1 -3
- package/lib/ui/src/dom.js +9 -6
- package/lib/ui/src/log.js +1 -1
- package/lib/v-x-e-table/index.js +0 -2
- package/package.json +8 -3
- package/packages/colgroup/index.ts +22 -22
- package/packages/column/index.ts +22 -22
- package/packages/components.ts +41 -43
- package/packages/grid/index.ts +18 -18
- package/packages/grid/src/emits.ts +5 -19
- package/packages/grid/src/grid.ts +2229 -1925
- package/packages/grid/src/props.ts +22 -23
- package/packages/index.ts +11 -4
- package/packages/locale/lang/fr-FR.ts +15 -15
- package/packages/locale/lang/it-IT.ts +4 -4
- package/packages/locale/lang/uk-UA.ts +1 -1
- package/packages/locale/lang/uz-UZ.ts +13 -13
- package/packages/locale/lang/zh-CN.ts +907 -907
- package/packages/table/index.ts +26 -26
- package/packages/table/module/custom/hook.ts +510 -503
- package/packages/table/module/custom/panel.ts +2002 -1743
- package/packages/table/module/edit/hook.ts +1224 -1131
- package/packages/table/module/export/export-panel.ts +697 -611
- package/packages/table/module/export/hook.ts +2160 -2059
- package/packages/table/module/export/import-panel.ts +319 -279
- package/packages/table/module/export/util.ts +25 -24
- package/packages/table/module/filter/hook.ts +519 -501
- package/packages/table/module/filter/panel.ts +368 -304
- package/packages/table/module/keyboard/hook.ts +498 -494
- package/packages/table/module/menu/hook.ts +330 -330
- package/packages/table/module/menu/panel.ts +272 -201
- package/packages/table/module/validator/hook.ts +653 -635
- package/packages/table/render/index.ts +1819 -1744
- package/packages/table/src/body.ts +1078 -955
- package/packages/table/src/cell.ts +1524 -1359
- package/packages/table/src/column.ts +192 -192
- package/packages/table/src/columnInfo.ts +232 -232
- package/packages/table/src/emits.ts +134 -134
- package/packages/table/src/footer.ts +425 -380
- package/packages/table/src/group.ts +67 -63
- package/packages/table/src/header.ts +642 -581
- package/packages/table/src/props.ts +336 -336
- package/packages/table/src/store.ts +14 -14
- package/packages/table/src/table.ts +16011 -15454
- package/packages/table/src/use/cell-view.ts +41 -44
- package/packages/table/src/use/index.ts +1 -1
- package/packages/table/src/util.ts +1206 -1216
- package/packages/toolbar/index.ts +18 -18
- package/packages/toolbar/src/toolbar.ts +768 -706
- package/packages/ui/index.ts +519 -521
- package/packages/ui/src/anime.ts +51 -52
- package/packages/ui/src/comp.ts +3 -3
- package/packages/ui/src/dom.ts +466 -463
- package/packages/ui/src/log.ts +19 -19
- package/packages/ui/src/utils.ts +66 -66
- package/packages/ui/src/vn.ts +55 -55
- package/packages/v-x-e-table/index.d.ts +3 -4
- package/packages/v-x-e-table/index.ts +3 -4
- package/types/all.d.ts +76 -76
- package/types/index.d.ts +4 -4
- /package/dist/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/dist/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
- /package/dist/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/es/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/es/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
- /package/es/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/lib/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/lib/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
- /package/lib/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
package/es/table/src/header.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, ref, inject, nextTick, watch, onMounted, onUnmounted } from "vue";
|
|
2
2
|
import { defineVxeComponent } from "../../ui/src/comp";
|
|
3
3
|
import XEUtils from "xe-utils";
|
|
4
|
-
import { VxeUI } from "
|
|
4
|
+
import { VxeUI } from "@vxe-ui/core";
|
|
5
5
|
import { getDefaultConfig, hasEnableConf, isEnableConf } from "../../ui/src/utils";
|
|
6
6
|
import { getCalcHeight, convertHeaderColumnToRows, convertHeaderToGridRows } from "./util";
|
|
7
7
|
import { getSlotVNs } from "../../ui/src/vn";
|
|
@@ -185,60 +185,75 @@ var header_default = defineVxeComponent({
|
|
|
185
185
|
});
|
|
186
186
|
tcStyle.width = `${childWidth}px`;
|
|
187
187
|
}
|
|
188
|
-
return h(
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
{
|
|
194
|
-
[`col--${headAlign}`]: headAlign,
|
|
195
|
-
[`col--${type}`]: type,
|
|
196
|
-
"col--last": isLastColumn,
|
|
197
|
-
"col--fixed": column.fixed,
|
|
198
|
-
"col--group": isColGroup,
|
|
199
|
-
"col--ellipsis": hasEllipsis,
|
|
200
|
-
"fixed--width": !isAutoCellWidth,
|
|
201
|
-
"is--pg-top": isCellPaddingTop,
|
|
202
|
-
"is--pg-bottom": isCellPaddingBottom,
|
|
203
|
-
"is--pg-left": isCellPaddingLeft,
|
|
204
|
-
"is--pg-right": isCellPaddingRight,
|
|
205
|
-
"is--sortable": column.sortable,
|
|
206
|
-
"col--filter": !!filters,
|
|
207
|
-
"is--filter-active": hasFilter,
|
|
208
|
-
"is--drag-active": columnOpts.drag && !column.fixed && !isDisabledDrag && (isCrossDrag || isPeerDrag || !column.parentId),
|
|
209
|
-
"is--drag-disabled": columnOpts.drag && isDisabledDrag,
|
|
210
|
-
"col--current": currColFlag && currentCol === column
|
|
211
|
-
},
|
|
212
|
-
headerClassName ? XEUtils.isFunction(headerClassName) ? headerClassName(cellParams) : headerClassName : "",
|
|
213
|
-
headerCellClassName ? XEUtils.isFunction(headerCellClassName) ? headerCellClassName(cellParams) : headerCellClassName : ""
|
|
214
|
-
],
|
|
215
|
-
style: headerCellStyle ? XEUtils.isFunction(headerCellStyle) ? headerCellStyle(cellParams) : headerCellStyle : null,
|
|
216
|
-
...thAttrs,
|
|
217
|
-
...thOns,
|
|
218
|
-
key: showCustomHeader ? `${colid}${$columnIndex}` : columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag || isColGroup ? colid : $columnIndex
|
|
219
|
-
}, [
|
|
220
|
-
h("div", {
|
|
221
|
-
class: ["vxe-cell", {
|
|
222
|
-
"c--title": showTitle,
|
|
223
|
-
"c--tooltip": showTooltip,
|
|
224
|
-
"c--ellipsis": showEllipsis
|
|
225
|
-
}],
|
|
226
|
-
style: tcStyle
|
|
227
|
-
}, isVNPreEmptyStatus || isOptimizeMode && fixedHiddenColumn ? [] : [
|
|
228
|
-
h("div", {
|
|
188
|
+
return h(
|
|
189
|
+
"th",
|
|
190
|
+
{
|
|
191
|
+
class: [
|
|
192
|
+
"vxe-table--column vxe-header--column",
|
|
229
193
|
colid,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
194
|
+
fixedHiddenColumn ? "fixed--hidden" : "fixed--visible",
|
|
195
|
+
{
|
|
196
|
+
[`col--${headAlign}`]: headAlign,
|
|
197
|
+
[`col--${type}`]: type,
|
|
198
|
+
"col--last": isLastColumn,
|
|
199
|
+
"col--fixed": column.fixed,
|
|
200
|
+
"col--group": isColGroup,
|
|
201
|
+
"col--ellipsis": hasEllipsis,
|
|
202
|
+
"fixed--width": !isAutoCellWidth,
|
|
203
|
+
"is--pg-top": isCellPaddingTop,
|
|
204
|
+
"is--pg-bottom": isCellPaddingBottom,
|
|
205
|
+
"is--pg-left": isCellPaddingLeft,
|
|
206
|
+
"is--pg-right": isCellPaddingRight,
|
|
207
|
+
"is--sortable": column.sortable,
|
|
208
|
+
"col--filter": !!filters,
|
|
209
|
+
"is--filter-active": hasFilter,
|
|
210
|
+
"is--drag-active": columnOpts.drag && !column.fixed && !isDisabledDrag && (isCrossDrag || isPeerDrag || !column.parentId),
|
|
211
|
+
"is--drag-disabled": columnOpts.drag && isDisabledDrag,
|
|
212
|
+
"col--current": currColFlag && currentCol === column
|
|
213
|
+
},
|
|
214
|
+
headerClassName ? XEUtils.isFunction(headerClassName) ? headerClassName(cellParams) : headerClassName : "",
|
|
215
|
+
headerCellClassName ? XEUtils.isFunction(headerCellClassName) ? headerCellClassName(cellParams) : headerCellClassName : ""
|
|
216
|
+
],
|
|
217
|
+
style: headerCellStyle ? XEUtils.isFunction(headerCellStyle) ? headerCellStyle(cellParams) : headerCellStyle : null,
|
|
218
|
+
...thAttrs,
|
|
219
|
+
...thOns,
|
|
220
|
+
key: showCustomHeader ? `${colid}${$columnIndex}` : columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag || isColGroup ? colid : $columnIndex
|
|
221
|
+
},
|
|
222
|
+
[
|
|
223
|
+
h(
|
|
224
|
+
"div",
|
|
225
|
+
{
|
|
226
|
+
class: [
|
|
227
|
+
"vxe-cell",
|
|
228
|
+
{
|
|
229
|
+
"c--title": showTitle,
|
|
230
|
+
"c--tooltip": showTooltip,
|
|
231
|
+
"c--ellipsis": showEllipsis
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
style: tcStyle
|
|
235
|
+
},
|
|
236
|
+
isVNPreEmptyStatus || isOptimizeMode && fixedHiddenColumn ? [] : [
|
|
237
|
+
h(
|
|
238
|
+
"div",
|
|
239
|
+
{
|
|
240
|
+
colid,
|
|
241
|
+
class: "vxe-cell--wrapper vxe-header-cell--wrapper"
|
|
242
|
+
},
|
|
243
|
+
column.renderHeader(cellParams)
|
|
244
|
+
)
|
|
245
|
+
]
|
|
246
|
+
),
|
|
247
|
+
/**
|
|
248
|
+
* 列宽拖动
|
|
249
|
+
*/
|
|
250
|
+
!fixedHiddenColumn && showResizable && (!showCustomHeader || isLastRow) ? h("div", {
|
|
251
|
+
class: "vxe-cell--col-resizable",
|
|
252
|
+
onMousedown: (evnt) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
|
|
253
|
+
onDblclick: (evnt) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
|
|
254
|
+
}) : renderEmptyElement($xeTable)
|
|
255
|
+
]
|
|
256
|
+
);
|
|
242
257
|
});
|
|
243
258
|
};
|
|
244
259
|
const renderFilterRows = (isOptimizeMode, cols) => {
|
|
@@ -307,40 +322,56 @@ var header_default = defineVxeComponent({
|
|
|
307
322
|
} else {
|
|
308
323
|
tcStyle.minHeight = `${currCellHeight}px`;
|
|
309
324
|
}
|
|
310
|
-
return h(
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
{
|
|
316
|
-
[`col--${headAlign}`]: headAlign,
|
|
317
|
-
[`col--${type}`]: type,
|
|
318
|
-
"col--last": isLastColumn,
|
|
319
|
-
"col--fixed": column.fixed,
|
|
320
|
-
"col--ellipsis": hasEllipsis,
|
|
321
|
-
"fixed--width": !isAutoCellWidth,
|
|
322
|
-
"is--padding": isPadding,
|
|
323
|
-
"is--sortable": column.sortable,
|
|
324
|
-
"col--current": currColFlag && currentCol === column
|
|
325
|
-
}
|
|
326
|
-
],
|
|
327
|
-
key: colid,
|
|
328
|
-
...thAttrs
|
|
329
|
-
}, [
|
|
330
|
-
h("div", {
|
|
331
|
-
class: ["vxe-cell", "" + (cellClassName || ""), {
|
|
332
|
-
"c--title": showTitle,
|
|
333
|
-
"c--tooltip": showTooltip,
|
|
334
|
-
"c--ellipsis": showEllipsis
|
|
335
|
-
}],
|
|
336
|
-
style: tcStyle
|
|
337
|
-
}, isOptimizeMode && fixedHiddenColumn && !floatingFilters ? [] : [
|
|
338
|
-
h("div", {
|
|
325
|
+
return h(
|
|
326
|
+
"th",
|
|
327
|
+
{
|
|
328
|
+
class: [
|
|
329
|
+
"vxe-table--column vxe-header--column is--floating-filters",
|
|
339
330
|
colid,
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
331
|
+
fixedHiddenColumn ? "fixed--hidden" : "fixed--visible",
|
|
332
|
+
{
|
|
333
|
+
[`col--${headAlign}`]: headAlign,
|
|
334
|
+
[`col--${type}`]: type,
|
|
335
|
+
"col--last": isLastColumn,
|
|
336
|
+
"col--fixed": column.fixed,
|
|
337
|
+
"col--ellipsis": hasEllipsis,
|
|
338
|
+
"fixed--width": !isAutoCellWidth,
|
|
339
|
+
"is--padding": isPadding,
|
|
340
|
+
"is--sortable": column.sortable,
|
|
341
|
+
"col--current": currColFlag && currentCol === column
|
|
342
|
+
}
|
|
343
|
+
],
|
|
344
|
+
key: colid,
|
|
345
|
+
...thAttrs
|
|
346
|
+
},
|
|
347
|
+
[
|
|
348
|
+
h(
|
|
349
|
+
"div",
|
|
350
|
+
{
|
|
351
|
+
class: [
|
|
352
|
+
"vxe-cell",
|
|
353
|
+
"" + (cellClassName || ""),
|
|
354
|
+
{
|
|
355
|
+
"c--title": showTitle,
|
|
356
|
+
"c--tooltip": showTooltip,
|
|
357
|
+
"c--ellipsis": showEllipsis
|
|
358
|
+
}
|
|
359
|
+
],
|
|
360
|
+
style: tcStyle
|
|
361
|
+
},
|
|
362
|
+
isOptimizeMode && fixedHiddenColumn && !floatingFilters ? [] : [
|
|
363
|
+
h(
|
|
364
|
+
"div",
|
|
365
|
+
{
|
|
366
|
+
colid,
|
|
367
|
+
class: "vxe-cell--wrapper vxe-header-cell--wrapper"
|
|
368
|
+
},
|
|
369
|
+
flSlot ? $xeTable.callSlot(flSlot, cellParams) : rtFloatingFilter && firstFilterOption ? getSlotVNs(rtFloatingFilter(filterRender, cellParams)) : []
|
|
370
|
+
)
|
|
371
|
+
]
|
|
372
|
+
)
|
|
373
|
+
]
|
|
374
|
+
);
|
|
344
375
|
});
|
|
345
376
|
};
|
|
346
377
|
const renderHeads = (isGroup, isOptimizeMode, headerGroups, renderColumnList) => {
|
|
@@ -349,24 +380,26 @@ var header_default = defineVxeComponent({
|
|
|
349
380
|
const floatingFilterOpts = computeFloatingFilterOpts.value;
|
|
350
381
|
const rowVNs = headerGroups.map((cols, _rowIndex) => {
|
|
351
382
|
const params = { $table: $xeTable, rowIndex: _rowIndex, _rowIndex, $rowIndex: _rowIndex, fixed: fixedType, type: renderType };
|
|
352
|
-
return h(
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
headerRowClassName ? XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName : ""
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
383
|
+
return h(
|
|
384
|
+
"tr",
|
|
385
|
+
{
|
|
386
|
+
key: _rowIndex,
|
|
387
|
+
class: ["vxe-header--row", headerRowClassName ? XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName : ""],
|
|
388
|
+
style: headerRowStyle ? XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle : null
|
|
389
|
+
},
|
|
390
|
+
renderRows(isGroup, isOptimizeMode, headerGroups, _rowIndex, cols)
|
|
391
|
+
);
|
|
360
392
|
});
|
|
361
393
|
if (floatingFilterOpts.enabled) {
|
|
362
394
|
rowVNs.push(
|
|
363
|
-
h(
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
"" + (floatingFilterOpts.rowClassName || "")
|
|
368
|
-
|
|
369
|
-
|
|
395
|
+
h(
|
|
396
|
+
"tr",
|
|
397
|
+
{
|
|
398
|
+
key: "ff",
|
|
399
|
+
class: ["vxe-header--row is--floating-filters", "" + (floatingFilterOpts.rowClassName || "")]
|
|
400
|
+
},
|
|
401
|
+
renderFilterRows(isOptimizeMode, renderColumnList)
|
|
402
|
+
)
|
|
370
403
|
);
|
|
371
404
|
}
|
|
372
405
|
return rowVNs;
|
|
@@ -419,77 +452,101 @@ var header_default = defineVxeComponent({
|
|
|
419
452
|
}
|
|
420
453
|
}
|
|
421
454
|
}
|
|
422
|
-
return h(
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
455
|
+
return h(
|
|
456
|
+
"div",
|
|
457
|
+
{
|
|
458
|
+
ref: refElem,
|
|
459
|
+
class: ["vxe-table--header-wrapper", fixedType ? `fixed-${fixedType}--wrapper` : "body--wrapper"],
|
|
460
|
+
xid: xID
|
|
461
|
+
},
|
|
462
|
+
[
|
|
463
|
+
h(
|
|
464
|
+
"div",
|
|
465
|
+
{
|
|
466
|
+
ref: refHeaderScroll,
|
|
467
|
+
class: "vxe-table--header-inner-wrapper",
|
|
468
|
+
onScroll(evnt) {
|
|
469
|
+
$xeTable.triggerHeaderScrollEvent(evnt, fixedType);
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
[
|
|
473
|
+
fixedType ? renderEmptyElement($xeTable) : h("div", {
|
|
474
|
+
ref: refHeaderXSpace,
|
|
475
|
+
class: "vxe-body--x-space"
|
|
476
|
+
}),
|
|
477
|
+
h(
|
|
478
|
+
"table",
|
|
479
|
+
{
|
|
480
|
+
ref: refHeaderTable,
|
|
481
|
+
class: "vxe-table--header",
|
|
482
|
+
xid: xID,
|
|
483
|
+
cellspacing: 0,
|
|
484
|
+
cellpadding: 0,
|
|
485
|
+
border: 0,
|
|
486
|
+
xvm: isOptimizeMode ? "1" : null
|
|
487
|
+
},
|
|
488
|
+
[
|
|
489
|
+
/**
|
|
490
|
+
* 列宽
|
|
491
|
+
*/
|
|
492
|
+
h(
|
|
493
|
+
"colgroup",
|
|
494
|
+
{
|
|
495
|
+
ref: refHeaderColgroup
|
|
496
|
+
},
|
|
497
|
+
renderColumnList.map((column, $columnIndex) => {
|
|
498
|
+
return h("col", {
|
|
499
|
+
name: column.id,
|
|
500
|
+
key: $columnIndex,
|
|
501
|
+
style: {
|
|
502
|
+
width: `${column.renderWidth}px`
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
})
|
|
506
|
+
),
|
|
507
|
+
/**
|
|
508
|
+
* 头部
|
|
509
|
+
*/
|
|
510
|
+
h(
|
|
511
|
+
"thead",
|
|
512
|
+
{
|
|
513
|
+
ref: refHeaderTHead
|
|
514
|
+
},
|
|
515
|
+
renderHeads(isGroup, isOptimizeMode, renderHeaderList, renderColumnList)
|
|
516
|
+
)
|
|
517
|
+
]
|
|
518
|
+
),
|
|
519
|
+
hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area ? h(
|
|
520
|
+
"div",
|
|
521
|
+
{
|
|
522
|
+
class: "vxe-table--cell-area",
|
|
523
|
+
xid: xID
|
|
524
|
+
},
|
|
525
|
+
[
|
|
526
|
+
h("span", {
|
|
527
|
+
class: "vxe-table--cell-main-area"
|
|
528
|
+
}),
|
|
529
|
+
h("span", {
|
|
530
|
+
class: "vxe-table--cell-clip-area"
|
|
531
|
+
}),
|
|
532
|
+
h("span", {
|
|
533
|
+
class: "vxe-table--cell-extend-area"
|
|
534
|
+
}),
|
|
535
|
+
h("span", {
|
|
536
|
+
class: "vxe-table--cell-multi-area"
|
|
537
|
+
}),
|
|
538
|
+
h("span", {
|
|
539
|
+
class: "vxe-table--cell-active-area"
|
|
540
|
+
}),
|
|
541
|
+
h("span", {
|
|
542
|
+
class: "vxe-table--cell-col-status-area"
|
|
543
|
+
})
|
|
544
|
+
]
|
|
545
|
+
) : renderEmptyElement($xeTable)
|
|
546
|
+
]
|
|
547
|
+
)
|
|
548
|
+
]
|
|
549
|
+
);
|
|
493
550
|
};
|
|
494
551
|
watch(() => props.tableColumn, uploadColumn);
|
|
495
552
|
onMounted(() => {
|
package/es/table/src/props.js
CHANGED