vxe-table 4.11.1 → 4.11.3
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/colgroup/style.css +0 -0
- package/es/colgroup/style.min.css +0 -0
- package/es/column/style.css +0 -0
- package/es/column/style.min.css +0 -0
- package/es/grid/style.css +83 -0
- package/es/grid/style.min.css +1 -0
- package/es/iconfont.1739874198596.ttf +0 -0
- package/es/iconfont.1739874198596.woff +0 -0
- package/es/iconfont.1739874198596.woff2 +0 -0
- 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/src/table.js +63 -27
- package/es/table/style.css +3476 -0
- package/es/table/style.min.css +1 -0
- package/es/toolbar/style.css +90 -0
- package/es/toolbar/style.min.css +1 -0
- package/es/ui/index.js +3 -3
- package/es/ui/src/log.js +1 -1
- package/es/ui/style.css +0 -0
- package/es/ui/style.min.css +0 -0
- package/es/v-x-e-table/style.css +0 -0
- package/es/v-x-e-table/style.min.css +0 -0
- package/es/vxe-colgroup/style.css +0 -0
- package/es/vxe-colgroup/style.min.css +0 -0
- package/es/vxe-column/style.css +0 -0
- package/es/vxe-column/style.min.css +0 -0
- package/es/vxe-grid/style.css +83 -0
- package/es/vxe-grid/style.min.css +1 -0
- package/es/vxe-table/style.css +3476 -0
- package/es/vxe-table/style.min.css +1 -0
- package/es/vxe-toolbar/style.css +90 -0
- package/es/vxe-toolbar/style.min.css +1 -0
- package/es/vxe-ui/style.css +0 -0
- package/es/vxe-ui/style.min.css +0 -0
- package/es/vxe-v-x-e-table/style.css +0 -0
- package/es/vxe-v-x-e-table/style.min.css +0 -0
- package/lib/colgroup/style/index.js +1 -0
- package/lib/colgroup/style/style.css +0 -0
- package/lib/colgroup/style/style.min.css +0 -0
- package/lib/column/style/index.js +1 -0
- package/lib/column/style/style.css +0 -0
- package/lib/column/style/style.min.css +0 -0
- package/lib/grid/style/index.js +1 -0
- package/lib/grid/style/style.css +83 -0
- package/lib/grid/style/style.min.css +1 -0
- package/lib/iconfont.1739874198596.ttf +0 -0
- package/lib/iconfont.1739874198596.woff +0 -0
- package/lib/iconfont.1739874198596.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +65 -31
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +715 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +722 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +715 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +715 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +715 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +715 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +715 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +715 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +715 -0
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +23 -0
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +23 -0
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +23 -0
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +23 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/table.js +62 -27
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/index.js +1 -0
- package/lib/table/style/style.css +3476 -0
- package/lib/table/style/style.min.css +1 -0
- package/lib/toolbar/style/index.js +1 -0
- package/lib/toolbar/style/style.css +90 -0
- package/lib/toolbar/style/style.min.css +1 -0
- package/lib/ui/index.js +3 -3
- 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/ui/style/index.js +1 -0
- package/lib/ui/style/style.css +0 -0
- package/lib/ui/style/style.min.css +0 -0
- package/lib/v-x-e-table/style/index.js +1 -0
- package/lib/v-x-e-table/style/style.css +0 -0
- package/lib/v-x-e-table/style/style.min.css +0 -0
- package/lib/vxe-colgroup/style/index.js +1 -0
- package/lib/vxe-colgroup/style/style.css +0 -0
- package/lib/vxe-colgroup/style/style.min.css +0 -0
- package/lib/vxe-column/style/index.js +1 -0
- package/lib/vxe-column/style/style.css +0 -0
- package/lib/vxe-column/style/style.min.css +0 -0
- package/lib/vxe-grid/style/index.js +1 -0
- package/lib/vxe-grid/style/style.css +83 -0
- package/lib/vxe-grid/style/style.min.css +1 -0
- package/lib/vxe-table/style/index.js +1 -0
- package/lib/vxe-table/style/style.css +3476 -0
- package/lib/vxe-table/style/style.min.css +1 -0
- package/lib/vxe-toolbar/style/index.js +1 -0
- package/lib/vxe-toolbar/style/style.css +90 -0
- package/lib/vxe-toolbar/style/style.min.css +1 -0
- package/lib/vxe-ui/style/index.js +1 -0
- package/lib/vxe-ui/style/style.css +0 -0
- package/lib/vxe-ui/style/style.min.css +0 -0
- package/lib/vxe-v-x-e-table/style/index.js +1 -0
- package/lib/vxe-v-x-e-table/style/style.css +0 -0
- package/lib/vxe-v-x-e-table/style/style.min.css +0 -0
- package/package.json +1 -1
- package/packages/table/src/table.ts +66 -31
- package/packages/ui/index.ts +2 -2
- package/styles/components/table.scss +2 -0
package/lib/table/src/table.js
CHANGED
|
@@ -3793,7 +3793,12 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
3793
3793
|
}
|
|
3794
3794
|
return multiple;
|
|
3795
3795
|
};
|
|
3796
|
-
const
|
|
3796
|
+
const wheelScrollLeftTo = (scrollLeft, cb) => {
|
|
3797
|
+
requestAnimationFrame(() => {
|
|
3798
|
+
cb(scrollLeft);
|
|
3799
|
+
});
|
|
3800
|
+
};
|
|
3801
|
+
const wheelScrollTopTo = (diffNum, cb) => {
|
|
3797
3802
|
const duration = Math.abs(diffNum);
|
|
3798
3803
|
const startTime = performance.now();
|
|
3799
3804
|
let countTop = 0;
|
|
@@ -10033,6 +10038,9 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
10033
10038
|
scrollRenderType,
|
|
10034
10039
|
inFooterScroll
|
|
10035
10040
|
} = internalData;
|
|
10041
|
+
if (inWheelScroll || inVirtualScroll || inHeaderScroll || inFooterScroll) {
|
|
10042
|
+
return;
|
|
10043
|
+
}
|
|
10036
10044
|
const xHandleEl = refScrollXHandleElem.value;
|
|
10037
10045
|
const yHandleEl = refScrollYHandleElem.value;
|
|
10038
10046
|
const leftScrollElem = (0, _util.getRefElem)(elemStore['left-body-scroll']);
|
|
@@ -10041,9 +10049,6 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
10041
10049
|
const headerScrollElem = (0, _util.getRefElem)(elemStore['main-header-scroll']);
|
|
10042
10050
|
const footerScrollElem = (0, _util.getRefElem)(elemStore['main-footer-scroll']);
|
|
10043
10051
|
const rowExpandEl = refRowExpandElem.value;
|
|
10044
|
-
if (inWheelScroll || inVirtualScroll || inHeaderScroll || inFooterScroll) {
|
|
10045
|
-
return;
|
|
10046
|
-
}
|
|
10047
10052
|
if (intoRunScroll) {
|
|
10048
10053
|
return;
|
|
10049
10054
|
}
|
|
@@ -10117,14 +10122,14 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
10117
10122
|
inBodyScroll,
|
|
10118
10123
|
inFooterScroll
|
|
10119
10124
|
} = internalData;
|
|
10125
|
+
if (inWheelScroll || inVirtualScroll || inBodyScroll || inFooterScroll) {
|
|
10126
|
+
return;
|
|
10127
|
+
}
|
|
10120
10128
|
const yHandleEl = refScrollYHandleElem.value;
|
|
10121
10129
|
const xHandleEl = refScrollXHandleElem.value;
|
|
10122
10130
|
const bodyScrollElem = (0, _util.getRefElem)(elemStore['main-body-scroll']);
|
|
10123
10131
|
const headerScrollElem = (0, _util.getRefElem)(elemStore['main-header-scroll']);
|
|
10124
10132
|
const footerScrollElem = (0, _util.getRefElem)(elemStore['main-footer-scroll']);
|
|
10125
|
-
if (inWheelScroll || inVirtualScroll || inBodyScroll || inFooterScroll) {
|
|
10126
|
-
return;
|
|
10127
|
-
}
|
|
10128
10133
|
if (intoRunScroll) {
|
|
10129
10134
|
return;
|
|
10130
10135
|
}
|
|
@@ -10165,14 +10170,14 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
10165
10170
|
inHeaderScroll,
|
|
10166
10171
|
inBodyScroll
|
|
10167
10172
|
} = internalData;
|
|
10173
|
+
if (inWheelScroll || inVirtualScroll || inHeaderScroll || inBodyScroll) {
|
|
10174
|
+
return;
|
|
10175
|
+
}
|
|
10168
10176
|
const yHandleEl = refScrollYHandleElem.value;
|
|
10169
10177
|
const xHandleEl = refScrollXHandleElem.value;
|
|
10170
10178
|
const bodyScrollElem = (0, _util.getRefElem)(elemStore['main-body-scroll']);
|
|
10171
10179
|
const headerScrollElem = (0, _util.getRefElem)(elemStore['main-header-scroll']);
|
|
10172
10180
|
const footerScrollElem = (0, _util.getRefElem)(elemStore['main-footer-scroll']);
|
|
10173
|
-
if (inWheelScroll || inVirtualScroll || inHeaderScroll || inBodyScroll) {
|
|
10174
|
-
return;
|
|
10175
|
-
}
|
|
10176
10181
|
if (intoRunScroll) {
|
|
10177
10182
|
return;
|
|
10178
10183
|
}
|
|
@@ -10214,8 +10219,14 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
10214
10219
|
highlightHoverRow
|
|
10215
10220
|
} = _props.default;
|
|
10216
10221
|
const {
|
|
10222
|
+
scrollXLoad,
|
|
10217
10223
|
scrollYLoad
|
|
10218
10224
|
} = reactData;
|
|
10225
|
+
const leftFixedWidth = computeLeftFixedWidth.value;
|
|
10226
|
+
const rightFixedWidth = computeRightFixedWidth.value;
|
|
10227
|
+
if (!(scrollYLoad || leftFixedWidth || rightFixedWidth)) {
|
|
10228
|
+
return;
|
|
10229
|
+
}
|
|
10219
10230
|
const {
|
|
10220
10231
|
elemStore,
|
|
10221
10232
|
lastScrollTop,
|
|
@@ -10225,7 +10236,9 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
10225
10236
|
const xHandleEl = refScrollXHandleElem.value;
|
|
10226
10237
|
const yHandleEl = refScrollYHandleElem.value;
|
|
10227
10238
|
const leftScrollElem = (0, _util.getRefElem)(elemStore['left-body-scroll']);
|
|
10239
|
+
const headerScrollElem = (0, _util.getRefElem)(elemStore['main-header-scroll']);
|
|
10228
10240
|
const bodyScrollElem = (0, _util.getRefElem)(elemStore['main-body-scroll']);
|
|
10241
|
+
const footerScrollElem = (0, _util.getRefElem)(elemStore['main-footer-scroll']);
|
|
10229
10242
|
const rightScrollElem = (0, _util.getRefElem)(elemStore['right-body-scroll']);
|
|
10230
10243
|
const rowExpandEl = refRowExpandElem.value;
|
|
10231
10244
|
if (!xHandleEl) {
|
|
@@ -10238,24 +10251,43 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
10238
10251
|
return;
|
|
10239
10252
|
}
|
|
10240
10253
|
const wheelSpeed = getWheelSpeed(reactData.lastScrollTime);
|
|
10241
|
-
const deltaTop = deltaY * wheelSpeed;
|
|
10242
|
-
const deltaLeft = deltaX * wheelSpeed;
|
|
10254
|
+
const deltaTop = Math.ceil(deltaY * wheelSpeed);
|
|
10255
|
+
const deltaLeft = Math.ceil(deltaX * wheelSpeed);
|
|
10243
10256
|
const isTopWheel = deltaTop < 0;
|
|
10244
10257
|
const currScrollTop = bodyScrollElem.scrollTop;
|
|
10245
10258
|
// 如果滚动位置已经是顶部或底部,则不需要触发
|
|
10246
10259
|
if (isTopWheel ? currScrollTop <= 0 : currScrollTop >= bodyScrollElem.scrollHeight - bodyScrollElem.clientHeight) {
|
|
10247
10260
|
return;
|
|
10248
10261
|
}
|
|
10249
|
-
const scrollTop =
|
|
10262
|
+
const scrollTop = currScrollTop + deltaTop;
|
|
10250
10263
|
const scrollLeft = bodyScrollElem.scrollLeft + deltaLeft;
|
|
10251
10264
|
const isRollX = scrollLeft !== lastScrollLeft;
|
|
10252
10265
|
const isRollY = scrollTop !== lastScrollTop;
|
|
10266
|
+
if (rowOpts.isHover || highlightHoverRow) {
|
|
10267
|
+
$xeTable.clearHoverRow();
|
|
10268
|
+
}
|
|
10253
10269
|
// 用于鼠标纵向滚轮处理
|
|
10270
|
+
if (isRollX) {
|
|
10271
|
+
evnt.preventDefault();
|
|
10272
|
+
internalData.inWheelScroll = true;
|
|
10273
|
+
wheelScrollLeftTo(scrollLeft, offsetLeft => {
|
|
10274
|
+
const currLeftNum = offsetLeft;
|
|
10275
|
+
(0, _dom.setScrollLeft)(xHandleEl, currLeftNum);
|
|
10276
|
+
(0, _dom.setScrollLeft)(bodyScrollElem, currLeftNum);
|
|
10277
|
+
(0, _dom.setScrollLeft)(headerScrollElem, currLeftNum);
|
|
10278
|
+
(0, _dom.setScrollLeft)(footerScrollElem, currLeftNum);
|
|
10279
|
+
if (scrollXLoad) {
|
|
10280
|
+
$xeTable.triggerScrollXEvent(evnt);
|
|
10281
|
+
}
|
|
10282
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, bodyScrollElem.scrollTop, currLeftNum, {
|
|
10283
|
+
type: 'table',
|
|
10284
|
+
fixed: ''
|
|
10285
|
+
});
|
|
10286
|
+
});
|
|
10287
|
+
}
|
|
10254
10288
|
if (isRollY) {
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
}
|
|
10258
|
-
wheelScrollTo(scrollTop - bodyScrollElem.scrollTop, offsetTop => {
|
|
10289
|
+
evnt.preventDefault();
|
|
10290
|
+
wheelScrollTopTo(scrollTop - currScrollTop, offsetTop => {
|
|
10259
10291
|
const currTopNum = bodyScrollElem.scrollTop + offsetTop;
|
|
10260
10292
|
internalData.inWheelScroll = true;
|
|
10261
10293
|
(0, _dom.setScrollTop)(yHandleEl, currTopNum);
|
|
@@ -10266,7 +10298,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
10266
10298
|
if (scrollYLoad) {
|
|
10267
10299
|
$xeTable.triggerScrollYEvent(evnt);
|
|
10268
10300
|
}
|
|
10269
|
-
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, currTopNum, scrollLeft, {
|
|
10301
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, currTopNum, bodyScrollElem.scrollLeft, {
|
|
10270
10302
|
type: 'table',
|
|
10271
10303
|
fixed: ''
|
|
10272
10304
|
});
|
|
@@ -10915,7 +10947,6 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
10915
10947
|
} = props;
|
|
10916
10948
|
const {
|
|
10917
10949
|
overflowX,
|
|
10918
|
-
scrollYLoad,
|
|
10919
10950
|
tableData,
|
|
10920
10951
|
tableColumn,
|
|
10921
10952
|
tableGroupColumn,
|
|
@@ -10926,16 +10957,10 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
10926
10957
|
leftList,
|
|
10927
10958
|
rightList
|
|
10928
10959
|
} = columnStore;
|
|
10929
|
-
|
|
10930
|
-
const rightFixedWidth = computeRightFixedWidth.value;
|
|
10931
|
-
const ons = {};
|
|
10932
|
-
if (scrollYLoad || leftFixedWidth || rightFixedWidth) {
|
|
10933
|
-
ons.onWheelPassive = $xeTable.triggerBodyWheelEvent;
|
|
10934
|
-
}
|
|
10935
|
-
return (0, _vue.h)('div', Object.assign({
|
|
10960
|
+
return (0, _vue.h)('div', {
|
|
10936
10961
|
ref: refTableViewportElem,
|
|
10937
10962
|
class: 'vxe-table--viewport-wrapper'
|
|
10938
|
-
},
|
|
10963
|
+
}, [(0, _vue.h)('div', {
|
|
10939
10964
|
class: 'vxe-table--main-wrapper'
|
|
10940
10965
|
}, [
|
|
10941
10966
|
/**
|
|
@@ -11594,6 +11619,12 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
11594
11619
|
}
|
|
11595
11620
|
}
|
|
11596
11621
|
});
|
|
11622
|
+
const tableViewportEl = refTableViewportElem.value;
|
|
11623
|
+
if (tableViewportEl) {
|
|
11624
|
+
tableViewportEl.addEventListener('wheel', $xeTable.triggerBodyWheelEvent, {
|
|
11625
|
+
passive: false
|
|
11626
|
+
});
|
|
11627
|
+
}
|
|
11597
11628
|
globalEvents.on($xeTable, 'paste', handleGlobalPasteEvent);
|
|
11598
11629
|
globalEvents.on($xeTable, 'copy', handleGlobalCopyEvent);
|
|
11599
11630
|
globalEvents.on($xeTable, 'cut', handleGlobalCutEvent);
|
|
@@ -11608,6 +11639,10 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
11608
11639
|
});
|
|
11609
11640
|
});
|
|
11610
11641
|
(0, _vue.onBeforeUnmount)(() => {
|
|
11642
|
+
const tableViewportEl = refTableViewportElem.value;
|
|
11643
|
+
if (tableViewportEl) {
|
|
11644
|
+
tableViewportEl.removeEventListener('wheel', $xeTable.triggerBodyWheelEvent);
|
|
11645
|
+
}
|
|
11611
11646
|
if (resizeObserver) {
|
|
11612
11647
|
resizeObserver.disconnect();
|
|
11613
11648
|
}
|