vxe-table 3.20.1 → 3.20.2
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/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/body.js +4 -2
- package/es/table/src/methods.js +10 -7
- package/es/table/src/table.js +16 -1
- package/es/table/src/util.js +1 -2
- package/es/table/style.css +2 -2
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +2 -2
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +31 -11
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +5 -2
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +5 -5
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +18 -0
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +1 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +2 -2
- package/lib/table/style/style.min.css +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/lib/vxe-table/style/style.css +2 -2
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/src/body.ts +4 -2
- package/packages/table/src/methods.ts +10 -7
- package/packages/table/src/table.ts +18 -2
- package/packages/table/src/util.ts +2 -2
- package/styles/components/table.scss +2 -2
- package/styles/theme/base.scss +3 -0
- /package/es/{iconfont.1773109164685.ttf → iconfont.1773303132392.ttf} +0 -0
- /package/es/{iconfont.1773109164685.woff → iconfont.1773303132392.woff} +0 -0
- /package/es/{iconfont.1773109164685.woff2 → iconfont.1773303132392.woff2} +0 -0
- /package/lib/{iconfont.1773109164685.ttf → iconfont.1773303132392.ttf} +0 -0
- /package/lib/{iconfont.1773109164685.woff → iconfont.1773303132392.woff} +0 -0
- /package/lib/{iconfont.1773109164685.woff2 → iconfont.1773303132392.woff2} +0 -0
package/es/table/src/body.js
CHANGED
|
@@ -11,9 +11,11 @@ const renderType = 'body';
|
|
|
11
11
|
const isVMScrollProcess = ($xeTable) => {
|
|
12
12
|
const tableProps = $xeTable;
|
|
13
13
|
const tableReactData = $xeTable;
|
|
14
|
+
const tableInternalData = $xeTable;
|
|
14
15
|
const { delayHover } = tableProps;
|
|
15
|
-
const {
|
|
16
|
-
|
|
16
|
+
const { isDragResize } = tableReactData;
|
|
17
|
+
const { lastSTime } = tableInternalData;
|
|
18
|
+
return !!(isDragResize || (lastSTime && Date.now() < lastSTime + delayHover));
|
|
17
19
|
};
|
|
18
20
|
function renderLine(h, $xeTable, rowid, params, cellHeight) {
|
|
19
21
|
const tableProps = $xeTable;
|
package/es/table/src/methods.js
CHANGED
|
@@ -3357,7 +3357,7 @@ function loadTableData($xeTable, datas, isReload, isReset) {
|
|
|
3357
3357
|
if (reactData.expandColumn && expandOpts.mode !== 'fixed') {
|
|
3358
3358
|
errLog('vxe.error.notConflictProp', ['column.type="expand', 'expand-config.mode="fixed"']);
|
|
3359
3359
|
}
|
|
3360
|
-
if (virtualYOpts.mode === 'scroll' && expandOpts.mode === 'fixed') {
|
|
3360
|
+
if (virtualYOpts.mode === 'scroll' && reactData.expandColumn && expandOpts.mode === 'fixed') {
|
|
3361
3361
|
warnLog('vxe.error.notConflictProp', ['virtual-y-config.mode=scroll', 'expand-config.mode=inside']);
|
|
3362
3362
|
}
|
|
3363
3363
|
// if (showOverflow) {
|
|
@@ -3862,7 +3862,7 @@ function handleSyncScroll($xeTable, isRollX, isRollY) {
|
|
|
3862
3862
|
return Promise.all([
|
|
3863
3863
|
xRest,
|
|
3864
3864
|
yRest,
|
|
3865
|
-
$xeTable.updateCellAreas()
|
|
3865
|
+
scrollXLoad || scrollYLoad ? $xeTable.updateCellAreas() : null
|
|
3866
3866
|
]);
|
|
3867
3867
|
}
|
|
3868
3868
|
function checkLastSyncScroll($xeTable, isRollX, isRollY) {
|
|
@@ -11074,7 +11074,6 @@ const tableMethods = {
|
|
|
11074
11074
|
handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, params) {
|
|
11075
11075
|
const $xeTable = this;
|
|
11076
11076
|
const props = $xeTable;
|
|
11077
|
-
const reactData = $xeTable;
|
|
11078
11077
|
const internalData = $xeTable;
|
|
11079
11078
|
const { highlightHoverRow } = props;
|
|
11080
11079
|
const { lastScrollLeft, lastScrollTop } = internalData;
|
|
@@ -11140,7 +11139,7 @@ const tableMethods = {
|
|
|
11140
11139
|
}
|
|
11141
11140
|
internalData.lastScrollTop = scrollTop;
|
|
11142
11141
|
}
|
|
11143
|
-
|
|
11142
|
+
internalData.lastSTime = Date.now();
|
|
11144
11143
|
const evntParams = Object.assign({ source: sourceType, scrollTop,
|
|
11145
11144
|
scrollLeft,
|
|
11146
11145
|
bodyHeight,
|
|
@@ -11396,7 +11395,7 @@ const tableMethods = {
|
|
|
11396
11395
|
if (!bodyScrollElem) {
|
|
11397
11396
|
return;
|
|
11398
11397
|
}
|
|
11399
|
-
const wheelSpeed = getWheelSpeed(
|
|
11398
|
+
const wheelSpeed = getWheelSpeed(internalData.lastSTime);
|
|
11400
11399
|
const deltaTop = shiftKey ? 0 : (deltaY * wheelSpeed);
|
|
11401
11400
|
const deltaLeft = (shiftKey ? (deltaX || deltaY) : deltaX) * wheelSpeed;
|
|
11402
11401
|
const currScrollTop = bodyScrollElem.scrollTop;
|
|
@@ -11883,14 +11882,18 @@ const tableMethods = {
|
|
|
11883
11882
|
setScrollLeft(bodyScrollElem, scrollLeft);
|
|
11884
11883
|
setScrollLeft(headerScrollElem, scrollLeft);
|
|
11885
11884
|
setScrollLeft(footerScrollElem, scrollLeft);
|
|
11886
|
-
|
|
11885
|
+
if (reactData.scrollXLoad) {
|
|
11886
|
+
loadScrollXData($xeTable);
|
|
11887
|
+
}
|
|
11887
11888
|
}
|
|
11888
11889
|
if (XEUtils.isNumber(scrollTop)) {
|
|
11889
11890
|
setScrollTop(yHandleEl, scrollTop);
|
|
11890
11891
|
setScrollTop(bodyScrollElem, scrollTop);
|
|
11891
11892
|
setScrollTop(leftScrollElem, scrollTop);
|
|
11892
11893
|
setScrollTop(rightScrollElem, scrollTop);
|
|
11893
|
-
|
|
11894
|
+
if (reactData.scrollYLoad) {
|
|
11895
|
+
loadScrollYData($xeTable);
|
|
11896
|
+
}
|
|
11894
11897
|
}
|
|
11895
11898
|
return new Promise(resolve => {
|
|
11896
11899
|
setTimeout(() => {
|
package/es/table/src/table.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { getFuncText, isEnableConf } from '../../ui/src/utils';
|
|
3
|
-
import { initTpImg } from '../../ui/src/dom';
|
|
3
|
+
import { initTpImg, toCssUnit } from '../../ui/src/dom';
|
|
4
4
|
import { createReactData, createInternalData, createHandleGetRowId, getCalcHeight, hasDeepKey } from './util';
|
|
5
5
|
import { VxeUI } from '../../ui';
|
|
6
6
|
import methods from './methods';
|
|
@@ -1136,6 +1136,19 @@ export default {
|
|
|
1136
1136
|
}
|
|
1137
1137
|
return '';
|
|
1138
1138
|
},
|
|
1139
|
+
computeTableStyle() {
|
|
1140
|
+
const $xeTable = this;
|
|
1141
|
+
const scrollbarOpts = $xeTable.computeScrollbarOpts;
|
|
1142
|
+
const { width, height } = scrollbarOpts;
|
|
1143
|
+
const tStys = {};
|
|
1144
|
+
if (width) {
|
|
1145
|
+
tStys['--vxe-ui-table-view-scrollbar-width'] = toCssUnit(width);
|
|
1146
|
+
}
|
|
1147
|
+
if (height) {
|
|
1148
|
+
tStys['--vxe-ui-table-view-scrollbar-height'] = toCssUnit(height);
|
|
1149
|
+
}
|
|
1150
|
+
return tStys;
|
|
1151
|
+
},
|
|
1139
1152
|
computeTableRowExpandedList() {
|
|
1140
1153
|
const $xeTable = this;
|
|
1141
1154
|
const reactData = $xeTable;
|
|
@@ -1919,6 +1932,7 @@ export default {
|
|
|
1919
1932
|
footer: slots.footerTooltip || slots['footer-tooltip']
|
|
1920
1933
|
};
|
|
1921
1934
|
const currTooltipSlot = tooltipStore.visible && tooltipStore.type ? tipSlots[tooltipStore.type] : null;
|
|
1935
|
+
const tableStyle = $xeTable.computeTableStyle;
|
|
1922
1936
|
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
1923
1937
|
const tableTipConfig = $xeTable.computeTableTipConfig;
|
|
1924
1938
|
const validTipConfig = $xeTable.computeValidTipConfig;
|
|
@@ -1986,6 +2000,7 @@ export default {
|
|
|
1986
2000
|
'is--virtual-x': scrollXLoad,
|
|
1987
2001
|
'is--virtual-y': scrollYLoad
|
|
1988
2002
|
}],
|
|
2003
|
+
style: tableStyle,
|
|
1989
2004
|
attrs: {
|
|
1990
2005
|
spellcheck: false
|
|
1991
2006
|
},
|
package/es/table/src/util.js
CHANGED
|
@@ -124,6 +124,7 @@ export function createInternalData() {
|
|
|
124
124
|
tFooterHeight: 0,
|
|
125
125
|
teleportToWrapperElem: null,
|
|
126
126
|
popupToWrapperElem: null,
|
|
127
|
+
lastSTime: 0,
|
|
127
128
|
inited: false,
|
|
128
129
|
tooltipTimeout: null,
|
|
129
130
|
initStatus: false,
|
|
@@ -153,8 +154,6 @@ export function createReactData() {
|
|
|
153
154
|
scrollbarWidth: 0,
|
|
154
155
|
// 横向滚动条的高度
|
|
155
156
|
scrollbarHeight: 0,
|
|
156
|
-
// 最后滚动时间戳
|
|
157
|
-
lastScrollTime: 0,
|
|
158
157
|
// 行高
|
|
159
158
|
rowHeight: 0,
|
|
160
159
|
// 表格父容器的高度
|
package/es/table/style.css
CHANGED
|
@@ -2415,7 +2415,7 @@
|
|
|
2415
2415
|
.vxe-table .vxe-table--scroll-x-handle {
|
|
2416
2416
|
overflow-y: hidden;
|
|
2417
2417
|
overflow-x: scroll;
|
|
2418
|
-
height:
|
|
2418
|
+
height: var(--vxe-ui-table-view-scrollbar-height);
|
|
2419
2419
|
}
|
|
2420
2420
|
.vxe-table .vxe-table--scroll-y-handle,
|
|
2421
2421
|
.vxe-table .vxe-table--scroll-y-wrapper {
|
|
@@ -2427,7 +2427,7 @@
|
|
|
2427
2427
|
.vxe-table .vxe-table--scroll-y-handle {
|
|
2428
2428
|
overflow-y: scroll;
|
|
2429
2429
|
overflow-x: hidden;
|
|
2430
|
-
width:
|
|
2430
|
+
width: var(--vxe-ui-table-view-scrollbar-width);
|
|
2431
2431
|
height: 100%;
|
|
2432
2432
|
}
|
|
2433
2433
|
.vxe-table .vxe-table--scroll-x-space {
|