vxe-table 4.14.0-beta.0 → 4.14.0-beta.2
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/README.en.md +2 -1
- package/README.ja-JP.md +2 -1
- package/README.md +4 -2
- package/README.zh-TW.md +2 -1
- package/es/grid/src/grid.js +127 -94
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +0 -4
- package/es/table/module/custom/panel.js +0 -1
- package/es/table/module/keyboard/hook.js +2 -2
- package/es/table/src/anime.js +46 -0
- package/es/table/src/body.js +9 -24
- package/es/table/src/columnInfo.js +5 -0
- package/es/table/src/footer.js +5 -22
- package/es/table/src/header.js +4 -21
- package/es/table/src/table.js +562 -358
- package/es/table/src/util.js +1 -1
- package/es/table/style.css +8 -8
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +3 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +8 -8
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +143 -98
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +255 -208
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +0 -4
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +0 -1
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/keyboard/hook.js +2 -2
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/src/anime.js +56 -0
- package/lib/table/src/anime.min.js +1 -0
- package/lib/table/src/body.js +3 -26
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/columnInfo.js +5 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +2 -20
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +2 -19
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +47 -34
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +2 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +8 -8
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +3 -2
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +8 -8
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +136 -101
- package/packages/table/module/custom/hook.ts +0 -4
- package/packages/table/module/custom/panel.ts +0 -1
- package/packages/table/module/keyboard/hook.ts +2 -2
- package/packages/table/src/anime.ts +52 -0
- package/packages/table/src/body.ts +15 -38
- package/packages/table/src/columnInfo.ts +5 -0
- package/packages/table/src/footer.ts +5 -22
- package/packages/table/src/header.ts +4 -21
- package/packages/table/src/table.ts +570 -361
- package/packages/table/src/util.ts +1 -1
- package/packages/ui/index.ts +2 -1
- package/styles/components/table.scss +9 -9
- /package/es/{iconfont.1750770364548.ttf → iconfont.1751195167653.ttf} +0 -0
- /package/es/{iconfont.1750770364548.woff → iconfont.1751195167653.woff} +0 -0
- /package/es/{iconfont.1750770364548.woff2 → iconfont.1751195167653.woff2} +0 -0
- /package/lib/{iconfont.1750770364548.ttf → iconfont.1751195167653.ttf} +0 -0
- /package/lib/{iconfont.1750770364548.woff → iconfont.1751195167653.woff} +0 -0
- /package/lib/{iconfont.1750770364548.woff2 → iconfont.1751195167653.woff2} +0 -0
|
@@ -272,8 +272,8 @@ hooks.add('tableKeyboardModule', {
|
|
|
272
272
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
273
273
|
const mouseOpts = computeMouseOpts.value;
|
|
274
274
|
const editOpts = computeEditOpts.value;
|
|
275
|
-
if (mouseConfig && mouseOpts.area && $xeTable.
|
|
276
|
-
return $xeTable.
|
|
275
|
+
if (mouseConfig && mouseOpts.area && $xeTable.triggerCellAreaMousednEvent) {
|
|
276
|
+
return $xeTable.triggerCellAreaMousednEvent(evnt, params);
|
|
277
277
|
}
|
|
278
278
|
else {
|
|
279
279
|
if (checkboxConfig && checkboxOpts.range) {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import XEUtils from 'xe-utils';
|
|
2
|
+
import { addClass, removeClass } from '../../ui/src/dom';
|
|
3
|
+
const rowMoveCls = 'row--drag-move';
|
|
4
|
+
const colMoveClass = 'col--drag-move';
|
|
5
|
+
/**
|
|
6
|
+
* 上下拖拽
|
|
7
|
+
*/
|
|
8
|
+
export function moveRowAnimateToTb(elemList, offsetTop) {
|
|
9
|
+
XEUtils.arrayEach(elemList, trEl => {
|
|
10
|
+
trEl.style.transform = `translateY(${offsetTop}px)`;
|
|
11
|
+
});
|
|
12
|
+
requestAnimationFrame(() => {
|
|
13
|
+
XEUtils.arrayEach(elemList, trEl => {
|
|
14
|
+
addClass(trEl, rowMoveCls);
|
|
15
|
+
trEl.style.transform = '';
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export function clearRowAnimate(elem) {
|
|
20
|
+
setTimeout(() => {
|
|
21
|
+
if (elem) {
|
|
22
|
+
XEUtils.arrayEach(elem.querySelectorAll(`.vxe-body--row.${rowMoveCls}`), elem => removeClass(elem, rowMoveCls));
|
|
23
|
+
}
|
|
24
|
+
}, 500);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 左右拖拽
|
|
28
|
+
*/
|
|
29
|
+
export function moveColAnimateToLr(elemList, offsetLeft) {
|
|
30
|
+
XEUtils.arrayEach(elemList, trEl => {
|
|
31
|
+
trEl.style.transform = `translateX(${offsetLeft}px)`;
|
|
32
|
+
});
|
|
33
|
+
requestAnimationFrame(() => {
|
|
34
|
+
XEUtils.arrayEach(elemList, trEl => {
|
|
35
|
+
addClass(trEl, colMoveClass);
|
|
36
|
+
trEl.style.transform = '';
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export function clearColAnimate(elem) {
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
if (elem) {
|
|
43
|
+
XEUtils.arrayEach(elem.querySelectorAll(`.vxe-table--column.${colMoveClass}`), elem => removeClass(elem, colMoveClass));
|
|
44
|
+
}
|
|
45
|
+
}, 500);
|
|
46
|
+
}
|
package/es/table/src/body.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, ref, inject, nextTick, onMounted, onUnmounted } from 'vue';
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
4
|
import { VxeUI } from '../../ui';
|
|
@@ -22,7 +22,7 @@ export default defineVxeComponent({
|
|
|
22
22
|
setup(props) {
|
|
23
23
|
const $xeTable = inject('$xeTable', {});
|
|
24
24
|
const { xID, props: tableProps, context: tableContext, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
25
|
-
const { computeEditOpts, computeMouseOpts, computeCellOffsetWidth, computeAreaOpts, computeDefaultRowHeight, computeEmptyOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts,
|
|
25
|
+
const { computeEditOpts, computeMouseOpts, computeCellOffsetWidth, computeAreaOpts, computeDefaultRowHeight, computeEmptyOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts, computeResizableOpts, computeVirtualXOpts, computeVirtualYOpts } = $xeTable.getComputeMaps();
|
|
26
26
|
const refElem = ref();
|
|
27
27
|
const refBodyScroll = ref();
|
|
28
28
|
const refBodyTable = ref();
|
|
@@ -389,7 +389,7 @@ export default defineVxeComponent({
|
|
|
389
389
|
}));
|
|
390
390
|
}
|
|
391
391
|
return h('td', Object.assign(Object.assign(Object.assign({ class: [
|
|
392
|
-
'vxe-body--column',
|
|
392
|
+
'vxe-table--column vxe-body--column',
|
|
393
393
|
colid,
|
|
394
394
|
cellVerticalAlign ? `col--vertical-${cellVerticalAlign}` : '',
|
|
395
395
|
cellAlign ? `col--${cellAlign}` : '',
|
|
@@ -422,7 +422,7 @@ export default defineVxeComponent({
|
|
|
422
422
|
const renderRows = (fixedType, isOptimizeMode, tableData, tableColumn) => {
|
|
423
423
|
const $xeGrid = $xeTable.xeGrid;
|
|
424
424
|
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps;
|
|
425
|
-
const { hasFixedColumn, treeExpandedFlag,
|
|
425
|
+
const { hasFixedColumn, treeExpandedFlag, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData;
|
|
426
426
|
const { fullAllDataRowIdData, fullColumnIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps } = tableInternalData;
|
|
427
427
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
428
428
|
const radioOpts = computeRadioOpts.value;
|
|
@@ -430,7 +430,6 @@ export default defineVxeComponent({
|
|
|
430
430
|
const editOpts = computeEditOpts.value;
|
|
431
431
|
const rowOpts = computeRowOpts.value;
|
|
432
432
|
const columnOpts = computeColumnOpts.value;
|
|
433
|
-
const columnDragOpts = computeColumnDragOpts.value;
|
|
434
433
|
const { transform, seqMode } = treeOpts;
|
|
435
434
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
436
435
|
const rows = [];
|
|
@@ -510,11 +509,7 @@ export default defineVxeComponent({
|
|
|
510
509
|
const tdVNs = tableColumn.map((column, $columnIndex) => {
|
|
511
510
|
return renderTdColumn(seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
|
|
512
511
|
});
|
|
513
|
-
rows.push(
|
|
514
|
-
? h(TransitionGroup, Object.assign({ name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`, tag: 'tr', class: trClass, rowid: rowid, style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null, key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex }, trOn), {
|
|
515
|
-
default: () => tdVNs
|
|
516
|
-
})
|
|
517
|
-
: h('tr', Object.assign({ class: trClass, rowid: rowid, style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null, key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex }, trOn), tdVNs));
|
|
512
|
+
rows.push(h('tr', Object.assign({ class: trClass, rowid: rowid, style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null, key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex }, trOn), tdVNs));
|
|
518
513
|
// 如果行被展开了
|
|
519
514
|
if (isExpandRow) {
|
|
520
515
|
const expandOpts = computeExpandOpts.value;
|
|
@@ -641,12 +636,10 @@ export default defineVxeComponent({
|
|
|
641
636
|
const $xeGrid = $xeTable.xeGrid;
|
|
642
637
|
const { fixedColumn, fixedType, tableColumn } = props;
|
|
643
638
|
const { spanMethod, footerSpanMethod, mouseConfig } = tableProps;
|
|
644
|
-
const { isGroup, tableData,
|
|
639
|
+
const { isGroup, tableData, isColLoading, overflowX, scrollXLoad, scrollYLoad, isAllOverflow, expandColumn, dragRow, dragCol } = tableReactData;
|
|
645
640
|
const { visibleColumn, fullAllDataRowIdData, fullColumnIdData } = tableInternalData;
|
|
646
|
-
const rowOpts = computeRowOpts.value;
|
|
647
641
|
const emptyOpts = computeEmptyOpts.value;
|
|
648
642
|
const mouseOpts = computeMouseOpts.value;
|
|
649
|
-
const rowDragOpts = computeRowDragOpts.value;
|
|
650
643
|
const expandOpts = computeExpandOpts.value;
|
|
651
644
|
let renderDataList = tableData;
|
|
652
645
|
let renderColumnList = tableColumn;
|
|
@@ -779,17 +772,9 @@ export default defineVxeComponent({
|
|
|
779
772
|
/**
|
|
780
773
|
* 内容
|
|
781
774
|
*/
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
name: `vxe-body--row-list${isDragRowMove ? '' : '-disabled'}`,
|
|
786
|
-
tag: 'tbody'
|
|
787
|
-
}, {
|
|
788
|
-
default: () => renderRows(fixedType, isOptimizeMode, renderDataList, renderColumnList)
|
|
789
|
-
})
|
|
790
|
-
: h('tbody', {
|
|
791
|
-
ref: refBodyTBody
|
|
792
|
-
}, renderRows(fixedType, isOptimizeMode, renderDataList, renderColumnList))
|
|
775
|
+
h('tbody', {
|
|
776
|
+
ref: refBodyTBody
|
|
777
|
+
}, renderRows(fixedType, isOptimizeMode, renderDataList, renderColumnList))
|
|
793
778
|
]),
|
|
794
779
|
h('div', {
|
|
795
780
|
class: 'vxe-table--checkbox-range'
|
|
@@ -43,6 +43,11 @@ export class ColumnInfo {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
+
if (_vm.aggFunc) {
|
|
47
|
+
if (!$xeTable.handlePivotTableAggregateData && _vm.aggFunc !== true) {
|
|
48
|
+
errLog('vxe.error.errProp', [`column.agg-func=${_vm.aggFunc}`, 'column.agg-func=true']);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
46
51
|
Object.assign(this, {
|
|
47
52
|
// 基本属性
|
|
48
53
|
type: _vm.type,
|
package/es/table/src/footer.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, ref, inject, nextTick, onMounted, onUnmounted } from 'vue';
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
4
|
import { VxeUI } from '../../ui';
|
|
5
5
|
import { updateCellTitle, getPropClass } from '../../ui/src/dom';
|
|
6
|
-
import {
|
|
6
|
+
import { getCalcHeight } from './util';
|
|
7
7
|
const { renderer, renderEmptyElement } = VxeUI;
|
|
8
8
|
const renderType = 'footer';
|
|
9
9
|
export default defineVxeComponent({
|
|
@@ -29,7 +29,7 @@ export default defineVxeComponent({
|
|
|
29
29
|
setup(props) {
|
|
30
30
|
const $xeTable = inject('$xeTable', {});
|
|
31
31
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
32
|
-
const { computeTooltipOpts, computeColumnOpts,
|
|
32
|
+
const { computeTooltipOpts, computeColumnOpts, computeCellOpts, computeFooterCellOpts, computeDefaultRowHeight, computeResizableOpts, computeVirtualXOpts } = $xeTable.getComputeMaps();
|
|
33
33
|
const refElem = ref();
|
|
34
34
|
const refFooterScroll = ref();
|
|
35
35
|
const refFooterTable = ref();
|
|
@@ -50,7 +50,7 @@ export default defineVxeComponent({
|
|
|
50
50
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
51
51
|
const cellOpts = computeCellOpts.value;
|
|
52
52
|
const footerCellOpts = computeFooterCellOpts.value;
|
|
53
|
-
const currCellHeight =
|
|
53
|
+
const currCellHeight = getCalcHeight(footerCellOpts.height) || defaultRowHeight;
|
|
54
54
|
return tableColumn.map((column, $columnIndex) => {
|
|
55
55
|
const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column;
|
|
56
56
|
const colid = column.id;
|
|
@@ -160,7 +160,7 @@ export default defineVxeComponent({
|
|
|
160
160
|
else {
|
|
161
161
|
tcStyle.minHeight = `${currCellHeight}px`;
|
|
162
162
|
}
|
|
163
|
-
return h('td', Object.assign(Object.assign(Object.assign(Object.assign({ class: ['vxe-footer--column', column.id, {
|
|
163
|
+
return h('td', Object.assign(Object.assign(Object.assign(Object.assign({ class: ['vxe-table--column vxe-footer--column', column.id, {
|
|
164
164
|
[`col--${footAlign}`]: footAlign,
|
|
165
165
|
[`col--${type}`]: type,
|
|
166
166
|
'col--last': isLastColumn,
|
|
@@ -203,26 +203,9 @@ export default defineVxeComponent({
|
|
|
203
203
|
const renderHeads = (isOptimizeMode, renderColumnList) => {
|
|
204
204
|
const { fixedType, footerTableData } = props;
|
|
205
205
|
const { footerRowClassName, footerRowStyle } = tableProps;
|
|
206
|
-
const { isColLoading, isDragColMove } = tableReactData;
|
|
207
|
-
const columnOpts = computeColumnOpts.value;
|
|
208
|
-
const columnDragOpts = computeColumnDragOpts.value;
|
|
209
206
|
return footerTableData.map((row, $rowIndex) => {
|
|
210
207
|
const _rowIndex = $rowIndex;
|
|
211
208
|
const rowParams = { $table: $xeTable, row, _rowIndex, $rowIndex, fixed: fixedType, type: renderType };
|
|
212
|
-
if (!isColLoading && columnOpts.drag && columnDragOpts.animation) {
|
|
213
|
-
return h(TransitionGroup, {
|
|
214
|
-
key: $rowIndex,
|
|
215
|
-
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
|
|
216
|
-
tag: 'tr',
|
|
217
|
-
class: [
|
|
218
|
-
'vxe-footer--row',
|
|
219
|
-
footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''
|
|
220
|
-
],
|
|
221
|
-
style: footerRowStyle ? (XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle) : null
|
|
222
|
-
}, {
|
|
223
|
-
default: () => renderRows(isOptimizeMode, renderColumnList, footerTableData, row, $rowIndex, _rowIndex)
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
209
|
return h('tr', {
|
|
227
210
|
key: $rowIndex,
|
|
228
211
|
class: [
|
package/es/table/src/header.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
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
4
|
import { VxeUI } from '../../ui';
|
|
5
|
-
import {
|
|
5
|
+
import { getCalcHeight, convertHeaderColumnToRows } from './util';
|
|
6
6
|
const { renderer, renderEmptyElement } = VxeUI;
|
|
7
7
|
const renderType = 'header';
|
|
8
8
|
export default defineVxeComponent({
|
|
@@ -45,7 +45,7 @@ export default defineVxeComponent({
|
|
|
45
45
|
const cellOpts = computeCellOpts.value;
|
|
46
46
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
47
47
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
48
|
-
const currCellHeight =
|
|
48
|
+
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
49
49
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
50
50
|
return cols.map((column, $columnIndex) => {
|
|
51
51
|
const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column;
|
|
@@ -129,7 +129,7 @@ export default defineVxeComponent({
|
|
|
129
129
|
else {
|
|
130
130
|
tcStyle.minHeight = `${currCellHeight}px`;
|
|
131
131
|
}
|
|
132
|
-
return h('th', Object.assign(Object.assign(Object.assign({ class: ['vxe-header--column', colid, {
|
|
132
|
+
return h('th', Object.assign(Object.assign(Object.assign({ class: ['vxe-table--column vxe-header--column', colid, {
|
|
133
133
|
[`col--${headAlign}`]: headAlign,
|
|
134
134
|
[`col--${type}`]: type,
|
|
135
135
|
'col--last': isLastColumn,
|
|
@@ -180,25 +180,8 @@ export default defineVxeComponent({
|
|
|
180
180
|
const renderHeads = (isGroup, isOptimizeMode, headerGroups) => {
|
|
181
181
|
const { fixedType } = props;
|
|
182
182
|
const { headerRowClassName, headerRowStyle } = tableProps;
|
|
183
|
-
const { isColLoading, isDragColMove } = tableReactData;
|
|
184
|
-
const columnOpts = computeColumnOpts.value;
|
|
185
|
-
const columnDragOpts = computeColumnDragOpts.value;
|
|
186
183
|
return headerGroups.map((cols, $rowIndex) => {
|
|
187
184
|
const params = { $table: $xeTable, $rowIndex, fixed: fixedType, type: renderType };
|
|
188
|
-
if (!isColLoading && columnOpts.drag && columnDragOpts.animation) {
|
|
189
|
-
return h(TransitionGroup, {
|
|
190
|
-
key: $rowIndex,
|
|
191
|
-
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
|
|
192
|
-
tag: 'tr',
|
|
193
|
-
class: [
|
|
194
|
-
'vxe-header--row',
|
|
195
|
-
headerRowClassName ? (XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName) : ''
|
|
196
|
-
],
|
|
197
|
-
style: headerRowStyle ? (XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle) : null
|
|
198
|
-
}, {
|
|
199
|
-
default: () => renderRows(isGroup, isOptimizeMode, cols, $rowIndex)
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
185
|
return h('tr', {
|
|
203
186
|
key: $rowIndex,
|
|
204
187
|
class: [
|