vxe-table 3.10.9 → 3.10.11
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/en-US.js +1 -0
- package/es/locale/lang/es-ES.js +1 -0
- package/es/locale/lang/hu-HU.js +1 -0
- package/es/locale/lang/ja-JP.js +1 -0
- package/es/locale/lang/ko-KR.js +1 -0
- package/es/locale/lang/pt-BR.js +1 -0
- package/es/locale/lang/ru-RU.js +1 -0
- package/es/locale/lang/uk-UA.js +1 -0
- package/es/locale/lang/vi-VN.js +1 -0
- package/es/locale/lang/zh-CHT.js +1 -0
- package/es/locale/lang/zh-CN.js +1 -0
- 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 +78 -29
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +1 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -0
- package/lib/locale/lang/es-ES.js +1 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +1 -0
- package/lib/locale/lang/hu-HU.js +1 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +1 -0
- package/lib/locale/lang/ja-JP.js +1 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -0
- package/lib/locale/lang/ko-KR.js +1 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +1 -0
- package/lib/locale/lang/pt-BR.js +1 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +1 -0
- package/lib/locale/lang/ru-RU.js +1 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +1 -0
- package/lib/locale/lang/uk-UA.js +1 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +1 -0
- package/lib/locale/lang/vi-VN.js +1 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +1 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +1 -0
- package/lib/locale/lang/zh-CN.js +1 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -0
- 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/locale/lang/en-US.ts +1 -0
- package/packages/locale/lang/es-ES.ts +1 -0
- package/packages/locale/lang/hu-HU.ts +1 -0
- package/packages/locale/lang/ja-JP.ts +1 -0
- package/packages/locale/lang/ko-KR.ts +1 -0
- package/packages/locale/lang/pt-BR.ts +1 -0
- package/packages/locale/lang/ru-RU.ts +1 -0
- package/packages/locale/lang/uk-UA.ts +1 -0
- package/packages/locale/lang/vi-VN.ts +1 -0
- package/packages/locale/lang/zh-CHT.ts +1 -0
- package/packages/locale/lang/zh-CN.ts +1 -0
- 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.1731339180386.ttf} +0 -0
- /package/es/{iconfont.1731143527990.woff → iconfont.1731339180386.woff} +0 -0
- /package/es/{iconfont.1731143527990.woff2 → iconfont.1731339180386.woff2} +0 -0
- /package/lib/{iconfont.1731143527990.ttf → iconfont.1731339180386.ttf} +0 -0
- /package/lib/{iconfont.1731143527990.woff → iconfont.1731339180386.woff} +0 -0
- /package/lib/{iconfont.1731143527990.woff2 → iconfont.1731339180386.woff2} +0 -0
package/lib/table/src/methods.js
CHANGED
|
@@ -6785,26 +6785,20 @@ const Methods = {
|
|
|
6785
6785
|
handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, params) {
|
|
6786
6786
|
const $xeTable = this;
|
|
6787
6787
|
const props = $xeTable;
|
|
6788
|
+
const reactData = $xeTable;
|
|
6789
|
+
const internalData = $xeTable;
|
|
6788
6790
|
const {
|
|
6789
6791
|
highlightHoverRow
|
|
6790
6792
|
} = props;
|
|
6793
|
+
const {
|
|
6794
|
+
lastScrollLeft,
|
|
6795
|
+
lastScrollTop
|
|
6796
|
+
} = internalData;
|
|
6791
6797
|
const tableBody = $xeTable.$refs.tableBody;
|
|
6792
6798
|
const bodyElem = tableBody ? tableBody.$el : null;
|
|
6793
6799
|
const rowOpts = $xeTable.computeRowOpts;
|
|
6794
6800
|
const validTip = $xeTable.$refs.validTip;
|
|
6795
6801
|
const tooltip = $xeTable.$refs.tooltip;
|
|
6796
|
-
if (rowOpts.isHover || highlightHoverRow) {
|
|
6797
|
-
$xeTable.clearHoverRow();
|
|
6798
|
-
}
|
|
6799
|
-
if (validTip && validTip.visible) {
|
|
6800
|
-
validTip.close();
|
|
6801
|
-
}
|
|
6802
|
-
if (tooltip && tooltip.visible) {
|
|
6803
|
-
tooltip.close();
|
|
6804
|
-
}
|
|
6805
|
-
if (isRollX) {
|
|
6806
|
-
$xeTable.checkScrolling();
|
|
6807
|
-
}
|
|
6808
6802
|
const bodyHeight = bodyElem ? bodyElem.clientHeight : 0;
|
|
6809
6803
|
const bodyWidth = bodyElem ? bodyElem.clientWidth : 0;
|
|
6810
6804
|
const scrollHeight = bodyElem ? bodyElem.scrollHeight : 0;
|
|
@@ -6813,17 +6807,50 @@ const Methods = {
|
|
|
6813
6807
|
let isBottom = false;
|
|
6814
6808
|
let isLeft = false;
|
|
6815
6809
|
let isRight = false;
|
|
6810
|
+
let direction = '';
|
|
6811
|
+
let isTopBoundary = false;
|
|
6812
|
+
let isBottomBoundary = false;
|
|
6813
|
+
let isLeftBoundary = false;
|
|
6814
|
+
let isRightBoundary = false;
|
|
6816
6815
|
if (isRollX) {
|
|
6816
|
+
const xThreshold = $xeTable.computeScrollXThreshold;
|
|
6817
6817
|
isLeft = scrollLeft <= 0;
|
|
6818
|
-
if (!
|
|
6818
|
+
if (!isLeft) {
|
|
6819
6819
|
isRight = scrollLeft + bodyWidth >= scrollWidth;
|
|
6820
6820
|
}
|
|
6821
|
+
if (scrollLeft > lastScrollLeft) {
|
|
6822
|
+
direction = 'right';
|
|
6823
|
+
if (scrollLeft + bodyWidth >= scrollWidth - xThreshold) {
|
|
6824
|
+
isRightBoundary = true;
|
|
6825
|
+
}
|
|
6826
|
+
} else {
|
|
6827
|
+
direction = 'left';
|
|
6828
|
+
if (scrollLeft <= xThreshold) {
|
|
6829
|
+
isLeftBoundary = true;
|
|
6830
|
+
}
|
|
6831
|
+
}
|
|
6821
6832
|
$xeTable.checkScrolling();
|
|
6833
|
+
internalData.lastScrollLeft = scrollLeft;
|
|
6834
|
+
reactData.lastScrollTime = Date.now();
|
|
6822
6835
|
} else {
|
|
6836
|
+
const yThreshold = $xeTable.computeScrollYThreshold;
|
|
6823
6837
|
isTop = scrollTop <= 0;
|
|
6824
6838
|
if (!isTop) {
|
|
6825
6839
|
isBottom = scrollTop + bodyHeight >= scrollHeight;
|
|
6826
6840
|
}
|
|
6841
|
+
if (scrollTop > lastScrollTop) {
|
|
6842
|
+
direction = 'bottom';
|
|
6843
|
+
if (scrollTop + bodyHeight >= scrollHeight - yThreshold) {
|
|
6844
|
+
isBottomBoundary = true;
|
|
6845
|
+
}
|
|
6846
|
+
} else {
|
|
6847
|
+
direction = 'top';
|
|
6848
|
+
if (scrollTop <= yThreshold) {
|
|
6849
|
+
isTopBoundary = true;
|
|
6850
|
+
}
|
|
6851
|
+
}
|
|
6852
|
+
internalData.lastScrollTop = scrollTop;
|
|
6853
|
+
reactData.lastScrollTime = Date.now();
|
|
6827
6854
|
}
|
|
6828
6855
|
const evntParams = Object.assign({
|
|
6829
6856
|
scrollTop,
|
|
@@ -6837,8 +6864,21 @@ const Methods = {
|
|
|
6837
6864
|
isTop,
|
|
6838
6865
|
isBottom,
|
|
6839
6866
|
isLeft,
|
|
6840
|
-
isRight
|
|
6867
|
+
isRight,
|
|
6868
|
+
direction
|
|
6841
6869
|
}, params);
|
|
6870
|
+
if (rowOpts.isHover || highlightHoverRow) {
|
|
6871
|
+
$xeTable.clearHoverRow();
|
|
6872
|
+
}
|
|
6873
|
+
if (validTip && validTip.visible) {
|
|
6874
|
+
validTip.close();
|
|
6875
|
+
}
|
|
6876
|
+
if (tooltip && tooltip.visible) {
|
|
6877
|
+
tooltip.close();
|
|
6878
|
+
}
|
|
6879
|
+
if (isBottomBoundary || isTopBoundary || isRightBoundary || isLeftBoundary) {
|
|
6880
|
+
$xeTable.dispatchEvent('scroll-boundary', evntParams, evnt);
|
|
6881
|
+
}
|
|
6842
6882
|
$xeTable.dispatchEvent('scroll', evntParams, evnt);
|
|
6843
6883
|
},
|
|
6844
6884
|
/**
|
|
@@ -6875,8 +6915,6 @@ const Methods = {
|
|
|
6875
6915
|
const bodyElem = tableBody.$el;
|
|
6876
6916
|
const headerElem = tableHeader ? tableHeader.$el : null;
|
|
6877
6917
|
const footerElem = tableFooter ? tableFooter.$el : null;
|
|
6878
|
-
$xeTable.lastScrollLeft = scrollLeft;
|
|
6879
|
-
$xeTable.lastScrollTime = Date.now();
|
|
6880
6918
|
(0, _dom.setScrollLeft)(bodyElem, scrollLeft);
|
|
6881
6919
|
(0, _dom.setScrollLeft)(headerElem, scrollLeft);
|
|
6882
6920
|
(0, _dom.setScrollLeft)(footerElem, scrollLeft);
|
|
@@ -6890,8 +6928,6 @@ const Methods = {
|
|
|
6890
6928
|
} = wrapperEl;
|
|
6891
6929
|
const isRollX = true;
|
|
6892
6930
|
const isRollY = false;
|
|
6893
|
-
$xeTable.lastScrollLeft = scrollLeft;
|
|
6894
|
-
$xeTable.lastScrollTime = Date.now();
|
|
6895
6931
|
$xeTable.handleSyncScrollX(scrollLeft);
|
|
6896
6932
|
$xeTable.triggerScrollXEvent(evnt);
|
|
6897
6933
|
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
@@ -6913,8 +6949,6 @@ const Methods = {
|
|
|
6913
6949
|
const bodyElem = tableBody.$el;
|
|
6914
6950
|
const leftElem = leftBody ? leftBody.$el : null;
|
|
6915
6951
|
const rightElem = rightBody ? rightBody.$el : null;
|
|
6916
|
-
$xeTable.lastScrollTop = scrollTop;
|
|
6917
|
-
$xeTable.lastScrollTime = Date.now();
|
|
6918
6952
|
(0, _dom.setScrollTop)(bodyElem, scrollTop);
|
|
6919
6953
|
(0, _dom.setScrollTop)(leftElem, scrollTop);
|
|
6920
6954
|
(0, _dom.setScrollTop)(rightElem, scrollTop);
|
|
@@ -6928,8 +6962,6 @@ const Methods = {
|
|
|
6928
6962
|
} = wrapperEl;
|
|
6929
6963
|
const isRollX = false;
|
|
6930
6964
|
const isRollY = true;
|
|
6931
|
-
$xeTable.lastScrollTop = scrollTop;
|
|
6932
|
-
$xeTable.lastScrollTime = Date.now();
|
|
6933
6965
|
$xeTable.handleSyncScrollY(scrollTop);
|
|
6934
6966
|
$xeTable.triggerScrollYEvent(evnt);
|
|
6935
6967
|
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|