vxe-table 3.9.21 → 3.10.0-beta.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/es/locale/lang/ja-JP.js +5 -5
- package/es/locale/lang/ko-KR.js +5 -5
- package/es/locale/lang/uk-UA.js +5 -5
- package/es/locale/lang/vi-VN.js +5 -5
- package/es/locale/lang/zh-CHT.js +5 -5
- package/es/locale/lang/zh-CN.js +5 -5
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/edit/mixin.js +3 -3
- package/es/table/src/body.js +50 -115
- package/es/table/src/footer.js +24 -21
- package/es/table/src/methods.js +392 -123
- package/es/table/src/table.js +68 -10
- package/es/table/src/util.js +58 -33
- package/es/table/style.css +46 -3
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +46 -3
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.umd.js +672 -361
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +5 -5
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +5 -5
- package/lib/locale/lang/ko-KR.js +5 -5
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +5 -5
- package/lib/locale/lang/uk-UA.js +5 -5
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +5 -5
- package/lib/locale/lang/vi-VN.js +5 -5
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +5 -5
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +5 -5
- package/lib/locale/lang/zh-CN.js +5 -5
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +5 -5
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/edit/mixin.js +6 -3
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/src/body.js +49 -118
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +24 -33
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/methods.js +449 -148
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +61 -13
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +72 -38
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +46 -3
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +2 -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 +46 -3
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ja-JP.ts +5 -5
- package/packages/locale/lang/ko-KR.ts +5 -5
- package/packages/locale/lang/uk-UA.ts +5 -5
- package/packages/locale/lang/vi-VN.ts +5 -5
- package/packages/locale/lang/zh-CHT.ts +5 -5
- package/packages/locale/lang/zh-CN.ts +5 -5
- package/packages/table/module/edit/mixin.ts +3 -3
- package/packages/table/src/body.ts +50 -118
- package/packages/table/src/footer.ts +24 -22
- package/packages/table/src/methods.ts +418 -127
- package/packages/table/src/props.ts +8 -8
- package/packages/table/src/table.ts +70 -10
- package/packages/table/src/util.ts +61 -36
- package/packages/ui/index.ts +1 -1
- package/styles/components/table-module/filter.scss +1 -1
- package/styles/components/table.scss +45 -6
- package/styles/modules.scss +0 -2
- package/styles/theme/base.scss +1 -1
- package/styles/theme/dark.scss +7 -4
- package/styles/variable.scss +5 -1
- /package/es/{iconfont.1729992873866.ttf → iconfont.1730347297462.ttf} +0 -0
- /package/es/{iconfont.1729992873866.woff → iconfont.1730347297462.woff} +0 -0
- /package/es/{iconfont.1729992873866.woff2 → iconfont.1730347297462.woff2} +0 -0
- /package/lib/{iconfont.1729992873866.ttf → iconfont.1730347297462.ttf} +0 -0
- /package/lib/{iconfont.1729992873866.woff → iconfont.1730347297462.woff} +0 -0
- /package/lib/{iconfont.1729992873866.woff2 → iconfont.1730347297462.woff2} +0 -0
package/es/table/src/body.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { VxeUI } from '../../ui';
|
|
3
3
|
import { isEnableConf, getClass } from '../../ui/src/utils';
|
|
4
|
-
import { getOffsetSize, calcTreeLine, mergeBodyMethod,
|
|
5
|
-
import { updateCellTitle } from '../../ui/src/dom';
|
|
4
|
+
import { getOffsetSize, calcTreeLine, mergeBodyMethod, getRowid } from './util';
|
|
5
|
+
import { updateCellTitle, setScrollTop, setScrollLeft } from '../../ui/src/dom';
|
|
6
6
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
7
7
|
const { getI18n, renderer } = VxeUI;
|
|
8
8
|
const renderType = 'body';
|
|
@@ -49,7 +49,7 @@ function renderLine(h, _vm, $xetable, params) {
|
|
|
49
49
|
* 渲染列
|
|
50
50
|
*/
|
|
51
51
|
function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) {
|
|
52
|
-
const { $listeners: tableListeners, afterFullData, tableData, height, columnKey, overflowX, sYOpts,
|
|
52
|
+
const { $listeners: tableListeners, fullAllDataRowIdData, afterFullData, tableData, height, columnKey, overflowX, sYOpts, scrollYLoad, highlightCurrentRow, showOverflow: allColumnOverflow, isAllOverflow, align: allAlign, currentColumn, cellClassName: allCellClassName, cellStyle, mergeList, spanMethod, radioOpts, checkboxOpts, expandOpts, treeOpts, tooltipOpts, mouseConfig, editConfig, editOpts, editRules, validOpts, editStore, tooltipConfig, rowOpts, columnOpts, validErrorMaps } = $xetable;
|
|
53
53
|
const { type, cellRender, editRender, align, showOverflow, className, treeNode, slots } = column;
|
|
54
54
|
const { actived } = editStore;
|
|
55
55
|
const { rHeight: scrollYRHeight } = sYOpts;
|
|
@@ -64,12 +64,13 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
64
64
|
const isEdit = isEnableConf(editRender);
|
|
65
65
|
let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
|
|
66
66
|
const cellOverflow = (XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow)) ? allColumnOverflow : showOverflow;
|
|
67
|
-
|
|
67
|
+
const showEllipsis = cellOverflow === 'ellipsis';
|
|
68
68
|
const showTitle = cellOverflow === 'title';
|
|
69
69
|
const showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
|
|
70
|
-
|
|
70
|
+
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
71
71
|
let isDirty;
|
|
72
72
|
const tdOns = {};
|
|
73
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
73
74
|
const cellAlign = align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
74
75
|
const errorValidItem = validErrorMaps[`${rowid}:${column.id}`];
|
|
75
76
|
const showValidTip = editRules && validOpts.showMessage && (validOpts.message === 'default' ? (height || tableData.length > 1) : validOpts.message === 'inline');
|
|
@@ -78,10 +79,6 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
78
79
|
const bindMouseleave = tableListeners['cell-mouseleave'];
|
|
79
80
|
const triggerDblclick = (editRender && editConfig && editOpts.trigger === 'dblclick');
|
|
80
81
|
const params = { $table: $xetable, $grid: $xetable.$xegrid, isEdit: false, seq, rowid, row, rowIndex, $rowIndex, _rowIndex, column, columnIndex, $columnIndex, _columnIndex, fixed: fixedType, type: renderType, isHidden: fixedHiddenColumn, level: rowLevel, visibleData: afterFullData, data: tableData, items };
|
|
81
|
-
// 虚拟滚动不支持动态高度
|
|
82
|
-
if ((scrollXLoad || scrollYLoad) && !hasEllipsis) {
|
|
83
|
-
showEllipsis = hasEllipsis = true;
|
|
84
|
-
}
|
|
85
82
|
// hover 进入事件
|
|
86
83
|
if (showTitle || showTooltip || showAllTip || bindMouseenter || tooltipConfig) {
|
|
87
84
|
tdOns.mouseenter = (evnt) => {
|
|
@@ -250,7 +247,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
250
247
|
key: columnKey || columnOpts.useKey ? column.id : $columnIndex,
|
|
251
248
|
attrs,
|
|
252
249
|
style: Object.assign({
|
|
253
|
-
height: hasEllipsis && (scrollYRHeight || rowHeight) ? `${scrollYRHeight || rowHeight}px` : ''
|
|
250
|
+
height: hasEllipsis && (scrollYRHeight || rowHeight) ? `${scrollYRHeight || rowHeight}px` : (scrollYLoad ? `${rest.height || scrollYRHeight || rowHeight}px` : '')
|
|
254
251
|
}, XEUtils.isFunction(compCellStyle) ? compCellStyle(params) : compCellStyle, XEUtils.isFunction(cellStyle) ? cellStyle(params) : cellStyle),
|
|
255
252
|
on: tdOns
|
|
256
253
|
}, tdVNs);
|
|
@@ -374,45 +371,6 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
|
|
|
374
371
|
});
|
|
375
372
|
return rows;
|
|
376
373
|
}
|
|
377
|
-
/**
|
|
378
|
-
* 同步滚动条
|
|
379
|
-
*/
|
|
380
|
-
let scrollProcessTimeout;
|
|
381
|
-
function syncBodyScroll(_vm, fixedType, scrollTop, elem1, elem2) {
|
|
382
|
-
if (elem1 || elem2) {
|
|
383
|
-
if (elem1) {
|
|
384
|
-
removeScrollListener(elem1);
|
|
385
|
-
elem1.scrollTop = scrollTop;
|
|
386
|
-
}
|
|
387
|
-
if (elem2) {
|
|
388
|
-
removeScrollListener(elem2);
|
|
389
|
-
elem2.scrollTop = scrollTop;
|
|
390
|
-
}
|
|
391
|
-
clearTimeout(scrollProcessTimeout);
|
|
392
|
-
scrollProcessTimeout = setTimeout(() => {
|
|
393
|
-
// const { tableBody, leftBody, rightBody } = _vm.$refs
|
|
394
|
-
// const bodyElem = tableBody.$el
|
|
395
|
-
// const leftElem = leftBody ? leftBody.$el : null
|
|
396
|
-
// const rightElem = rightBody ? rightBody.$el : null
|
|
397
|
-
restoreScrollListener(elem1);
|
|
398
|
-
restoreScrollListener(elem2);
|
|
399
|
-
// 检查滚动条是的同步
|
|
400
|
-
// let targetTop = bodyElem.scrollTop
|
|
401
|
-
// if (fixedType === 'left') {
|
|
402
|
-
// if (leftElem) {
|
|
403
|
-
// targetTop = leftElem.scrollTop
|
|
404
|
-
// }
|
|
405
|
-
// } else if (fixedType === 'right') {
|
|
406
|
-
// if (rightElem) {
|
|
407
|
-
// targetTop = rightElem.scrollTop
|
|
408
|
-
// }
|
|
409
|
-
// }
|
|
410
|
-
// setScrollTop(bodyElem, targetTop)
|
|
411
|
-
// setScrollTop(leftElem, targetTop)
|
|
412
|
-
// setScrollTop(rightElem, targetTop)
|
|
413
|
-
}, 300);
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
374
|
export default {
|
|
417
375
|
name: 'VxeTableBody',
|
|
418
376
|
props: {
|
|
@@ -441,17 +399,9 @@ export default {
|
|
|
441
399
|
elemStore[`${prefix}xSpace`] = $refs.xSpace;
|
|
442
400
|
elemStore[`${prefix}ySpace`] = $refs.ySpace;
|
|
443
401
|
elemStore[`${prefix}emptyBlock`] = $refs.emptyBlock;
|
|
444
|
-
if (this.$el) {
|
|
445
|
-
this.$el.onscroll = this.scrollEvent;
|
|
446
|
-
this.$el._onscroll = this.scrollEvent;
|
|
447
|
-
}
|
|
448
402
|
},
|
|
449
403
|
beforeDestroy() {
|
|
450
404
|
clearTimeout(this.wheelTime);
|
|
451
|
-
if (this.$el) {
|
|
452
|
-
this.$el._onscroll = null;
|
|
453
|
-
this.$el.onscroll = null;
|
|
454
|
-
}
|
|
455
405
|
},
|
|
456
406
|
destroyed() {
|
|
457
407
|
const { $parent: $xetable, fixedType } = this;
|
|
@@ -510,11 +460,9 @@ export default {
|
|
|
510
460
|
attrs: {
|
|
511
461
|
xid: tId
|
|
512
462
|
},
|
|
513
|
-
on:
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
}
|
|
517
|
-
: {}
|
|
463
|
+
on: Object.assign({
|
|
464
|
+
scroll: this.scrollEvent
|
|
465
|
+
}, scrollYLoad && sYOpts.mode === 'wheel' ? { wheel: this.wheelEvent } : null)
|
|
518
466
|
}, [
|
|
519
467
|
fixedType
|
|
520
468
|
? _e()
|
|
@@ -610,73 +558,60 @@ export default {
|
|
|
610
558
|
* 如果存在列固定右侧,同步更新滚动状态
|
|
611
559
|
*/
|
|
612
560
|
scrollEvent(evnt) {
|
|
613
|
-
const { $el: scrollBodyElem, $parent: $
|
|
614
|
-
const { $refs,
|
|
615
|
-
const { tableHeader, tableBody, leftBody, rightBody, tableFooter
|
|
561
|
+
const { $el: scrollBodyElem, $parent: $xeTable, fixedType } = this;
|
|
562
|
+
const { $refs, lastScrollTop, lastScrollLeft } = $xeTable;
|
|
563
|
+
const { tableHeader, tableBody, leftBody, rightBody, tableFooter } = $refs;
|
|
616
564
|
const headerElem = tableHeader ? tableHeader.$el : null;
|
|
617
565
|
const footerElem = tableFooter ? tableFooter.$el : null;
|
|
618
566
|
const bodyElem = tableBody.$el;
|
|
619
567
|
const leftElem = leftBody ? leftBody.$el : null;
|
|
620
568
|
const rightElem = rightBody ? rightBody.$el : null;
|
|
621
|
-
const
|
|
622
|
-
const bodyXElem = elemStore['main-body-xSpace'];
|
|
623
|
-
const bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
|
|
624
|
-
const bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
|
|
625
|
-
let scrollTop = scrollBodyElem.scrollTop;
|
|
569
|
+
const scrollTop = scrollBodyElem.scrollTop;
|
|
626
570
|
const scrollLeft = bodyElem.scrollLeft;
|
|
627
571
|
const isRollX = scrollLeft !== lastScrollLeft;
|
|
628
572
|
const isRollY = scrollTop !== lastScrollTop;
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
$xetable.clearHoverRow();
|
|
573
|
+
const xHandleEl = $refs.refScrollXHandleElem;
|
|
574
|
+
const yHandleEl = $refs.refScrollYHandleElem;
|
|
575
|
+
if (yHandleEl) {
|
|
576
|
+
yHandleEl.scrollTop = scrollTop;
|
|
634
577
|
}
|
|
635
|
-
if (
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
syncBodyScroll($xetable, fixedType, scrollTop, bodyElem, leftElem);
|
|
642
|
-
}
|
|
643
|
-
else {
|
|
644
|
-
if (isRollX) {
|
|
645
|
-
if (headerElem) {
|
|
646
|
-
headerElem.scrollLeft = bodyElem.scrollLeft;
|
|
647
|
-
}
|
|
648
|
-
if (footerElem) {
|
|
649
|
-
footerElem.scrollLeft = bodyElem.scrollLeft;
|
|
650
|
-
}
|
|
578
|
+
else if (isRollY) {
|
|
579
|
+
$xeTable.lastScrollTop = scrollTop;
|
|
580
|
+
$xeTable.lastScrollLeft = scrollLeft;
|
|
581
|
+
if (leftElem && fixedType === 'left') {
|
|
582
|
+
setScrollTop(bodyElem, scrollTop);
|
|
583
|
+
setScrollTop(rightElem, scrollTop);
|
|
651
584
|
}
|
|
652
|
-
if (
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
syncBodyScroll($xetable, fixedType, scrollTop, leftElem, rightElem);
|
|
656
|
-
}
|
|
585
|
+
else if (rightElem && fixedType === 'right') {
|
|
586
|
+
setScrollTop(bodyElem, scrollTop);
|
|
587
|
+
setScrollTop(leftElem, scrollTop);
|
|
657
588
|
}
|
|
589
|
+
else {
|
|
590
|
+
setScrollTop(leftElem, scrollTop);
|
|
591
|
+
setScrollTop(rightElem, scrollTop);
|
|
592
|
+
}
|
|
593
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, {
|
|
594
|
+
type: renderType,
|
|
595
|
+
fixed: fixedType,
|
|
596
|
+
scrollTop,
|
|
597
|
+
scrollLeft
|
|
598
|
+
});
|
|
658
599
|
}
|
|
659
|
-
if (
|
|
660
|
-
|
|
661
|
-
}
|
|
662
|
-
if (scrollYLoad && isRollY) {
|
|
663
|
-
$xetable.triggerScrollYEvent(evnt);
|
|
600
|
+
if (xHandleEl) {
|
|
601
|
+
xHandleEl.scrollLeft = scrollLeft;
|
|
664
602
|
}
|
|
665
|
-
if (isRollX
|
|
666
|
-
|
|
603
|
+
else if (isRollX) {
|
|
604
|
+
$xeTable.lastScrollTop = scrollTop;
|
|
605
|
+
$xeTable.lastScrollLeft = scrollLeft;
|
|
606
|
+
setScrollLeft(headerElem, scrollLeft);
|
|
607
|
+
setScrollLeft(footerElem, scrollLeft);
|
|
608
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, {
|
|
609
|
+
type: renderType,
|
|
610
|
+
fixed: fixedType,
|
|
611
|
+
scrollTop,
|
|
612
|
+
scrollLeft
|
|
613
|
+
});
|
|
667
614
|
}
|
|
668
|
-
$xetable.emitEvent('scroll', {
|
|
669
|
-
type: renderType,
|
|
670
|
-
fixed: fixedType,
|
|
671
|
-
scrollTop,
|
|
672
|
-
scrollLeft,
|
|
673
|
-
scrollHeight: bodyElem.scrollHeight,
|
|
674
|
-
scrollWidth: bodyElem.scrollWidth,
|
|
675
|
-
bodyHeight,
|
|
676
|
-
bodyWidth,
|
|
677
|
-
isX: isRollX,
|
|
678
|
-
isY: isRollY
|
|
679
|
-
}, evnt);
|
|
680
615
|
},
|
|
681
616
|
handleWheel(evnt, isTopWheel, deltaTop, isRollX, isRollY) {
|
|
682
617
|
const { $parent: $xetable } = this;
|
package/es/table/src/footer.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { VxeUI } from '../../ui';
|
|
3
3
|
import { getClass } from '../../ui/src/utils';
|
|
4
|
-
import { updateCellTitle } from '../../ui/src/dom';
|
|
5
|
-
const
|
|
4
|
+
import { updateCellTitle, setScrollLeft } from '../../ui/src/dom';
|
|
5
|
+
const renderType = 'footer';
|
|
6
6
|
const { renderer } = VxeUI;
|
|
7
7
|
function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
8
8
|
for (let mIndex = 0; mIndex < mergeFooterList.length; mIndex++) {
|
|
@@ -117,7 +117,7 @@ export default {
|
|
|
117
117
|
ref: 'tfoot'
|
|
118
118
|
}, footerTableData.map((list, _rowIndex) => {
|
|
119
119
|
const $rowIndex = _rowIndex;
|
|
120
|
-
const rowParams = { $table: $xetable, row: list, _rowIndex, $rowIndex, fixed: fixedType, type:
|
|
120
|
+
const rowParams = { $table: $xetable, row: list, _rowIndex, $rowIndex, fixed: fixedType, type: renderType };
|
|
121
121
|
return h('tr', {
|
|
122
122
|
class: ['vxe-footer--row', footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''],
|
|
123
123
|
style: footerRowStyle ? (XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle) : null
|
|
@@ -152,7 +152,7 @@ export default {
|
|
|
152
152
|
itemIndex,
|
|
153
153
|
items: list,
|
|
154
154
|
fixed: fixedType,
|
|
155
|
-
type:
|
|
155
|
+
type: renderType,
|
|
156
156
|
data: footerTableData
|
|
157
157
|
};
|
|
158
158
|
// 虚拟滚动不支持动态高度
|
|
@@ -255,29 +255,32 @@ export default {
|
|
|
255
255
|
* 如果存在列固定右侧,同步更新滚动状态
|
|
256
256
|
*/
|
|
257
257
|
scrollEvent(evnt) {
|
|
258
|
-
const { $parent: $
|
|
259
|
-
const { $refs
|
|
260
|
-
const { tableHeader, tableBody, tableFooter
|
|
258
|
+
const { $parent: $xeTable, fixedType } = this;
|
|
259
|
+
const { $refs } = $xeTable;
|
|
260
|
+
const { tableHeader, tableBody, tableFooter } = $refs;
|
|
261
261
|
const headerElem = tableHeader ? tableHeader.$el : null;
|
|
262
262
|
const footerElem = tableFooter ? tableFooter.$el : null;
|
|
263
263
|
const bodyElem = tableBody.$el;
|
|
264
264
|
const scrollLeft = footerElem ? footerElem.scrollLeft : 0;
|
|
265
|
-
const
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
if (headerElem) {
|
|
269
|
-
headerElem.scrollLeft = scrollLeft;
|
|
265
|
+
const xHandleEl = $refs.refScrollXHandleElem;
|
|
266
|
+
if (xHandleEl) {
|
|
267
|
+
xHandleEl.scrollLeft = scrollLeft;
|
|
270
268
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
269
|
+
else {
|
|
270
|
+
const isRollX = true;
|
|
271
|
+
const isRollY = false;
|
|
272
|
+
const scrollTop = bodyElem.scrollTop;
|
|
273
|
+
$xeTable.lastScrollLeft = scrollLeft;
|
|
274
|
+
$xeTable.lastScrollTime = Date.now();
|
|
275
|
+
setScrollLeft(headerElem, scrollLeft);
|
|
276
|
+
setScrollLeft(bodyElem, scrollLeft);
|
|
277
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, {
|
|
278
|
+
type: renderType,
|
|
279
|
+
fixed: fixedType,
|
|
280
|
+
scrollTop,
|
|
281
|
+
scrollLeft
|
|
282
|
+
});
|
|
279
283
|
}
|
|
280
|
-
$xetable.emitEvent('scroll', { type: cellType, fixed: fixedType, scrollTop: bodyElem.scrollTop, scrollLeft, isX, isY: false }, evnt);
|
|
281
284
|
}
|
|
282
285
|
}
|
|
283
286
|
};
|