vxe-table 3.10.9 → 3.10.10
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/style.css +1 -1
- package/es/table/src/body.js +0 -4
- package/es/table/src/footer.js +0 -2
- package/es/table/src/methods.js +53 -22
- package/es/table/src/table.js +18 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +77 -29
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/body.js +0 -4
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +0 -2
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/methods.js +54 -22
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +22 -0
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- 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/package.json +2 -2
- package/packages/table/src/body.ts +0 -4
- package/packages/table/src/footer.ts +0 -2
- package/packages/table/src/methods.ts +51 -21
- package/packages/table/src/table.ts +20 -0
- /package/es/{iconfont.1731143527990.ttf → iconfont.1731289527548.ttf} +0 -0
- /package/es/{iconfont.1731143527990.woff → iconfont.1731289527548.woff} +0 -0
- /package/es/{iconfont.1731143527990.woff2 → iconfont.1731289527548.woff2} +0 -0
- /package/lib/{iconfont.1731143527990.ttf → iconfont.1731289527548.ttf} +0 -0
- /package/lib/{iconfont.1731143527990.woff → iconfont.1731289527548.woff} +0 -0
- /package/lib/{iconfont.1731143527990.woff2 → iconfont.1731289527548.woff2} +0 -0
package/es/table/src/table.js
CHANGED
|
@@ -373,12 +373,30 @@ export default {
|
|
|
373
373
|
computeSXOpts() {
|
|
374
374
|
return Object.assign({}, getConfig().table.scrollX, this.scrollX);
|
|
375
375
|
},
|
|
376
|
+
computeScrollXThreshold() {
|
|
377
|
+
const $xeTable = this;
|
|
378
|
+
const sXOpts = $xeTable.computeSXOpts;
|
|
379
|
+
const { threshold } = sXOpts;
|
|
380
|
+
if (threshold) {
|
|
381
|
+
return XEUtils.toNumber(threshold);
|
|
382
|
+
}
|
|
383
|
+
return 0;
|
|
384
|
+
},
|
|
376
385
|
sYOpts() {
|
|
377
386
|
return this.computeSYOpts;
|
|
378
387
|
},
|
|
379
388
|
computeSYOpts() {
|
|
380
389
|
return Object.assign({}, getConfig().table.scrollY, this.scrollY);
|
|
381
390
|
},
|
|
391
|
+
computeScrollYThreshold() {
|
|
392
|
+
const $xeTable = this;
|
|
393
|
+
const sYOpts = $xeTable.computeSYOpts;
|
|
394
|
+
const { threshold } = sYOpts;
|
|
395
|
+
if (threshold) {
|
|
396
|
+
return XEUtils.toNumber(threshold);
|
|
397
|
+
}
|
|
398
|
+
return 0;
|
|
399
|
+
},
|
|
382
400
|
rowHeightMaps() {
|
|
383
401
|
return {
|
|
384
402
|
default: 48,
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.10.
|
|
2223
|
+
const version = "3.10.10";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2769,7 +2769,7 @@ function isNodeElement(elem) {
|
|
|
2769
2769
|
const {
|
|
2770
2770
|
log: log_log
|
|
2771
2771
|
} = core_.VxeUI;
|
|
2772
|
-
const log_version = `table v${"3.10.
|
|
2772
|
+
const log_version = `table v${"3.10.10"}`;
|
|
2773
2773
|
const warnLog = log_log.create('warn', log_version);
|
|
2774
2774
|
const errLog = log_log.create('error', log_version);
|
|
2775
2775
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -11557,26 +11557,20 @@ const Methods = {
|
|
|
11557
11557
|
handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, params) {
|
|
11558
11558
|
const $xeTable = this;
|
|
11559
11559
|
const props = $xeTable;
|
|
11560
|
+
const reactData = $xeTable;
|
|
11561
|
+
const internalData = $xeTable;
|
|
11560
11562
|
const {
|
|
11561
11563
|
highlightHoverRow
|
|
11562
11564
|
} = props;
|
|
11565
|
+
const {
|
|
11566
|
+
lastScrollLeft,
|
|
11567
|
+
lastScrollTop
|
|
11568
|
+
} = internalData;
|
|
11563
11569
|
const tableBody = $xeTable.$refs.tableBody;
|
|
11564
11570
|
const bodyElem = tableBody ? tableBody.$el : null;
|
|
11565
11571
|
const rowOpts = $xeTable.computeRowOpts;
|
|
11566
11572
|
const validTip = $xeTable.$refs.validTip;
|
|
11567
11573
|
const tooltip = $xeTable.$refs.tooltip;
|
|
11568
|
-
if (rowOpts.isHover || highlightHoverRow) {
|
|
11569
|
-
$xeTable.clearHoverRow();
|
|
11570
|
-
}
|
|
11571
|
-
if (validTip && validTip.visible) {
|
|
11572
|
-
validTip.close();
|
|
11573
|
-
}
|
|
11574
|
-
if (tooltip && tooltip.visible) {
|
|
11575
|
-
tooltip.close();
|
|
11576
|
-
}
|
|
11577
|
-
if (isRollX) {
|
|
11578
|
-
$xeTable.checkScrolling();
|
|
11579
|
-
}
|
|
11580
11574
|
const bodyHeight = bodyElem ? bodyElem.clientHeight : 0;
|
|
11581
11575
|
const bodyWidth = bodyElem ? bodyElem.clientWidth : 0;
|
|
11582
11576
|
const scrollHeight = bodyElem ? bodyElem.scrollHeight : 0;
|
|
@@ -11585,17 +11579,50 @@ const Methods = {
|
|
|
11585
11579
|
let isBottom = false;
|
|
11586
11580
|
let isLeft = false;
|
|
11587
11581
|
let isRight = false;
|
|
11582
|
+
let direction = '';
|
|
11583
|
+
let isTopBoundary = false;
|
|
11584
|
+
let isBottomBoundary = false;
|
|
11585
|
+
let isLeftBoundary = false;
|
|
11586
|
+
let isRightBoundary = false;
|
|
11588
11587
|
if (isRollX) {
|
|
11588
|
+
const xThreshold = $xeTable.computeScrollXThreshold;
|
|
11589
11589
|
isLeft = scrollLeft <= 0;
|
|
11590
|
-
if (!
|
|
11590
|
+
if (!isLeft) {
|
|
11591
11591
|
isRight = scrollLeft + bodyWidth >= scrollWidth;
|
|
11592
11592
|
}
|
|
11593
|
+
if (scrollLeft > lastScrollLeft) {
|
|
11594
|
+
direction = 'right';
|
|
11595
|
+
if (scrollLeft + bodyWidth >= scrollWidth - xThreshold) {
|
|
11596
|
+
isRightBoundary = true;
|
|
11597
|
+
}
|
|
11598
|
+
} else {
|
|
11599
|
+
direction = 'left';
|
|
11600
|
+
if (scrollLeft <= xThreshold) {
|
|
11601
|
+
isLeftBoundary = true;
|
|
11602
|
+
}
|
|
11603
|
+
}
|
|
11593
11604
|
$xeTable.checkScrolling();
|
|
11605
|
+
internalData.lastScrollLeft = scrollLeft;
|
|
11606
|
+
reactData.lastScrollTime = Date.now();
|
|
11594
11607
|
} else {
|
|
11608
|
+
const yThreshold = $xeTable.computeScrollYThreshold;
|
|
11595
11609
|
isTop = scrollTop <= 0;
|
|
11596
11610
|
if (!isTop) {
|
|
11597
11611
|
isBottom = scrollTop + bodyHeight >= scrollHeight;
|
|
11598
11612
|
}
|
|
11613
|
+
if (scrollTop > lastScrollTop) {
|
|
11614
|
+
direction = 'bottom';
|
|
11615
|
+
if (scrollTop + bodyHeight >= scrollHeight - yThreshold) {
|
|
11616
|
+
isBottomBoundary = true;
|
|
11617
|
+
}
|
|
11618
|
+
} else {
|
|
11619
|
+
direction = 'top';
|
|
11620
|
+
if (scrollTop <= yThreshold) {
|
|
11621
|
+
isTopBoundary = true;
|
|
11622
|
+
}
|
|
11623
|
+
}
|
|
11624
|
+
internalData.lastScrollTop = scrollTop;
|
|
11625
|
+
reactData.lastScrollTime = Date.now();
|
|
11599
11626
|
}
|
|
11600
11627
|
const evntParams = {
|
|
11601
11628
|
scrollTop,
|
|
@@ -11610,8 +11637,21 @@ const Methods = {
|
|
|
11610
11637
|
isBottom,
|
|
11611
11638
|
isLeft,
|
|
11612
11639
|
isRight,
|
|
11640
|
+
direction,
|
|
11613
11641
|
...params
|
|
11614
11642
|
};
|
|
11643
|
+
if (rowOpts.isHover || highlightHoverRow) {
|
|
11644
|
+
$xeTable.clearHoverRow();
|
|
11645
|
+
}
|
|
11646
|
+
if (validTip && validTip.visible) {
|
|
11647
|
+
validTip.close();
|
|
11648
|
+
}
|
|
11649
|
+
if (tooltip && tooltip.visible) {
|
|
11650
|
+
tooltip.close();
|
|
11651
|
+
}
|
|
11652
|
+
if (isBottomBoundary || isTopBoundary || isRightBoundary || isLeftBoundary) {
|
|
11653
|
+
$xeTable.dispatchEvent('scroll-boundary', evntParams, evnt);
|
|
11654
|
+
}
|
|
11615
11655
|
$xeTable.dispatchEvent('scroll', evntParams, evnt);
|
|
11616
11656
|
},
|
|
11617
11657
|
/**
|
|
@@ -11648,8 +11688,6 @@ const Methods = {
|
|
|
11648
11688
|
const bodyElem = tableBody.$el;
|
|
11649
11689
|
const headerElem = tableHeader ? tableHeader.$el : null;
|
|
11650
11690
|
const footerElem = tableFooter ? tableFooter.$el : null;
|
|
11651
|
-
$xeTable.lastScrollLeft = scrollLeft;
|
|
11652
|
-
$xeTable.lastScrollTime = Date.now();
|
|
11653
11691
|
setScrollLeft(bodyElem, scrollLeft);
|
|
11654
11692
|
setScrollLeft(headerElem, scrollLeft);
|
|
11655
11693
|
setScrollLeft(footerElem, scrollLeft);
|
|
@@ -11663,8 +11701,6 @@ const Methods = {
|
|
|
11663
11701
|
} = wrapperEl;
|
|
11664
11702
|
const isRollX = true;
|
|
11665
11703
|
const isRollY = false;
|
|
11666
|
-
$xeTable.lastScrollLeft = scrollLeft;
|
|
11667
|
-
$xeTable.lastScrollTime = Date.now();
|
|
11668
11704
|
$xeTable.handleSyncScrollX(scrollLeft);
|
|
11669
11705
|
$xeTable.triggerScrollXEvent(evnt);
|
|
11670
11706
|
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
@@ -11686,8 +11722,6 @@ const Methods = {
|
|
|
11686
11722
|
const bodyElem = tableBody.$el;
|
|
11687
11723
|
const leftElem = leftBody ? leftBody.$el : null;
|
|
11688
11724
|
const rightElem = rightBody ? rightBody.$el : null;
|
|
11689
|
-
$xeTable.lastScrollTop = scrollTop;
|
|
11690
|
-
$xeTable.lastScrollTime = Date.now();
|
|
11691
11725
|
setScrollTop(bodyElem, scrollTop);
|
|
11692
11726
|
setScrollTop(leftElem, scrollTop);
|
|
11693
11727
|
setScrollTop(rightElem, scrollTop);
|
|
@@ -11701,8 +11735,6 @@ const Methods = {
|
|
|
11701
11735
|
} = wrapperEl;
|
|
11702
11736
|
const isRollX = false;
|
|
11703
11737
|
const isRollY = true;
|
|
11704
|
-
$xeTable.lastScrollTop = scrollTop;
|
|
11705
|
-
$xeTable.lastScrollTime = Date.now();
|
|
11706
11738
|
$xeTable.handleSyncScrollY(scrollTop);
|
|
11707
11739
|
$xeTable.triggerScrollYEvent(evnt);
|
|
11708
11740
|
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
@@ -13118,8 +13150,6 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
13118
13150
|
if (yHandleEl) {
|
|
13119
13151
|
yHandleEl.scrollTop = scrollTop;
|
|
13120
13152
|
} else if (isRollY) {
|
|
13121
|
-
$xeTable.lastScrollTop = scrollTop;
|
|
13122
|
-
$xeTable.lastScrollLeft = scrollLeft;
|
|
13123
13153
|
if (leftElem && fixedType === 'left') {
|
|
13124
13154
|
setScrollTop(bodyElem, scrollTop);
|
|
13125
13155
|
setScrollTop(rightElem, scrollTop);
|
|
@@ -13138,8 +13168,6 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
13138
13168
|
if (xHandleEl) {
|
|
13139
13169
|
xHandleEl.scrollLeft = scrollLeft;
|
|
13140
13170
|
} else if (isRollX) {
|
|
13141
|
-
$xeTable.lastScrollTop = scrollTop;
|
|
13142
|
-
$xeTable.lastScrollLeft = scrollLeft;
|
|
13143
13171
|
setScrollLeft(headerElem, scrollLeft);
|
|
13144
13172
|
setScrollLeft(footerElem, scrollLeft);
|
|
13145
13173
|
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
@@ -13994,8 +14022,6 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
13994
14022
|
const isRollX = true;
|
|
13995
14023
|
const isRollY = false;
|
|
13996
14024
|
const scrollTop = bodyElem.scrollTop;
|
|
13997
|
-
$xeTable.lastScrollLeft = scrollLeft;
|
|
13998
|
-
$xeTable.lastScrollTime = Date.now();
|
|
13999
14025
|
setScrollLeft(headerElem, scrollLeft);
|
|
14000
14026
|
setScrollLeft(bodyElem, scrollLeft);
|
|
14001
14027
|
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
@@ -21452,12 +21478,34 @@ function handleUupdateResize(_vm) {
|
|
|
21452
21478
|
computeSXOpts() {
|
|
21453
21479
|
return Object.assign({}, table_getConfig().table.scrollX, this.scrollX);
|
|
21454
21480
|
},
|
|
21481
|
+
computeScrollXThreshold() {
|
|
21482
|
+
const $xeTable = this;
|
|
21483
|
+
const sXOpts = $xeTable.computeSXOpts;
|
|
21484
|
+
const {
|
|
21485
|
+
threshold
|
|
21486
|
+
} = sXOpts;
|
|
21487
|
+
if (threshold) {
|
|
21488
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(threshold);
|
|
21489
|
+
}
|
|
21490
|
+
return 0;
|
|
21491
|
+
},
|
|
21455
21492
|
sYOpts() {
|
|
21456
21493
|
return this.computeSYOpts;
|
|
21457
21494
|
},
|
|
21458
21495
|
computeSYOpts() {
|
|
21459
21496
|
return Object.assign({}, table_getConfig().table.scrollY, this.scrollY);
|
|
21460
21497
|
},
|
|
21498
|
+
computeScrollYThreshold() {
|
|
21499
|
+
const $xeTable = this;
|
|
21500
|
+
const sYOpts = $xeTable.computeSYOpts;
|
|
21501
|
+
const {
|
|
21502
|
+
threshold
|
|
21503
|
+
} = sYOpts;
|
|
21504
|
+
if (threshold) {
|
|
21505
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(threshold);
|
|
21506
|
+
}
|
|
21507
|
+
return 0;
|
|
21508
|
+
},
|
|
21461
21509
|
rowHeightMaps() {
|
|
21462
21510
|
return {
|
|
21463
21511
|
default: 48,
|