vxe-table 3.12.16 → 3.12.17
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/module/edit/mixin.js +5 -5
- package/es/table/src/body.js +60 -47
- package/es/table/src/methods.js +123 -24
- package/es/table/src/table.js +101 -23
- package/es/table/style.css +26 -0
- 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 +26 -0
- 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 +350 -113
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/edit/mixin.js +10 -5
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/src/body.js +71 -59
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +141 -23
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +126 -24
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +26 -0
- 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 +26 -0
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/module/edit/mixin.ts +5 -5
- package/packages/table/src/body.ts +62 -48
- package/packages/table/src/methods.ts +125 -24
- package/packages/table/src/table.ts +108 -24
- package/styles/components/table.scss +26 -0
- /package/es/{iconfont.1739333092714.ttf → iconfont.1739428244406.ttf} +0 -0
- /package/es/{iconfont.1739333092714.woff → iconfont.1739428244406.woff} +0 -0
- /package/es/{iconfont.1739333092714.woff2 → iconfont.1739428244406.woff2} +0 -0
- /package/lib/{iconfont.1739333092714.ttf → iconfont.1739428244406.ttf} +0 -0
- /package/lib/{iconfont.1739333092714.woff → iconfont.1739428244406.woff} +0 -0
- /package/lib/{iconfont.1739333092714.woff2 → iconfont.1739428244406.woff2} +0 -0
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.12.
|
|
2223
|
+
const version = "3.12.17";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2842,7 +2842,7 @@ function isNodeElement(elem) {
|
|
|
2842
2842
|
const {
|
|
2843
2843
|
log: log_log
|
|
2844
2844
|
} = core_.VxeUI;
|
|
2845
|
-
const log_version = `table v${"3.12.
|
|
2845
|
+
const log_version = `table v${"3.12.17"}`;
|
|
2846
2846
|
const warnLog = log_log.create('warn', log_version);
|
|
2847
2847
|
const errLog = log_log.create('error', log_version);
|
|
2848
2848
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -5450,7 +5450,8 @@ function updateAfterListIndex($xeTable) {
|
|
|
5450
5450
|
level: 0,
|
|
5451
5451
|
height: 0,
|
|
5452
5452
|
resizeHeight: 0,
|
|
5453
|
-
oTop: 0
|
|
5453
|
+
oTop: 0,
|
|
5454
|
+
expandHeight: 0
|
|
5454
5455
|
};
|
|
5455
5456
|
fullAllDataRowIdData[rowid] = rest;
|
|
5456
5457
|
fullDataRowIdData[rowid] = rest;
|
|
@@ -5502,7 +5503,8 @@ function updateAfterDataIndex($xeTable) {
|
|
|
5502
5503
|
level: 0,
|
|
5503
5504
|
height: 0,
|
|
5504
5505
|
resizeHeight: 0,
|
|
5505
|
-
oTop: 0
|
|
5506
|
+
oTop: 0,
|
|
5507
|
+
expandHeight: 0
|
|
5506
5508
|
};
|
|
5507
5509
|
fullAllDataRowIdData[rowid] = rest;
|
|
5508
5510
|
fullDataRowIdData[rowid] = rest;
|
|
@@ -5608,6 +5610,7 @@ function updateStyle($xeTable) {
|
|
|
5608
5610
|
const emptyPlaceholderElem = $xeTable.$refs.refEmptyPlaceholder;
|
|
5609
5611
|
const cellOffsetWidth = $xeTable.computeCellOffsetWidth;
|
|
5610
5612
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
5613
|
+
const expandOpts = $xeTable.computeExpandOpts;
|
|
5611
5614
|
const bodyWrapperElem = getRefElem(elemStore['main-body-wrapper']);
|
|
5612
5615
|
const bodyTableElem = getRefElem(elemStore['main-body-table']);
|
|
5613
5616
|
if (emptyPlaceholderElem) {
|
|
@@ -5677,6 +5680,11 @@ function updateStyle($xeTable) {
|
|
|
5677
5680
|
yBottomCornerEl.style.top = `${headerHeight + bodyHeight}px`;
|
|
5678
5681
|
yBottomCornerEl.style.display = footerHeight ? 'block' : '';
|
|
5679
5682
|
}
|
|
5683
|
+
const rowExpandEl = $xeTable.$refs.refRowExpandElem;
|
|
5684
|
+
if (rowExpandEl) {
|
|
5685
|
+
rowExpandEl.style.height = `${bodyHeight}px`;
|
|
5686
|
+
rowExpandEl.style.top = `${headerHeight}px`;
|
|
5687
|
+
}
|
|
5680
5688
|
containerList.forEach((name, index) => {
|
|
5681
5689
|
const fixedType = index > 0 ? name : '';
|
|
5682
5690
|
const layoutList = ['header', 'body', 'footer'];
|
|
@@ -5786,7 +5794,7 @@ function updateStyle($xeTable) {
|
|
|
5786
5794
|
let isOptimizeMode = false;
|
|
5787
5795
|
// 如果是使用优化模式
|
|
5788
5796
|
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
5789
|
-
if (expandColumn || spanMethod || footerSpanMethod) {
|
|
5797
|
+
if (expandColumn && expandOpts.mode !== 'fixed' || spanMethod || footerSpanMethod) {
|
|
5790
5798
|
// 如果不支持优化模式
|
|
5791
5799
|
} else {
|
|
5792
5800
|
isOptimizeMode = true;
|
|
@@ -5912,6 +5920,15 @@ function updateStyle($xeTable) {
|
|
|
5912
5920
|
}
|
|
5913
5921
|
return $xeTable.$nextTick();
|
|
5914
5922
|
}
|
|
5923
|
+
function calcVarRowHeightConfig($xeTable, sizeKey, sizeEl) {
|
|
5924
|
+
const reactData = $xeTable;
|
|
5925
|
+
const {
|
|
5926
|
+
rowHeightStore
|
|
5927
|
+
} = reactData;
|
|
5928
|
+
if (sizeEl && sizeEl.clientHeight) {
|
|
5929
|
+
rowHeightStore[sizeKey] = sizeEl.clientHeight;
|
|
5930
|
+
}
|
|
5931
|
+
}
|
|
5915
5932
|
function computeRowHeight($xeTable) {
|
|
5916
5933
|
const reactData = $xeTable;
|
|
5917
5934
|
const {
|
|
@@ -5947,7 +5964,9 @@ function handleVirtualYVisible($xeTable, currScrollTop) {
|
|
|
5947
5964
|
const reactData = $xeTable;
|
|
5948
5965
|
const internalData = $xeTable;
|
|
5949
5966
|
const {
|
|
5950
|
-
isAllOverflow
|
|
5967
|
+
isAllOverflow,
|
|
5968
|
+
expandColumn,
|
|
5969
|
+
rowExpandedMaps
|
|
5951
5970
|
} = reactData;
|
|
5952
5971
|
const {
|
|
5953
5972
|
elemStore,
|
|
@@ -5955,6 +5974,7 @@ function handleVirtualYVisible($xeTable, currScrollTop) {
|
|
|
5955
5974
|
afterFullData,
|
|
5956
5975
|
fullAllDataRowIdData
|
|
5957
5976
|
} = internalData;
|
|
5977
|
+
const expandOpts = $xeTable.computeExpandOpts;
|
|
5958
5978
|
const rowOpts = $xeTable.computeRowOpts;
|
|
5959
5979
|
const cellOpts = $xeTable.computeCellOpts;
|
|
5960
5980
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
@@ -5967,7 +5987,7 @@ function handleVirtualYVisible($xeTable, currScrollTop) {
|
|
|
5967
5987
|
let offsetTop = 0;
|
|
5968
5988
|
let visibleSize = 0;
|
|
5969
5989
|
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
|
|
5970
|
-
if (!isCustomCellHeight && isAllOverflow) {
|
|
5990
|
+
if (!isCustomCellHeight && !expandColumn && isAllOverflow) {
|
|
5971
5991
|
toVisibleIndex = Math.floor(scrollTop / defaultRowHeight);
|
|
5972
5992
|
visibleSize = Math.ceil(clientHeight / defaultRowHeight) + 1;
|
|
5973
5993
|
} else {
|
|
@@ -5985,6 +6005,10 @@ function handleVirtualYVisible($xeTable, currScrollTop) {
|
|
|
5985
6005
|
break;
|
|
5986
6006
|
}
|
|
5987
6007
|
}
|
|
6008
|
+
// 是否展开行
|
|
6009
|
+
if (expandColumn && rowExpandedMaps[rowid]) {
|
|
6010
|
+
offsetTop += rowRest.expandHeight || expandOpts.height || 0;
|
|
6011
|
+
}
|
|
5988
6012
|
}
|
|
5989
6013
|
}
|
|
5990
6014
|
return {
|
|
@@ -6684,9 +6708,18 @@ function handleRecalculateLayout($xeTable, reFull) {
|
|
|
6684
6708
|
if (!el || !el.clientWidth) {
|
|
6685
6709
|
return $xeTable.$nextTick();
|
|
6686
6710
|
}
|
|
6711
|
+
const varEl = $xeTable.$refs.refVarElem;
|
|
6712
|
+
if (varEl) {
|
|
6713
|
+
const [defEl, mediumEl, smallEl, miniEl] = varEl.children;
|
|
6714
|
+
calcVarRowHeightConfig($xeTable, 'default', defEl);
|
|
6715
|
+
calcVarRowHeightConfig($xeTable, 'medium', mediumEl);
|
|
6716
|
+
calcVarRowHeightConfig($xeTable, 'small', smallEl);
|
|
6717
|
+
calcVarRowHeightConfig($xeTable, 'mini', miniEl);
|
|
6718
|
+
}
|
|
6687
6719
|
calcCellWidth($xeTable);
|
|
6688
6720
|
autoCellWidth($xeTable);
|
|
6689
6721
|
updateStyle($xeTable);
|
|
6722
|
+
updateRowExpandStyle($xeTable);
|
|
6690
6723
|
return computeScrollLoad($xeTable).then(() => {
|
|
6691
6724
|
if (reFull === true) {
|
|
6692
6725
|
// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
|
|
@@ -6694,6 +6727,7 @@ function handleRecalculateLayout($xeTable, reFull) {
|
|
|
6694
6727
|
calcCellWidth($xeTable);
|
|
6695
6728
|
autoCellWidth($xeTable);
|
|
6696
6729
|
updateStyle($xeTable);
|
|
6730
|
+
updateRowExpandStyle($xeTable);
|
|
6697
6731
|
return computeScrollLoad($xeTable);
|
|
6698
6732
|
}
|
|
6699
6733
|
});
|
|
@@ -7176,7 +7210,7 @@ function calcCellWidth($xeTable) {
|
|
|
7176
7210
|
el.removeAttribute('data-calc-col');
|
|
7177
7211
|
}
|
|
7178
7212
|
}
|
|
7179
|
-
|
|
7213
|
+
function handleUpdateColResize($xeTable, evnt, params) {
|
|
7180
7214
|
$xeTable.analyColumnWidth();
|
|
7181
7215
|
$xeTable.recalculate(true).then(() => {
|
|
7182
7216
|
$xeTable.saveCustomStore('update:width');
|
|
@@ -7186,8 +7220,8 @@ const handleUpdateColResize = ($xeTable, evnt, params) => {
|
|
|
7186
7220
|
$xeTable.dispatchEvent('resizable-change', params, evnt);
|
|
7187
7221
|
setTimeout(() => $xeTable.recalculate(true), 300);
|
|
7188
7222
|
});
|
|
7189
|
-
}
|
|
7190
|
-
|
|
7223
|
+
}
|
|
7224
|
+
function handleUpdateRowResize($xeTable, evnt, params) {
|
|
7191
7225
|
const reactData = $xeTable;
|
|
7192
7226
|
reactData.resizeHeightFlag++;
|
|
7193
7227
|
$xeTable.recalculate(true).then(() => {
|
|
@@ -7195,7 +7229,74 @@ const handleUpdateRowResize = ($xeTable, evnt, params) => {
|
|
|
7195
7229
|
$xeTable.dispatchEvent('row-resizable-change', params, evnt);
|
|
7196
7230
|
setTimeout(() => $xeTable.recalculate(true), 300);
|
|
7197
7231
|
});
|
|
7198
|
-
}
|
|
7232
|
+
}
|
|
7233
|
+
function updateRowExpandStyle($xeTable) {
|
|
7234
|
+
const reactData = $xeTable;
|
|
7235
|
+
const internalData = $xeTable;
|
|
7236
|
+
const {
|
|
7237
|
+
expandColumn,
|
|
7238
|
+
scrollYLoad,
|
|
7239
|
+
rowExpandedMaps
|
|
7240
|
+
} = reactData;
|
|
7241
|
+
const expandOpts = $xeTable.computeExpandOpts;
|
|
7242
|
+
const rowOpts = $xeTable.computeRowOpts;
|
|
7243
|
+
const cellOpts = $xeTable.computeCellOpts;
|
|
7244
|
+
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
7245
|
+
const {
|
|
7246
|
+
mode
|
|
7247
|
+
} = expandOpts;
|
|
7248
|
+
if (expandColumn && mode === 'fixed') {
|
|
7249
|
+
const {
|
|
7250
|
+
elemStore,
|
|
7251
|
+
afterFullData,
|
|
7252
|
+
fullAllDataRowIdData
|
|
7253
|
+
} = internalData;
|
|
7254
|
+
const rowExpandEl = $xeTable.$refs.refRowExpandElem;
|
|
7255
|
+
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
7256
|
+
if (rowExpandEl && bodyScrollElem) {
|
|
7257
|
+
let isUpdateHeight = false;
|
|
7258
|
+
if (scrollYLoad) {
|
|
7259
|
+
let offsetTop = 0;
|
|
7260
|
+
for (let rIndex = 0, rLen = afterFullData.length; rIndex < rLen; rIndex++) {
|
|
7261
|
+
const row = afterFullData[rIndex];
|
|
7262
|
+
const rowid = getRowid($xeTable, row);
|
|
7263
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
7264
|
+
rowRest.oTop = offsetTop;
|
|
7265
|
+
offsetTop += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
|
|
7266
|
+
// 是否展开行
|
|
7267
|
+
if (expandColumn && rowExpandedMaps[rowid]) {
|
|
7268
|
+
offsetTop += rowRest.expandHeight || expandOpts.height || 0;
|
|
7269
|
+
}
|
|
7270
|
+
}
|
|
7271
|
+
}
|
|
7272
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(rowExpandEl.children, reEl => {
|
|
7273
|
+
const expandEl = reEl;
|
|
7274
|
+
const rowid = expandEl.getAttribute('rowid') || '';
|
|
7275
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
7276
|
+
if (rowRest) {
|
|
7277
|
+
const expandHeight = expandEl.offsetHeight + 1;
|
|
7278
|
+
if (scrollYLoad) {
|
|
7279
|
+
expandEl.style.top = toCssUnit(rowRest.oTop + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight));
|
|
7280
|
+
} else {
|
|
7281
|
+
const trEl = bodyScrollElem.querySelector(`.vxe-body--row[rowid="${rowid}"]`);
|
|
7282
|
+
if (trEl) {
|
|
7283
|
+
expandEl.style.top = toCssUnit(trEl.offsetTop + trEl.offsetHeight);
|
|
7284
|
+
}
|
|
7285
|
+
}
|
|
7286
|
+
if (!isUpdateHeight) {
|
|
7287
|
+
if (rowRest.expandHeight !== expandHeight) {
|
|
7288
|
+
isUpdateHeight = true;
|
|
7289
|
+
}
|
|
7290
|
+
}
|
|
7291
|
+
rowRest.expandHeight = expandHeight;
|
|
7292
|
+
}
|
|
7293
|
+
});
|
|
7294
|
+
if (isUpdateHeight) {
|
|
7295
|
+
reactData.rowExpandHeightFlag++;
|
|
7296
|
+
}
|
|
7297
|
+
}
|
|
7298
|
+
}
|
|
7299
|
+
}
|
|
7199
7300
|
const Methods = {
|
|
7200
7301
|
callSlot(slotFunc, params, h, vNodes) {
|
|
7201
7302
|
if (slotFunc) {
|
|
@@ -7626,7 +7727,8 @@ const Methods = {
|
|
|
7626
7727
|
level,
|
|
7627
7728
|
height: 0,
|
|
7628
7729
|
resizeHeight: 0,
|
|
7629
|
-
oTop: 0
|
|
7730
|
+
oTop: 0,
|
|
7731
|
+
expandHeight: 0
|
|
7630
7732
|
};
|
|
7631
7733
|
}
|
|
7632
7734
|
cacheItem.row = row;
|
|
@@ -7732,7 +7834,8 @@ const Methods = {
|
|
|
7732
7834
|
level: parentLevel + nodes.length,
|
|
7733
7835
|
height: 0,
|
|
7734
7836
|
resizeHeight: 0,
|
|
7735
|
-
oTop: 0
|
|
7837
|
+
oTop: 0,
|
|
7838
|
+
expandHeight: 0
|
|
7736
7839
|
};
|
|
7737
7840
|
fullDataRowIdData[rowid] = rest;
|
|
7738
7841
|
fullAllDataRowIdData[rowid] = rest;
|
|
@@ -9841,6 +9944,7 @@ const Methods = {
|
|
|
9841
9944
|
const el = $xeTable.$refs.refElem;
|
|
9842
9945
|
if (el && el.clientWidth) {
|
|
9843
9946
|
autoCellWidth($xeTable);
|
|
9947
|
+
updateRowExpandStyle($xeTable);
|
|
9844
9948
|
}
|
|
9845
9949
|
if (rceTimeout) {
|
|
9846
9950
|
clearTimeout(rceTimeout);
|
|
@@ -14236,6 +14340,7 @@ const Methods = {
|
|
|
14236
14340
|
direction,
|
|
14237
14341
|
...params
|
|
14238
14342
|
};
|
|
14343
|
+
updateRowExpandStyle($xeTable);
|
|
14239
14344
|
checkLastSyncScroll($xeTable, isRollX, isRollY);
|
|
14240
14345
|
if (rowOpts.isHover || highlightHoverRow) {
|
|
14241
14346
|
$xeTable.clearHoverRow();
|
|
@@ -14302,6 +14407,7 @@ const Methods = {
|
|
|
14302
14407
|
const rightScrollElem = getRefElem(elemStore['right-body-scroll']);
|
|
14303
14408
|
const headerScrollElem = getRefElem(elemStore['main-header-scroll']);
|
|
14304
14409
|
const footerScrollElem = getRefElem(elemStore['main-footer-scroll']);
|
|
14410
|
+
const rowExpandEl = $xeTable.$refs.refRowExpandElem;
|
|
14305
14411
|
if (inWheelScroll || inVirtualScroll || inHeaderScroll || inFooterScroll) {
|
|
14306
14412
|
return;
|
|
14307
14413
|
}
|
|
@@ -14348,6 +14454,7 @@ const Methods = {
|
|
|
14348
14454
|
setScrollTop(rightScrollElem, scrollTop);
|
|
14349
14455
|
}
|
|
14350
14456
|
setScrollTop(yHandleEl, scrollTop);
|
|
14457
|
+
setScrollTop(rowExpandEl, scrollTop);
|
|
14351
14458
|
if (scrollYLoad) {
|
|
14352
14459
|
$xeTable.triggerScrollYEvent(evnt);
|
|
14353
14460
|
}
|
|
@@ -14497,6 +14604,7 @@ const Methods = {
|
|
|
14497
14604
|
const leftScrollElem = getRefElem(elemStore['left-body-scroll']);
|
|
14498
14605
|
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
14499
14606
|
const rightScrollElem = getRefElem(elemStore['right-body-scroll']);
|
|
14607
|
+
const rowExpandEl = $xeTable.$refs.refRowExpandElem;
|
|
14500
14608
|
if (!xHandleEl) {
|
|
14501
14609
|
return;
|
|
14502
14610
|
}
|
|
@@ -14532,6 +14640,7 @@ const Methods = {
|
|
|
14532
14640
|
setScrollTop(bodyScrollElem, currTopNum);
|
|
14533
14641
|
setScrollTop(leftScrollElem, currTopNum);
|
|
14534
14642
|
setScrollTop(rightScrollElem, currTopNum);
|
|
14643
|
+
setScrollTop(rowExpandEl, currTopNum);
|
|
14535
14644
|
if (scrollYLoad) {
|
|
14536
14645
|
$xeTable.triggerScrollYEvent(evnt);
|
|
14537
14646
|
}
|
|
@@ -14540,16 +14649,6 @@ const Methods = {
|
|
|
14540
14649
|
fixed: ''
|
|
14541
14650
|
});
|
|
14542
14651
|
});
|
|
14543
|
-
// internalData.inWheelScroll = true
|
|
14544
|
-
// setScrollTop(yHandleEl, scrollTop)
|
|
14545
|
-
// setScrollTop(bodyScrollElem, scrollTop)
|
|
14546
|
-
// setScrollTop(leftScrollElem, scrollTop)
|
|
14547
|
-
// setScrollTop(rightScrollElem, scrollTop)
|
|
14548
|
-
// loadScrollYData($xeTable, scrollTop)
|
|
14549
|
-
// $xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
14550
|
-
// type: 'footer',
|
|
14551
|
-
// fixed: ''
|
|
14552
|
-
// })
|
|
14553
14652
|
}
|
|
14554
14653
|
},
|
|
14555
14654
|
triggerVirtualScrollXEvent(evnt) {
|
|
@@ -14624,6 +14723,7 @@ const Methods = {
|
|
|
14624
14723
|
const leftScrollElem = getRefElem(elemStore['left-body-scroll']);
|
|
14625
14724
|
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
14626
14725
|
const rightScrollElem = getRefElem(elemStore['right-body-scroll']);
|
|
14726
|
+
const rowExpandEl = $xeTable.$refs.refRowExpandElem;
|
|
14627
14727
|
const xHandleEl = $xeTable.$refs.refScrollXHandleElem;
|
|
14628
14728
|
const wrapperEl = evnt.currentTarget;
|
|
14629
14729
|
const {
|
|
@@ -14640,6 +14740,7 @@ const Methods = {
|
|
|
14640
14740
|
setScrollTop(bodyScrollElem, scrollTop);
|
|
14641
14741
|
setScrollTop(leftScrollElem, scrollTop);
|
|
14642
14742
|
setScrollTop(rightScrollElem, scrollTop);
|
|
14743
|
+
setScrollTop(rowExpandEl, scrollTop);
|
|
14643
14744
|
if (scrollYLoad) {
|
|
14644
14745
|
$xeTable.triggerScrollYEvent(evnt);
|
|
14645
14746
|
}
|
|
@@ -14655,6 +14756,7 @@ const Methods = {
|
|
|
14655
14756
|
isAllOverflow
|
|
14656
14757
|
} = reactData;
|
|
14657
14758
|
handleTableColumn($xeTable);
|
|
14759
|
+
$xeTable.updateScrollXSpace();
|
|
14658
14760
|
return $xeTable.$nextTick().then(() => {
|
|
14659
14761
|
handleTableColumn($xeTable);
|
|
14660
14762
|
$xeTable.updateScrollXSpace();
|
|
@@ -14722,6 +14824,7 @@ const Methods = {
|
|
|
14722
14824
|
updateScrollYData() {
|
|
14723
14825
|
const $xeTable = this;
|
|
14724
14826
|
$xeTable.handleTableData();
|
|
14827
|
+
$xeTable.updateScrollYSpace();
|
|
14725
14828
|
return $xeTable.$nextTick().then(() => {
|
|
14726
14829
|
$xeTable.handleTableData();
|
|
14727
14830
|
$xeTable.updateScrollYSpace();
|
|
@@ -14734,7 +14837,9 @@ const Methods = {
|
|
|
14734
14837
|
const internalData = $xeTable;
|
|
14735
14838
|
const {
|
|
14736
14839
|
isAllOverflow,
|
|
14737
|
-
scrollYLoad
|
|
14840
|
+
scrollYLoad,
|
|
14841
|
+
expandColumn,
|
|
14842
|
+
rowExpandedMaps
|
|
14738
14843
|
} = reactData;
|
|
14739
14844
|
const {
|
|
14740
14845
|
scrollYStore,
|
|
@@ -14746,6 +14851,7 @@ const Methods = {
|
|
|
14746
14851
|
const {
|
|
14747
14852
|
startIndex
|
|
14748
14853
|
} = scrollYStore;
|
|
14854
|
+
const expandOpts = $xeTable.computeExpandOpts;
|
|
14749
14855
|
const rowOpts = $xeTable.computeRowOpts;
|
|
14750
14856
|
const cellOpts = $xeTable.computeCellOpts;
|
|
14751
14857
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
@@ -14755,7 +14861,7 @@ const Methods = {
|
|
|
14755
14861
|
let ySpaceHeight = 0;
|
|
14756
14862
|
if (scrollYLoad) {
|
|
14757
14863
|
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
|
|
14758
|
-
if (!isCustomCellHeight && isAllOverflow) {
|
|
14864
|
+
if (!isCustomCellHeight && !expandColumn && isAllOverflow) {
|
|
14759
14865
|
ySpaceHeight = afterFullData.length * defaultRowHeight;
|
|
14760
14866
|
topSpaceHeight = Math.max(0, startIndex * defaultRowHeight);
|
|
14761
14867
|
} else {
|
|
@@ -14764,12 +14870,20 @@ const Methods = {
|
|
|
14764
14870
|
const rowid = getRowid($xeTable, row);
|
|
14765
14871
|
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
14766
14872
|
ySpaceHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
|
|
14873
|
+
// 是否展开行
|
|
14874
|
+
if (expandColumn && rowExpandedMaps[rowid]) {
|
|
14875
|
+
ySpaceHeight += rowRest.expandHeight || expandOpts.height || 0;
|
|
14876
|
+
}
|
|
14767
14877
|
}
|
|
14768
14878
|
for (let i = 0; i < startIndex; i++) {
|
|
14769
14879
|
const row = afterFullData[i];
|
|
14770
14880
|
const rowid = getRowid($xeTable, row);
|
|
14771
14881
|
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
14772
14882
|
topSpaceHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
|
|
14883
|
+
// 是否展开行
|
|
14884
|
+
if (expandColumn && rowExpandedMaps[rowid]) {
|
|
14885
|
+
topSpaceHeight += rowRest.expandHeight || expandOpts.height || 0;
|
|
14886
|
+
}
|
|
14773
14887
|
}
|
|
14774
14888
|
}
|
|
14775
14889
|
} else {
|
|
@@ -14794,6 +14908,10 @@ const Methods = {
|
|
|
14794
14908
|
if (scrollYSpaceEl) {
|
|
14795
14909
|
scrollYSpaceEl.style.height = ySpaceHeight ? `${ySpaceHeight}px` : '';
|
|
14796
14910
|
}
|
|
14911
|
+
const rowExpandYSpaceEl = $xeTable.$refs.refRowExpandYSpaceElem;
|
|
14912
|
+
if (rowExpandYSpaceEl) {
|
|
14913
|
+
rowExpandYSpaceEl.style.height = ySpaceHeight ? `${ySpaceHeight}px` : '';
|
|
14914
|
+
}
|
|
14797
14915
|
return $xeTable.$nextTick().then(() => {
|
|
14798
14916
|
updateStyle($xeTable);
|
|
14799
14917
|
});
|
|
@@ -15665,7 +15783,8 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
15665
15783
|
expandColumn,
|
|
15666
15784
|
selectRadioRow,
|
|
15667
15785
|
pendingRowMaps,
|
|
15668
|
-
isDragColMove
|
|
15786
|
+
isDragColMove,
|
|
15787
|
+
rowExpandHeightFlag
|
|
15669
15788
|
} = tableReactData;
|
|
15670
15789
|
const {
|
|
15671
15790
|
fullAllDataRowIdData
|
|
@@ -15707,18 +15826,18 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
15707
15826
|
};
|
|
15708
15827
|
}
|
|
15709
15828
|
const rowid = getRowid($xeTable, row);
|
|
15710
|
-
const
|
|
15829
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
15711
15830
|
let rowLevel = 0;
|
|
15712
15831
|
let seq = -1;
|
|
15713
15832
|
let _rowIndex = 0;
|
|
15714
|
-
if (
|
|
15715
|
-
rowLevel =
|
|
15833
|
+
if (rowRest) {
|
|
15834
|
+
rowLevel = rowRest.level;
|
|
15716
15835
|
if (treeConfig && transform && seqMode === 'increasing') {
|
|
15717
|
-
seq =
|
|
15836
|
+
seq = rowRest._index + 1;
|
|
15718
15837
|
} else {
|
|
15719
|
-
seq =
|
|
15838
|
+
seq = rowRest.seq;
|
|
15720
15839
|
}
|
|
15721
|
-
_rowIndex =
|
|
15840
|
+
_rowIndex = rowRest._index;
|
|
15722
15841
|
}
|
|
15723
15842
|
const params = {
|
|
15724
15843
|
$table: $xeTable,
|
|
@@ -15791,54 +15910,69 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
15791
15910
|
const expandOpts = $xeTable.computeExpandOpts;
|
|
15792
15911
|
const {
|
|
15793
15912
|
height: expandHeight,
|
|
15794
|
-
padding
|
|
15913
|
+
padding,
|
|
15914
|
+
mode: expandMode
|
|
15795
15915
|
} = expandOpts;
|
|
15796
|
-
|
|
15797
|
-
|
|
15798
|
-
|
|
15799
|
-
|
|
15800
|
-
|
|
15801
|
-
|
|
15802
|
-
|
|
15803
|
-
|
|
15804
|
-
|
|
15805
|
-
|
|
15806
|
-
|
|
15807
|
-
|
|
15808
|
-
|
|
15809
|
-
|
|
15810
|
-
|
|
15811
|
-
|
|
15812
|
-
|
|
15813
|
-
|
|
15814
|
-
|
|
15815
|
-
|
|
15816
|
-
$rowIndex,
|
|
15817
|
-
_rowIndex
|
|
15818
|
-
};
|
|
15819
|
-
rows.push(h('tr', {
|
|
15820
|
-
class: ['vxe-body--expanded-row', {
|
|
15821
|
-
'is--padding': padding
|
|
15822
|
-
}],
|
|
15823
|
-
key: `expand_${rowid}`,
|
|
15824
|
-
style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rowStyle) ? rowStyle(expandParams) : rowStyle : undefined,
|
|
15825
|
-
on: trOn
|
|
15826
|
-
}, [h('td', {
|
|
15827
|
-
class: {
|
|
15828
|
-
'vxe-body--expanded-column': 1,
|
|
15829
|
-
'fixed--hidden': fixedType && !hasFixedColumn,
|
|
15830
|
-
'col--ellipsis': hasEllipsis
|
|
15831
|
-
},
|
|
15832
|
-
attrs: {
|
|
15833
|
-
colspan: tableColumn.length
|
|
15916
|
+
if (expandMode === 'fixed') {
|
|
15917
|
+
rows.push(h('tr', {
|
|
15918
|
+
class: 'vxe-body--row-expanded-place',
|
|
15919
|
+
key: `expand_${rowid}`,
|
|
15920
|
+
attrs: {
|
|
15921
|
+
rowid
|
|
15922
|
+
}
|
|
15923
|
+
}, [h('td', {
|
|
15924
|
+
class: 'vxe-body--row-expanded-place-column',
|
|
15925
|
+
attrs: {
|
|
15926
|
+
colspan: tableColumn.length
|
|
15927
|
+
},
|
|
15928
|
+
style: {
|
|
15929
|
+
height: `${rowExpandHeightFlag ? rowRest.expandHeight || expandHeight : 0}px`
|
|
15930
|
+
}
|
|
15931
|
+
})]));
|
|
15932
|
+
} else {
|
|
15933
|
+
const cellStyle = {};
|
|
15934
|
+
if (expandHeight) {
|
|
15935
|
+
cellStyle.height = `${expandHeight}px`;
|
|
15834
15936
|
}
|
|
15835
|
-
|
|
15836
|
-
|
|
15837
|
-
|
|
15838
|
-
|
|
15839
|
-
|
|
15840
|
-
|
|
15841
|
-
|
|
15937
|
+
if (treeConfig) {
|
|
15938
|
+
cellStyle.paddingLeft = `${rowLevel * treeOpts.indent + 30}px`;
|
|
15939
|
+
}
|
|
15940
|
+
const {
|
|
15941
|
+
showOverflow
|
|
15942
|
+
} = expandColumn;
|
|
15943
|
+
const hasEllipsis = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
15944
|
+
const expandParams = {
|
|
15945
|
+
$table: $xeTable,
|
|
15946
|
+
seq,
|
|
15947
|
+
column: expandColumn,
|
|
15948
|
+
fixed: fixedType,
|
|
15949
|
+
type: renderType,
|
|
15950
|
+
level: rowLevel,
|
|
15951
|
+
row,
|
|
15952
|
+
rowIndex,
|
|
15953
|
+
$rowIndex,
|
|
15954
|
+
_rowIndex
|
|
15955
|
+
};
|
|
15956
|
+
rows.push(h('tr', {
|
|
15957
|
+
class: ['vxe-body--expanded-row', {
|
|
15958
|
+
'is--padding': padding
|
|
15959
|
+
}],
|
|
15960
|
+
key: `expand_${rowid}`
|
|
15961
|
+
}, [h('td', {
|
|
15962
|
+
class: ['vxe-body--expanded-column', {
|
|
15963
|
+
'fixed--hidden': fixedType && !hasFixedColumn,
|
|
15964
|
+
'col--ellipsis': hasEllipsis
|
|
15965
|
+
}],
|
|
15966
|
+
attrs: {
|
|
15967
|
+
colspan: tableColumn.length
|
|
15968
|
+
}
|
|
15969
|
+
}, [h('div', {
|
|
15970
|
+
class: ['vxe-body--expanded-cell', {
|
|
15971
|
+
'is--ellipsis': expandHeight
|
|
15972
|
+
}],
|
|
15973
|
+
style: cellStyle
|
|
15974
|
+
}, [expandColumn.renderData(h, expandParams)])])]));
|
|
15975
|
+
}
|
|
15842
15976
|
}
|
|
15843
15977
|
// 如果是树形表格
|
|
15844
15978
|
if (isExpandTree) {
|
|
@@ -15941,14 +16075,13 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
15941
16075
|
const emptyOpts = $xeTable.computeEmptyOpts;
|
|
15942
16076
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
15943
16077
|
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
15944
|
-
const
|
|
15945
|
-
const rightFixedWidth = $xeTable.computeRightFixedWidth;
|
|
16078
|
+
const expandOpts = $xeTable.computeExpandOpts;
|
|
15946
16079
|
let renderDataList = tableData;
|
|
15947
16080
|
let renderColumnList = tableColumn;
|
|
15948
16081
|
let isOptimizeMode = false;
|
|
15949
16082
|
// 如果是使用优化模式
|
|
15950
16083
|
if (scrollXLoad || scrollYLoad || isAllOverflow) {
|
|
15951
|
-
if (expandColumn || spanMethod || footerSpanMethod) {
|
|
16084
|
+
if (expandColumn && expandOpts.mode !== 'fixed' || spanMethod || footerSpanMethod) {
|
|
15952
16085
|
// 如果不支持优化模式
|
|
15953
16086
|
} else {
|
|
15954
16087
|
isOptimizeMode = true;
|
|
@@ -16028,9 +16161,6 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
16028
16161
|
$xeTable.triggerBodyScrollEvent(evnt, fixedType);
|
|
16029
16162
|
}
|
|
16030
16163
|
};
|
|
16031
|
-
if (scrollYLoad || leftFixedWidth || rightFixedWidth) {
|
|
16032
|
-
ons.wheel = $xeTable.triggerBodyWheelEvent;
|
|
16033
|
-
}
|
|
16034
16164
|
return h('div', {
|
|
16035
16165
|
ref: 'refElem',
|
|
16036
16166
|
class: ['vxe-table--body-wrapper', fixedType ? `fixed-${fixedType}--wrapper` : 'body--wrapper'],
|
|
@@ -20409,7 +20539,8 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
20409
20539
|
level: parentLevel + 1,
|
|
20410
20540
|
height: 0,
|
|
20411
20541
|
resizeHeight: 0,
|
|
20412
|
-
oTop: 0
|
|
20542
|
+
oTop: 0,
|
|
20543
|
+
expandHeight: 0
|
|
20413
20544
|
};
|
|
20414
20545
|
fullDataRowIdData[rowid] = rest;
|
|
20415
20546
|
fullAllDataRowIdData[rowid] = rest;
|
|
@@ -20434,7 +20565,8 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
20434
20565
|
level: 0,
|
|
20435
20566
|
height: 0,
|
|
20436
20567
|
resizeHeight: 0,
|
|
20437
|
-
oTop: 0
|
|
20568
|
+
oTop: 0,
|
|
20569
|
+
expandHeight: 0
|
|
20438
20570
|
};
|
|
20439
20571
|
fullDataRowIdData[rowid] = rest;
|
|
20440
20572
|
fullAllDataRowIdData[rowid] = rest;
|
|
@@ -20493,7 +20625,8 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
20493
20625
|
level: 0,
|
|
20494
20626
|
height: 0,
|
|
20495
20627
|
resizeHeight: 0,
|
|
20496
|
-
oTop: 0
|
|
20628
|
+
oTop: 0,
|
|
20629
|
+
expandHeight: 0
|
|
20497
20630
|
};
|
|
20498
20631
|
fullDataRowIdData[rowid] = rest;
|
|
20499
20632
|
fullAllDataRowIdData[rowid] = rest;
|
|
@@ -20531,7 +20664,8 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
20531
20664
|
level: 0,
|
|
20532
20665
|
height: 0,
|
|
20533
20666
|
resizeHeight: 0,
|
|
20534
|
-
oTop: 0
|
|
20667
|
+
oTop: 0,
|
|
20668
|
+
expandHeight: 0
|
|
20535
20669
|
};
|
|
20536
20670
|
fullDataRowIdData[rowid] = rest;
|
|
20537
20671
|
fullAllDataRowIdData[rowid] = rest;
|
|
@@ -20592,7 +20726,8 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
20592
20726
|
level: parentLevel + 1,
|
|
20593
20727
|
height: 0,
|
|
20594
20728
|
resizeHeight: 0,
|
|
20595
|
-
oTop: 0
|
|
20729
|
+
oTop: 0,
|
|
20730
|
+
expandHeight: 0
|
|
20596
20731
|
};
|
|
20597
20732
|
fullDataRowIdData[rowid] = rest;
|
|
20598
20733
|
fullAllDataRowIdData[rowid] = rest;
|
|
@@ -24857,6 +24992,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
24857
24992
|
|
|
24858
24993
|
|
|
24859
24994
|
|
|
24995
|
+
|
|
24860
24996
|
|
|
24861
24997
|
|
|
24862
24998
|
const {
|
|
@@ -25025,6 +25161,96 @@ function handleUpdateResize(_vm) {
|
|
|
25025
25161
|
_vm.recalculate();
|
|
25026
25162
|
}
|
|
25027
25163
|
}
|
|
25164
|
+
function renderRowExpandedVNs(h, $xeTable) {
|
|
25165
|
+
const props = $xeTable;
|
|
25166
|
+
const reactData = $xeTable;
|
|
25167
|
+
const internalData = $xeTable;
|
|
25168
|
+
const {
|
|
25169
|
+
treeConfig
|
|
25170
|
+
} = props;
|
|
25171
|
+
const {
|
|
25172
|
+
expandColumn
|
|
25173
|
+
} = reactData;
|
|
25174
|
+
const tableRowExpandedList = $xeTable.computeTableRowExpandedList;
|
|
25175
|
+
const expandOpts = $xeTable.computeExpandOpts;
|
|
25176
|
+
const {
|
|
25177
|
+
mode
|
|
25178
|
+
} = expandOpts;
|
|
25179
|
+
if (mode !== 'fixed') {
|
|
25180
|
+
return table_renderEmptyElement($xeTable);
|
|
25181
|
+
}
|
|
25182
|
+
const expandVNs = [h('div', {
|
|
25183
|
+
key: 'repY',
|
|
25184
|
+
ref: 'refRowExpandYSpaceElem'
|
|
25185
|
+
})];
|
|
25186
|
+
if (expandColumn) {
|
|
25187
|
+
tableRowExpandedList.forEach(row => {
|
|
25188
|
+
const expandOpts = $xeTable.computeExpandOpts;
|
|
25189
|
+
const {
|
|
25190
|
+
height: expandHeight,
|
|
25191
|
+
padding
|
|
25192
|
+
} = expandOpts;
|
|
25193
|
+
const {
|
|
25194
|
+
fullAllDataRowIdData
|
|
25195
|
+
} = internalData;
|
|
25196
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
25197
|
+
const {
|
|
25198
|
+
transform,
|
|
25199
|
+
seqMode
|
|
25200
|
+
} = treeOpts;
|
|
25201
|
+
const cellStyle = {};
|
|
25202
|
+
const rowid = getRowid($xeTable, row);
|
|
25203
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
25204
|
+
let rowLevel = 0;
|
|
25205
|
+
let seq = -1;
|
|
25206
|
+
let _rowIndex = 0;
|
|
25207
|
+
const rowIndex = $xeTable.getRowIndex(row);
|
|
25208
|
+
const $rowIndex = $xeTable.getVMRowIndex(row);
|
|
25209
|
+
if (rest) {
|
|
25210
|
+
rowLevel = rest.level;
|
|
25211
|
+
if (treeConfig && transform && seqMode === 'increasing') {
|
|
25212
|
+
seq = rest._index + 1;
|
|
25213
|
+
} else {
|
|
25214
|
+
seq = rest.seq;
|
|
25215
|
+
}
|
|
25216
|
+
_rowIndex = rest._index;
|
|
25217
|
+
}
|
|
25218
|
+
if (expandHeight) {
|
|
25219
|
+
cellStyle.height = `${expandHeight}px`;
|
|
25220
|
+
}
|
|
25221
|
+
if (treeConfig) {
|
|
25222
|
+
cellStyle.paddingLeft = `${rowLevel * treeOpts.indent + 30}px`;
|
|
25223
|
+
}
|
|
25224
|
+
const expandParams = {
|
|
25225
|
+
$table: $xeTable,
|
|
25226
|
+
seq,
|
|
25227
|
+
column: expandColumn,
|
|
25228
|
+
fixed: '',
|
|
25229
|
+
type: 'body',
|
|
25230
|
+
level: rowLevel,
|
|
25231
|
+
row,
|
|
25232
|
+
rowIndex,
|
|
25233
|
+
$rowIndex,
|
|
25234
|
+
_rowIndex
|
|
25235
|
+
};
|
|
25236
|
+
expandVNs.push(h('div', {
|
|
25237
|
+
key: rowid,
|
|
25238
|
+
class: ['vxe-body--row-expanded-cell', {
|
|
25239
|
+
'is--padding': padding,
|
|
25240
|
+
'is--ellipsis': expandHeight
|
|
25241
|
+
}],
|
|
25242
|
+
attrs: {
|
|
25243
|
+
rowid
|
|
25244
|
+
},
|
|
25245
|
+
style: cellStyle
|
|
25246
|
+
}, expandColumn.renderData(h, expandParams)));
|
|
25247
|
+
});
|
|
25248
|
+
}
|
|
25249
|
+
return h('div', {
|
|
25250
|
+
ref: 'refRowExpandElem',
|
|
25251
|
+
class: 'vxe-table--row-expanded-wrapper'
|
|
25252
|
+
}, expandVNs);
|
|
25253
|
+
}
|
|
25028
25254
|
function renderScrollX(h, $xeTable) {
|
|
25029
25255
|
return h('div', {
|
|
25030
25256
|
key: 'vsx',
|
|
@@ -25083,6 +25309,7 @@ function renderViewport(h, $xeTable) {
|
|
|
25083
25309
|
} = props;
|
|
25084
25310
|
const {
|
|
25085
25311
|
overflowX,
|
|
25312
|
+
scrollYLoad,
|
|
25086
25313
|
tableData,
|
|
25087
25314
|
tableColumn,
|
|
25088
25315
|
tableGroupColumn,
|
|
@@ -25093,9 +25320,16 @@ function renderViewport(h, $xeTable) {
|
|
|
25093
25320
|
leftList,
|
|
25094
25321
|
rightList
|
|
25095
25322
|
} = columnStore;
|
|
25323
|
+
const leftFixedWidth = $xeTable.computeLeftFixedWidth;
|
|
25324
|
+
const rightFixedWidth = $xeTable.computeRightFixedWidth;
|
|
25325
|
+
const ons = {};
|
|
25326
|
+
if (scrollYLoad || leftFixedWidth || rightFixedWidth) {
|
|
25327
|
+
ons.onWheel = $xeTable.triggerBodyWheelEvent;
|
|
25328
|
+
}
|
|
25096
25329
|
return h('div', {
|
|
25097
25330
|
ref: 'refTableViewportElem',
|
|
25098
|
-
class: 'vxe-table--viewport-wrapper'
|
|
25331
|
+
class: 'vxe-table--viewport-wrapper',
|
|
25332
|
+
on: ons
|
|
25099
25333
|
}, [h('div', {
|
|
25100
25334
|
class: 'vxe-table--main-wrapper'
|
|
25101
25335
|
}, [
|
|
@@ -25131,7 +25365,7 @@ function renderViewport(h, $xeTable) {
|
|
|
25131
25365
|
}
|
|
25132
25366
|
}) : table_renderEmptyElement($xeTable)]), h('div', {
|
|
25133
25367
|
class: 'vxe-table--fixed-wrapper'
|
|
25134
|
-
}, [leftList && leftList.length && overflowX ? renderFixed(h, $xeTable, 'left') : table_renderEmptyElement($xeTable), rightList && rightList.length && overflowX ? renderFixed(h, $xeTable, 'right') : table_renderEmptyElement($xeTable)])]);
|
|
25368
|
+
}, [leftList && leftList.length && overflowX ? renderFixed(h, $xeTable, 'left') : table_renderEmptyElement($xeTable), rightList && rightList.length && overflowX ? renderFixed(h, $xeTable, 'right') : table_renderEmptyElement($xeTable)]), renderRowExpandedVNs(h, $xeTable)]);
|
|
25135
25369
|
}
|
|
25136
25370
|
function renderBody(h, $xeTable) {
|
|
25137
25371
|
const scrollbarYToLeft = $xeTable.computeScrollbarYToLeft;
|
|
@@ -25381,8 +25615,9 @@ function renderBody(h, $xeTable) {
|
|
|
25381
25615
|
mini: 36
|
|
25382
25616
|
},
|
|
25383
25617
|
scrollVMLoading: false,
|
|
25384
|
-
|
|
25385
|
-
|
|
25618
|
+
rowExpandHeightFlag: 1,
|
|
25619
|
+
calcCellHeightFlag: 1,
|
|
25620
|
+
resizeHeightFlag: 1,
|
|
25386
25621
|
isCustomStatus: false,
|
|
25387
25622
|
isDragRowMove: false,
|
|
25388
25623
|
dragRow: null,
|
|
@@ -25787,6 +26022,28 @@ function renderBody(h, $xeTable) {
|
|
|
25787
26022
|
computeCustomOpts() {
|
|
25788
26023
|
return Object.assign({}, table_getConfig().table.customConfig, this.customConfig);
|
|
25789
26024
|
},
|
|
26025
|
+
computeTableRowExpandedList() {
|
|
26026
|
+
const $xeTable = this;
|
|
26027
|
+
const reactData = $xeTable;
|
|
26028
|
+
const {
|
|
26029
|
+
rowExpandedMaps,
|
|
26030
|
+
tableData,
|
|
26031
|
+
expandColumn
|
|
26032
|
+
} = reactData;
|
|
26033
|
+
const expandList = [];
|
|
26034
|
+
if (expandColumn) {
|
|
26035
|
+
const rowKeys = {};
|
|
26036
|
+
tableData.forEach(row => {
|
|
26037
|
+
rowKeys[getRowid($xeTable, row)] = true;
|
|
26038
|
+
});
|
|
26039
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(rowExpandedMaps, (row, rowid) => {
|
|
26040
|
+
if (rowKeys[rowid]) {
|
|
26041
|
+
expandList.push(row);
|
|
26042
|
+
}
|
|
26043
|
+
});
|
|
26044
|
+
}
|
|
26045
|
+
return expandList;
|
|
26046
|
+
},
|
|
25790
26047
|
computeAutoWidthColumnList() {
|
|
25791
26048
|
const {
|
|
25792
26049
|
tableColumn,
|
|
@@ -26264,29 +26521,9 @@ function renderBody(h, $xeTable) {
|
|
|
26264
26521
|
mounted() {
|
|
26265
26522
|
const $xeTable = this;
|
|
26266
26523
|
const props = $xeTable;
|
|
26267
|
-
const reactData = $xeTable;
|
|
26268
|
-
const {
|
|
26269
|
-
rowHeightStore
|
|
26270
|
-
} = reactData;
|
|
26271
|
-
const varEl = $xeTable.$refs.refVarElem;
|
|
26272
26524
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
26273
26525
|
const rowOpts = $xeTable.computeRowOpts;
|
|
26274
26526
|
const customOpts = $xeTable.computeCustomOpts;
|
|
26275
|
-
if (varEl) {
|
|
26276
|
-
const [defEl, mediumEl, smallEl, miniEl] = varEl.children;
|
|
26277
|
-
if (defEl) {
|
|
26278
|
-
rowHeightStore.default = defEl.clientHeight;
|
|
26279
|
-
}
|
|
26280
|
-
if (mediumEl) {
|
|
26281
|
-
rowHeightStore.medium = mediumEl.clientHeight;
|
|
26282
|
-
}
|
|
26283
|
-
if (smallEl) {
|
|
26284
|
-
rowHeightStore.small = smallEl.clientHeight;
|
|
26285
|
-
}
|
|
26286
|
-
if (miniEl) {
|
|
26287
|
-
rowHeightStore.mini = miniEl.clientHeight;
|
|
26288
|
-
}
|
|
26289
|
-
}
|
|
26290
26527
|
if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
|
|
26291
26528
|
initTpImg();
|
|
26292
26529
|
}
|