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/index.umd.js
CHANGED
|
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
|
|
|
3138
3138
|
;// ./packages/ui/index.ts
|
|
3139
3139
|
|
|
3140
3140
|
|
|
3141
|
-
const version = "4.11.
|
|
3141
|
+
const version = "4.11.3";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3335,8 +3335,8 @@ core_.VxeUI.setConfig({
|
|
|
3335
3335
|
virtualYConfig: {
|
|
3336
3336
|
enabled: true,
|
|
3337
3337
|
gt: 100,
|
|
3338
|
-
preSize:
|
|
3339
|
-
oSize:
|
|
3338
|
+
preSize: 0,
|
|
3339
|
+
oSize: 1
|
|
3340
3340
|
},
|
|
3341
3341
|
scrollbarConfig: {
|
|
3342
3342
|
// width: 0,
|
|
@@ -3586,7 +3586,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3586
3586
|
const {
|
|
3587
3587
|
log: log_log
|
|
3588
3588
|
} = core_.VxeUI;
|
|
3589
|
-
const log_version = `table v${"4.11.
|
|
3589
|
+
const log_version = `table v${"4.11.3"}`;
|
|
3590
3590
|
const warnLog = log_log.create('warn', log_version);
|
|
3591
3591
|
const errLog = log_log.create('error', log_version);
|
|
3592
3592
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -14103,7 +14103,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
14103
14103
|
}
|
|
14104
14104
|
return multiple;
|
|
14105
14105
|
};
|
|
14106
|
-
const
|
|
14106
|
+
const wheelScrollLeftTo = (scrollLeft, cb) => {
|
|
14107
|
+
requestAnimationFrame(() => {
|
|
14108
|
+
cb(scrollLeft);
|
|
14109
|
+
});
|
|
14110
|
+
};
|
|
14111
|
+
const wheelScrollTopTo = (diffNum, cb) => {
|
|
14107
14112
|
const duration = Math.abs(diffNum);
|
|
14108
14113
|
const startTime = performance.now();
|
|
14109
14114
|
let countTop = 0;
|
|
@@ -20356,6 +20361,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20356
20361
|
scrollRenderType,
|
|
20357
20362
|
inFooterScroll
|
|
20358
20363
|
} = internalData;
|
|
20364
|
+
if (inWheelScroll || inVirtualScroll || inHeaderScroll || inFooterScroll) {
|
|
20365
|
+
return;
|
|
20366
|
+
}
|
|
20359
20367
|
const xHandleEl = refScrollXHandleElem.value;
|
|
20360
20368
|
const yHandleEl = refScrollYHandleElem.value;
|
|
20361
20369
|
const leftScrollElem = getRefElem(elemStore['left-body-scroll']);
|
|
@@ -20364,9 +20372,6 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20364
20372
|
const headerScrollElem = getRefElem(elemStore['main-header-scroll']);
|
|
20365
20373
|
const footerScrollElem = getRefElem(elemStore['main-footer-scroll']);
|
|
20366
20374
|
const rowExpandEl = refRowExpandElem.value;
|
|
20367
|
-
if (inWheelScroll || inVirtualScroll || inHeaderScroll || inFooterScroll) {
|
|
20368
|
-
return;
|
|
20369
|
-
}
|
|
20370
20375
|
if (intoRunScroll) {
|
|
20371
20376
|
return;
|
|
20372
20377
|
}
|
|
@@ -20440,14 +20445,14 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20440
20445
|
inBodyScroll,
|
|
20441
20446
|
inFooterScroll
|
|
20442
20447
|
} = internalData;
|
|
20448
|
+
if (inWheelScroll || inVirtualScroll || inBodyScroll || inFooterScroll) {
|
|
20449
|
+
return;
|
|
20450
|
+
}
|
|
20443
20451
|
const yHandleEl = refScrollYHandleElem.value;
|
|
20444
20452
|
const xHandleEl = refScrollXHandleElem.value;
|
|
20445
20453
|
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
20446
20454
|
const headerScrollElem = getRefElem(elemStore['main-header-scroll']);
|
|
20447
20455
|
const footerScrollElem = getRefElem(elemStore['main-footer-scroll']);
|
|
20448
|
-
if (inWheelScroll || inVirtualScroll || inBodyScroll || inFooterScroll) {
|
|
20449
|
-
return;
|
|
20450
|
-
}
|
|
20451
20456
|
if (intoRunScroll) {
|
|
20452
20457
|
return;
|
|
20453
20458
|
}
|
|
@@ -20488,14 +20493,14 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20488
20493
|
inHeaderScroll,
|
|
20489
20494
|
inBodyScroll
|
|
20490
20495
|
} = internalData;
|
|
20496
|
+
if (inWheelScroll || inVirtualScroll || inHeaderScroll || inBodyScroll) {
|
|
20497
|
+
return;
|
|
20498
|
+
}
|
|
20491
20499
|
const yHandleEl = refScrollYHandleElem.value;
|
|
20492
20500
|
const xHandleEl = refScrollXHandleElem.value;
|
|
20493
20501
|
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
20494
20502
|
const headerScrollElem = getRefElem(elemStore['main-header-scroll']);
|
|
20495
20503
|
const footerScrollElem = getRefElem(elemStore['main-footer-scroll']);
|
|
20496
|
-
if (inWheelScroll || inVirtualScroll || inHeaderScroll || inBodyScroll) {
|
|
20497
|
-
return;
|
|
20498
|
-
}
|
|
20499
20504
|
if (intoRunScroll) {
|
|
20500
20505
|
return;
|
|
20501
20506
|
}
|
|
@@ -20537,8 +20542,14 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20537
20542
|
highlightHoverRow
|
|
20538
20543
|
} = src_props;
|
|
20539
20544
|
const {
|
|
20545
|
+
scrollXLoad,
|
|
20540
20546
|
scrollYLoad
|
|
20541
20547
|
} = reactData;
|
|
20548
|
+
const leftFixedWidth = computeLeftFixedWidth.value;
|
|
20549
|
+
const rightFixedWidth = computeRightFixedWidth.value;
|
|
20550
|
+
if (!(scrollYLoad || leftFixedWidth || rightFixedWidth)) {
|
|
20551
|
+
return;
|
|
20552
|
+
}
|
|
20542
20553
|
const {
|
|
20543
20554
|
elemStore,
|
|
20544
20555
|
lastScrollTop,
|
|
@@ -20548,7 +20559,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20548
20559
|
const xHandleEl = refScrollXHandleElem.value;
|
|
20549
20560
|
const yHandleEl = refScrollYHandleElem.value;
|
|
20550
20561
|
const leftScrollElem = getRefElem(elemStore['left-body-scroll']);
|
|
20562
|
+
const headerScrollElem = getRefElem(elemStore['main-header-scroll']);
|
|
20551
20563
|
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
20564
|
+
const footerScrollElem = getRefElem(elemStore['main-footer-scroll']);
|
|
20552
20565
|
const rightScrollElem = getRefElem(elemStore['right-body-scroll']);
|
|
20553
20566
|
const rowExpandEl = refRowExpandElem.value;
|
|
20554
20567
|
if (!xHandleEl) {
|
|
@@ -20561,24 +20574,43 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20561
20574
|
return;
|
|
20562
20575
|
}
|
|
20563
20576
|
const wheelSpeed = getWheelSpeed(reactData.lastScrollTime);
|
|
20564
|
-
const deltaTop = deltaY * wheelSpeed;
|
|
20565
|
-
const deltaLeft = deltaX * wheelSpeed;
|
|
20577
|
+
const deltaTop = Math.ceil(deltaY * wheelSpeed);
|
|
20578
|
+
const deltaLeft = Math.ceil(deltaX * wheelSpeed);
|
|
20566
20579
|
const isTopWheel = deltaTop < 0;
|
|
20567
20580
|
const currScrollTop = bodyScrollElem.scrollTop;
|
|
20568
20581
|
// 如果滚动位置已经是顶部或底部,则不需要触发
|
|
20569
20582
|
if (isTopWheel ? currScrollTop <= 0 : currScrollTop >= bodyScrollElem.scrollHeight - bodyScrollElem.clientHeight) {
|
|
20570
20583
|
return;
|
|
20571
20584
|
}
|
|
20572
|
-
const scrollTop =
|
|
20585
|
+
const scrollTop = currScrollTop + deltaTop;
|
|
20573
20586
|
const scrollLeft = bodyScrollElem.scrollLeft + deltaLeft;
|
|
20574
20587
|
const isRollX = scrollLeft !== lastScrollLeft;
|
|
20575
20588
|
const isRollY = scrollTop !== lastScrollTop;
|
|
20589
|
+
if (rowOpts.isHover || highlightHoverRow) {
|
|
20590
|
+
$xeTable.clearHoverRow();
|
|
20591
|
+
}
|
|
20576
20592
|
// 用于鼠标纵向滚轮处理
|
|
20593
|
+
if (isRollX) {
|
|
20594
|
+
evnt.preventDefault();
|
|
20595
|
+
internalData.inWheelScroll = true;
|
|
20596
|
+
wheelScrollLeftTo(scrollLeft, offsetLeft => {
|
|
20597
|
+
const currLeftNum = offsetLeft;
|
|
20598
|
+
setScrollLeft(xHandleEl, currLeftNum);
|
|
20599
|
+
setScrollLeft(bodyScrollElem, currLeftNum);
|
|
20600
|
+
setScrollLeft(headerScrollElem, currLeftNum);
|
|
20601
|
+
setScrollLeft(footerScrollElem, currLeftNum);
|
|
20602
|
+
if (scrollXLoad) {
|
|
20603
|
+
$xeTable.triggerScrollXEvent(evnt);
|
|
20604
|
+
}
|
|
20605
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, bodyScrollElem.scrollTop, currLeftNum, {
|
|
20606
|
+
type: 'table',
|
|
20607
|
+
fixed: ''
|
|
20608
|
+
});
|
|
20609
|
+
});
|
|
20610
|
+
}
|
|
20577
20611
|
if (isRollY) {
|
|
20578
|
-
|
|
20579
|
-
|
|
20580
|
-
}
|
|
20581
|
-
wheelScrollTo(scrollTop - bodyScrollElem.scrollTop, offsetTop => {
|
|
20612
|
+
evnt.preventDefault();
|
|
20613
|
+
wheelScrollTopTo(scrollTop - currScrollTop, offsetTop => {
|
|
20582
20614
|
const currTopNum = bodyScrollElem.scrollTop + offsetTop;
|
|
20583
20615
|
internalData.inWheelScroll = true;
|
|
20584
20616
|
setScrollTop(yHandleEl, currTopNum);
|
|
@@ -20589,7 +20621,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
20589
20621
|
if (scrollYLoad) {
|
|
20590
20622
|
$xeTable.triggerScrollYEvent(evnt);
|
|
20591
20623
|
}
|
|
20592
|
-
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, currTopNum, scrollLeft, {
|
|
20624
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, currTopNum, bodyScrollElem.scrollLeft, {
|
|
20593
20625
|
type: 'table',
|
|
20594
20626
|
fixed: ''
|
|
20595
20627
|
});
|
|
@@ -21238,7 +21270,6 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
21238
21270
|
} = props;
|
|
21239
21271
|
const {
|
|
21240
21272
|
overflowX,
|
|
21241
|
-
scrollYLoad,
|
|
21242
21273
|
tableData,
|
|
21243
21274
|
tableColumn,
|
|
21244
21275
|
tableGroupColumn,
|
|
@@ -21249,16 +21280,9 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
21249
21280
|
leftList,
|
|
21250
21281
|
rightList
|
|
21251
21282
|
} = columnStore;
|
|
21252
|
-
const leftFixedWidth = computeLeftFixedWidth.value;
|
|
21253
|
-
const rightFixedWidth = computeRightFixedWidth.value;
|
|
21254
|
-
const ons = {};
|
|
21255
|
-
if (scrollYLoad || leftFixedWidth || rightFixedWidth) {
|
|
21256
|
-
ons.onWheelPassive = $xeTable.triggerBodyWheelEvent;
|
|
21257
|
-
}
|
|
21258
21283
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
21259
21284
|
ref: refTableViewportElem,
|
|
21260
|
-
class: 'vxe-table--viewport-wrapper'
|
|
21261
|
-
...ons
|
|
21285
|
+
class: 'vxe-table--viewport-wrapper'
|
|
21262
21286
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
21263
21287
|
class: 'vxe-table--main-wrapper'
|
|
21264
21288
|
}, [
|
|
@@ -21918,6 +21942,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
21918
21942
|
}
|
|
21919
21943
|
}
|
|
21920
21944
|
});
|
|
21945
|
+
const tableViewportEl = refTableViewportElem.value;
|
|
21946
|
+
if (tableViewportEl) {
|
|
21947
|
+
tableViewportEl.addEventListener('wheel', $xeTable.triggerBodyWheelEvent, {
|
|
21948
|
+
passive: false
|
|
21949
|
+
});
|
|
21950
|
+
}
|
|
21921
21951
|
table_globalEvents.on($xeTable, 'paste', handleGlobalPasteEvent);
|
|
21922
21952
|
table_globalEvents.on($xeTable, 'copy', handleGlobalCopyEvent);
|
|
21923
21953
|
table_globalEvents.on($xeTable, 'cut', handleGlobalCutEvent);
|
|
@@ -21932,6 +21962,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
|
21932
21962
|
});
|
|
21933
21963
|
});
|
|
21934
21964
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
21965
|
+
const tableViewportEl = refTableViewportElem.value;
|
|
21966
|
+
if (tableViewportEl) {
|
|
21967
|
+
tableViewportEl.removeEventListener('wheel', $xeTable.triggerBodyWheelEvent);
|
|
21968
|
+
}
|
|
21935
21969
|
if (resizeObserver) {
|
|
21936
21970
|
resizeObserver.disconnect();
|
|
21937
21971
|
}
|