vxe-table 3.19.8 → 3.19.9
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/style.css +1 -1
- package/es/table/src/column.js +6 -0
- package/es/table/src/columnInfo.js +3 -0
- package/es/table/src/header.js +1 -7
- package/es/table/src/methods.js +78 -28
- package/es/table/src/table.js +2 -10
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +93 -49
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/column.js +6 -0
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +3 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/header.js +1 -7
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +80 -30
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +1 -10
- 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 +1 -1
- package/packages/table/src/column.ts +8 -0
- package/packages/table/src/columnInfo.ts +5 -0
- package/packages/table/src/header.ts +2 -8
- package/packages/table/src/methods.ts +79 -30
- package/packages/table/src/table.ts +2 -10
- /package/es/{iconfont.1762324067655.ttf → iconfont.1762392676329.ttf} +0 -0
- /package/es/{iconfont.1762324067655.woff → iconfont.1762392676329.woff} +0 -0
- /package/es/{iconfont.1762324067655.woff2 → iconfont.1762392676329.woff2} +0 -0
- /package/lib/{iconfont.1762324067655.ttf → iconfont.1762392676329.ttf} +0 -0
- /package/lib/{iconfont.1762324067655.woff → iconfont.1762392676329.woff} +0 -0
- /package/lib/{iconfont.1762324067655.woff2 → iconfont.1762392676329.woff2} +0 -0
|
@@ -120,6 +120,9 @@ export class ColumnInfo {
|
|
|
120
120
|
titlePrefix: _vm.titlePrefix,
|
|
121
121
|
titleSuffix: _vm.titleSuffix,
|
|
122
122
|
aggFunc: _vm.aggFunc,
|
|
123
|
+
copyMethod: _vm.copyMethod,
|
|
124
|
+
cutMethod: _vm.cutMethod,
|
|
125
|
+
pasteMethod: _vm.pasteMethod,
|
|
123
126
|
// 自定义参数
|
|
124
127
|
params: _vm.params,
|
|
125
128
|
// 渲染属性
|
package/es/table/src/header.js
CHANGED
|
@@ -317,13 +317,7 @@ function renderFilterRows(h, _vm, isOptimizeMode, cols) {
|
|
|
317
317
|
}, flSlot
|
|
318
318
|
? $xeTable.callSlot(flSlot, cellParams, h)
|
|
319
319
|
: (rtFloatingFilter && firstFilterOption
|
|
320
|
-
? getSlotVNs(rtFloatingFilter.call($xeTable, h, filterRender,
|
|
321
|
-
$table: $xeTable,
|
|
322
|
-
option: firstFilterOption,
|
|
323
|
-
column: column,
|
|
324
|
-
columnIndex,
|
|
325
|
-
$columnIndex
|
|
326
|
-
}))
|
|
320
|
+
? getSlotVNs(rtFloatingFilter.call($xeTable, h, filterRender, cellParams))
|
|
327
321
|
: []))
|
|
328
322
|
])
|
|
329
323
|
]);
|
package/es/table/src/methods.js
CHANGED
|
@@ -2406,26 +2406,29 @@ const calcCellAutoHeight = ($xeTable, rowRest, wrapperEl) => {
|
|
|
2406
2406
|
const reactData = $xeTable;
|
|
2407
2407
|
const { scrollXLoad } = reactData;
|
|
2408
2408
|
const wrapperElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`);
|
|
2409
|
-
let colHeight =
|
|
2409
|
+
let colHeight = 0;
|
|
2410
2410
|
let firstCellStyle = null;
|
|
2411
2411
|
let topBottomPadding = 0;
|
|
2412
2412
|
for (let i = 0; i < wrapperElemList.length; i++) {
|
|
2413
2413
|
const wrapperElem = wrapperElemList[i];
|
|
2414
2414
|
const cellElem = wrapperElem.parentElement;
|
|
2415
|
+
const cellStyle = cellElem.style;
|
|
2416
|
+
const orHeight = cellStyle.height;
|
|
2417
|
+
if (!scrollXLoad) {
|
|
2418
|
+
cellStyle.height = '';
|
|
2419
|
+
}
|
|
2415
2420
|
if (!firstCellStyle) {
|
|
2416
|
-
const cellStyle = cellElem.style;
|
|
2417
|
-
const orHeight = cellStyle.height;
|
|
2418
|
-
if (!scrollXLoad) {
|
|
2419
|
-
cellStyle.height = '';
|
|
2420
|
-
}
|
|
2421
2421
|
firstCellStyle = getComputedStyle(cellElem);
|
|
2422
2422
|
topBottomPadding = firstCellStyle ? Math.ceil(XEUtils.toNumber(firstCellStyle.paddingTop) + XEUtils.toNumber(firstCellStyle.paddingBottom)) : 0;
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2423
|
+
}
|
|
2424
|
+
if (!scrollXLoad) {
|
|
2425
|
+
cellStyle.height = orHeight;
|
|
2426
2426
|
}
|
|
2427
2427
|
const cellHeight = wrapperElem ? wrapperElem.clientHeight : 0;
|
|
2428
|
-
colHeight =
|
|
2428
|
+
colHeight = Math.max(colHeight, Math.ceil(cellHeight + topBottomPadding));
|
|
2429
|
+
}
|
|
2430
|
+
if (scrollXLoad) {
|
|
2431
|
+
colHeight = Math.max(colHeight, rowRest.height);
|
|
2429
2432
|
}
|
|
2430
2433
|
return colHeight;
|
|
2431
2434
|
};
|
|
@@ -2442,7 +2445,7 @@ const calcCellHeight = ($xeTable) => {
|
|
|
2442
2445
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
2443
2446
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
2444
2447
|
const el = $xeTable.$refs.refElem;
|
|
2445
|
-
if (!isAllOverflow && (scrollYLoad || scrollXLoad || (treeConfig && treeOpts.showLine))
|
|
2448
|
+
if (el && !isAllOverflow && (scrollYLoad || scrollXLoad || (treeConfig && treeOpts.showLine))) {
|
|
2446
2449
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
2447
2450
|
el.setAttribute('data-calc-row', 'Y');
|
|
2448
2451
|
tableData.forEach(row => {
|
|
@@ -2450,7 +2453,7 @@ const calcCellHeight = ($xeTable) => {
|
|
|
2450
2453
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
2451
2454
|
if (rowRest) {
|
|
2452
2455
|
const height = calcCellAutoHeight($xeTable, rowRest, el);
|
|
2453
|
-
rowRest.height = Math.max(defaultRowHeight,
|
|
2456
|
+
rowRest.height = Math.max(defaultRowHeight, height);
|
|
2454
2457
|
}
|
|
2455
2458
|
el.removeAttribute('data-calc-row');
|
|
2456
2459
|
});
|
|
@@ -3784,8 +3787,8 @@ function updateHeight($xeTable) {
|
|
|
3784
3787
|
internalData.customHeight = calcTableHeight($xeTable, 'height');
|
|
3785
3788
|
internalData.customMinHeight = calcTableHeight($xeTable, 'minHeight');
|
|
3786
3789
|
internalData.customMaxHeight = calcTableHeight($xeTable, 'maxHeight');
|
|
3787
|
-
//
|
|
3788
|
-
if (reactData.scrollYLoad && !(internalData.customHeight || internalData.customMinHeight)) {
|
|
3790
|
+
// 如果启用虚拟滚动,纠正高度
|
|
3791
|
+
if (reactData.scrollYLoad && !(internalData.customHeight || internalData.customMinHeight || internalData.customMaxHeight)) {
|
|
3789
3792
|
internalData.customHeight = 300;
|
|
3790
3793
|
}
|
|
3791
3794
|
}
|
|
@@ -4220,6 +4223,26 @@ const Methods = {
|
|
|
4220
4223
|
}
|
|
4221
4224
|
return $xeTable.$nextTick();
|
|
4222
4225
|
},
|
|
4226
|
+
initData() {
|
|
4227
|
+
const $xeTable = this;
|
|
4228
|
+
const props = $xeTable;
|
|
4229
|
+
const reactData = $xeTable;
|
|
4230
|
+
const internalData = $xeTable;
|
|
4231
|
+
const { data } = props;
|
|
4232
|
+
loadTableData($xeTable, data || [], true).then(() => {
|
|
4233
|
+
if (data && data.length) {
|
|
4234
|
+
internalData.inited = true;
|
|
4235
|
+
internalData.initStatus = true;
|
|
4236
|
+
handleLoadDefaults($xeTable);
|
|
4237
|
+
}
|
|
4238
|
+
handleInitDefaults($xeTable);
|
|
4239
|
+
updateStyle($xeTable);
|
|
4240
|
+
if (!reactData.isAllOverflow) {
|
|
4241
|
+
calcCellHeight($xeTable);
|
|
4242
|
+
updateRowOffsetTop($xeTable);
|
|
4243
|
+
}
|
|
4244
|
+
});
|
|
4245
|
+
},
|
|
4223
4246
|
/**
|
|
4224
4247
|
* 加载表格数据
|
|
4225
4248
|
* @param {Array} datas 数据
|
|
@@ -11210,14 +11233,28 @@ const Methods = {
|
|
|
11210
11233
|
if (!(scrollXLoad && overflowX)) {
|
|
11211
11234
|
xSpaceLeft = 0;
|
|
11212
11235
|
}
|
|
11213
|
-
if (
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11236
|
+
if (getConfig().scrollMarginStyle) {
|
|
11237
|
+
// 已废弃方式
|
|
11238
|
+
if (headerTableElem) {
|
|
11239
|
+
headerTableElem.style.marginLeft = headerTableElem.getAttribute('xvm') ? `${xSpaceLeft}px` : '';
|
|
11240
|
+
}
|
|
11241
|
+
if (bodyTableElem) {
|
|
11242
|
+
bodyTableElem.style.marginLeft = `${xSpaceLeft}px`;
|
|
11243
|
+
}
|
|
11244
|
+
if (footerTableElem) {
|
|
11245
|
+
footerTableElem.style.marginLeft = footerTableElem.getAttribute('xvm') ? `${xSpaceLeft}px` : '';
|
|
11246
|
+
}
|
|
11218
11247
|
}
|
|
11219
|
-
|
|
11220
|
-
|
|
11248
|
+
else {
|
|
11249
|
+
if (headerTableElem) {
|
|
11250
|
+
headerTableElem.style.transform = headerTableElem.getAttribute('xvm') ? `translate(${xSpaceLeft}px, 0px)` : '';
|
|
11251
|
+
}
|
|
11252
|
+
if (bodyTableElem) {
|
|
11253
|
+
bodyTableElem.style.transform = `translate(${xSpaceLeft}px, ${reactData.scrollYTop || 0}px)`;
|
|
11254
|
+
}
|
|
11255
|
+
if (footerTableElem) {
|
|
11256
|
+
footerTableElem.style.transform = footerTableElem.getAttribute('xvm') ? `translate(${xSpaceLeft}px, 0px)` : '';
|
|
11257
|
+
}
|
|
11221
11258
|
}
|
|
11222
11259
|
const containerList = ['main'];
|
|
11223
11260
|
containerList.forEach(name => {
|
|
@@ -11334,14 +11371,27 @@ const Methods = {
|
|
|
11334
11371
|
if (!(scrollYLoad && overflowY)) {
|
|
11335
11372
|
scrollYTop = 0;
|
|
11336
11373
|
}
|
|
11337
|
-
if (
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11374
|
+
if (getConfig().scrollMarginStyle) {
|
|
11375
|
+
if (leftBodyTableElem) {
|
|
11376
|
+
leftBodyTableElem.style.marginTop = `${scrollYTop}px`;
|
|
11377
|
+
}
|
|
11378
|
+
if (bodyTableElem) {
|
|
11379
|
+
bodyTableElem.style.marginTop = `${scrollYTop}px`;
|
|
11380
|
+
}
|
|
11381
|
+
if (rightbodyTableElem) {
|
|
11382
|
+
rightbodyTableElem.style.marginTop = `${scrollYTop}px`;
|
|
11383
|
+
}
|
|
11342
11384
|
}
|
|
11343
|
-
|
|
11344
|
-
|
|
11385
|
+
else {
|
|
11386
|
+
if (leftBodyTableElem) {
|
|
11387
|
+
leftBodyTableElem.style.transform = `translate(0px, ${scrollYTop}px)`;
|
|
11388
|
+
}
|
|
11389
|
+
if (bodyTableElem) {
|
|
11390
|
+
bodyTableElem.style.transform = `translate(${reactData.scrollXLeft || 0}px, ${scrollYTop}px)`;
|
|
11391
|
+
}
|
|
11392
|
+
if (rightbodyTableElem) {
|
|
11393
|
+
rightbodyTableElem.style.transform = `translate(0px, ${scrollYTop}px)`;
|
|
11394
|
+
}
|
|
11345
11395
|
}
|
|
11346
11396
|
containerList.forEach(name => {
|
|
11347
11397
|
const layoutList = ['header', 'body', 'footer'];
|
package/es/table/src/table.js
CHANGED
|
@@ -1598,7 +1598,7 @@ export default {
|
|
|
1598
1598
|
const internalData = $xeTable;
|
|
1599
1599
|
XEUtils.assign(internalData, createInternalData());
|
|
1600
1600
|
handleKeyField($xeTable);
|
|
1601
|
-
const {
|
|
1601
|
+
const { exportConfig, importConfig, treeConfig, highlightCurrentRow, highlightCurrentColumn } = props;
|
|
1602
1602
|
const { scrollXStore, scrollYStore } = internalData;
|
|
1603
1603
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
1604
1604
|
const editOpts = $xeTable.computeEditOpts;
|
|
@@ -1851,15 +1851,7 @@ export default {
|
|
|
1851
1851
|
visibleSize: 0
|
|
1852
1852
|
});
|
|
1853
1853
|
this.handleUpdateRowGroup(groupFields);
|
|
1854
|
-
this.
|
|
1855
|
-
if (data && data.length) {
|
|
1856
|
-
this.inited = true;
|
|
1857
|
-
this.initStatus = true;
|
|
1858
|
-
this.handleLoadDefaults();
|
|
1859
|
-
}
|
|
1860
|
-
this.handleInitDefaults();
|
|
1861
|
-
this.updateStyle();
|
|
1862
|
-
});
|
|
1854
|
+
this.initData();
|
|
1863
1855
|
globalEvents.on($xeTable, 'paste', this.handleGlobalPasteEvent);
|
|
1864
1856
|
globalEvents.on($xeTable, 'copy', this.handleGlobalCopyEvent);
|
|
1865
1857
|
globalEvents.on($xeTable, 'cut', this.handleGlobalCutEvent);
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -2005,7 +2005,7 @@ function getClass(property, params) {
|
|
|
2005
2005
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2006
2006
|
|
|
2007
2007
|
|
|
2008
|
-
const version = "3.19.
|
|
2008
|
+
const version = "3.19.9";
|
|
2009
2009
|
core_.VxeUI.version = version;
|
|
2010
2010
|
core_.VxeUI.tableVersion = version;
|
|
2011
2011
|
core_.VxeUI.setConfig({
|
|
@@ -2713,7 +2713,7 @@ function isNodeElement(elem) {
|
|
|
2713
2713
|
const {
|
|
2714
2714
|
log: log_log
|
|
2715
2715
|
} = core_.VxeUI;
|
|
2716
|
-
const log_version = `table v${"3.19.
|
|
2716
|
+
const log_version = `table v${"3.19.9"}`;
|
|
2717
2717
|
const warnLog = log_log.create('warn', log_version);
|
|
2718
2718
|
const errLog = log_log.create('error', log_version);
|
|
2719
2719
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -2853,6 +2853,9 @@ class ColumnInfo {
|
|
|
2853
2853
|
titlePrefix: _vm.titlePrefix,
|
|
2854
2854
|
titleSuffix: _vm.titleSuffix,
|
|
2855
2855
|
aggFunc: _vm.aggFunc,
|
|
2856
|
+
copyMethod: _vm.copyMethod,
|
|
2857
|
+
cutMethod: _vm.cutMethod,
|
|
2858
|
+
pasteMethod: _vm.pasteMethod,
|
|
2856
2859
|
// 自定义参数
|
|
2857
2860
|
params: _vm.params,
|
|
2858
2861
|
// 渲染属性
|
|
@@ -5370,6 +5373,12 @@ const columnProps = {
|
|
|
5370
5373
|
contentRender: Object,
|
|
5371
5374
|
// 聚合函数
|
|
5372
5375
|
aggFunc: [String, Boolean],
|
|
5376
|
+
// 将单元格复制到剪贴板
|
|
5377
|
+
copyMethod: Function,
|
|
5378
|
+
// 将剪贴单元格的值清除
|
|
5379
|
+
cutMethod: Function,
|
|
5380
|
+
// 从剪贴板赋值到单元格
|
|
5381
|
+
pasteMethod: Function,
|
|
5373
5382
|
// 额外的参数
|
|
5374
5383
|
params: Object
|
|
5375
5384
|
};
|
|
@@ -8806,26 +8815,29 @@ const calcCellAutoHeight = ($xeTable, rowRest, wrapperEl) => {
|
|
|
8806
8815
|
scrollXLoad
|
|
8807
8816
|
} = reactData;
|
|
8808
8817
|
const wrapperElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`);
|
|
8809
|
-
let colHeight =
|
|
8818
|
+
let colHeight = 0;
|
|
8810
8819
|
let firstCellStyle = null;
|
|
8811
8820
|
let topBottomPadding = 0;
|
|
8812
8821
|
for (let i = 0; i < wrapperElemList.length; i++) {
|
|
8813
8822
|
const wrapperElem = wrapperElemList[i];
|
|
8814
8823
|
const cellElem = wrapperElem.parentElement;
|
|
8824
|
+
const cellStyle = cellElem.style;
|
|
8825
|
+
const orHeight = cellStyle.height;
|
|
8826
|
+
if (!scrollXLoad) {
|
|
8827
|
+
cellStyle.height = '';
|
|
8828
|
+
}
|
|
8815
8829
|
if (!firstCellStyle) {
|
|
8816
|
-
const cellStyle = cellElem.style;
|
|
8817
|
-
const orHeight = cellStyle.height;
|
|
8818
|
-
if (!scrollXLoad) {
|
|
8819
|
-
cellStyle.height = '';
|
|
8820
|
-
}
|
|
8821
8830
|
firstCellStyle = getComputedStyle(cellElem);
|
|
8822
8831
|
topBottomPadding = firstCellStyle ? Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(firstCellStyle.paddingTop) + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(firstCellStyle.paddingBottom)) : 0;
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8832
|
+
}
|
|
8833
|
+
if (!scrollXLoad) {
|
|
8834
|
+
cellStyle.height = orHeight;
|
|
8826
8835
|
}
|
|
8827
8836
|
const cellHeight = wrapperElem ? wrapperElem.clientHeight : 0;
|
|
8828
|
-
colHeight =
|
|
8837
|
+
colHeight = Math.max(colHeight, Math.ceil(cellHeight + topBottomPadding));
|
|
8838
|
+
}
|
|
8839
|
+
if (scrollXLoad) {
|
|
8840
|
+
colHeight = Math.max(colHeight, rowRest.height);
|
|
8829
8841
|
}
|
|
8830
8842
|
return colHeight;
|
|
8831
8843
|
};
|
|
@@ -8851,7 +8863,7 @@ const calcCellHeight = $xeTable => {
|
|
|
8851
8863
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
8852
8864
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
8853
8865
|
const el = $xeTable.$refs.refElem;
|
|
8854
|
-
if (!isAllOverflow && (scrollYLoad || scrollXLoad || treeConfig && treeOpts.showLine)
|
|
8866
|
+
if (el && !isAllOverflow && (scrollYLoad || scrollXLoad || treeConfig && treeOpts.showLine)) {
|
|
8855
8867
|
const {
|
|
8856
8868
|
handleGetRowId
|
|
8857
8869
|
} = createHandleGetRowId($xeTable);
|
|
@@ -8861,7 +8873,7 @@ const calcCellHeight = $xeTable => {
|
|
|
8861
8873
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
8862
8874
|
if (rowRest) {
|
|
8863
8875
|
const height = calcCellAutoHeight($xeTable, rowRest, el);
|
|
8864
|
-
rowRest.height = Math.max(defaultRowHeight,
|
|
8876
|
+
rowRest.height = Math.max(defaultRowHeight, height);
|
|
8865
8877
|
}
|
|
8866
8878
|
el.removeAttribute('data-calc-row');
|
|
8867
8879
|
});
|
|
@@ -10359,8 +10371,8 @@ function updateHeight($xeTable) {
|
|
|
10359
10371
|
internalData.customHeight = calcTableHeight($xeTable, 'height');
|
|
10360
10372
|
internalData.customMinHeight = calcTableHeight($xeTable, 'minHeight');
|
|
10361
10373
|
internalData.customMaxHeight = calcTableHeight($xeTable, 'maxHeight');
|
|
10362
|
-
//
|
|
10363
|
-
if (reactData.scrollYLoad && !(internalData.customHeight || internalData.customMinHeight)) {
|
|
10374
|
+
// 如果启用虚拟滚动,纠正高度
|
|
10375
|
+
if (reactData.scrollYLoad && !(internalData.customHeight || internalData.customMinHeight || internalData.customMaxHeight)) {
|
|
10364
10376
|
internalData.customHeight = 300;
|
|
10365
10377
|
}
|
|
10366
10378
|
}
|
|
@@ -10850,6 +10862,28 @@ const Methods = {
|
|
|
10850
10862
|
}
|
|
10851
10863
|
return $xeTable.$nextTick();
|
|
10852
10864
|
},
|
|
10865
|
+
initData() {
|
|
10866
|
+
const $xeTable = this;
|
|
10867
|
+
const props = $xeTable;
|
|
10868
|
+
const reactData = $xeTable;
|
|
10869
|
+
const internalData = $xeTable;
|
|
10870
|
+
const {
|
|
10871
|
+
data
|
|
10872
|
+
} = props;
|
|
10873
|
+
loadTableData($xeTable, data || [], true).then(() => {
|
|
10874
|
+
if (data && data.length) {
|
|
10875
|
+
internalData.inited = true;
|
|
10876
|
+
internalData.initStatus = true;
|
|
10877
|
+
handleLoadDefaults($xeTable);
|
|
10878
|
+
}
|
|
10879
|
+
handleInitDefaults($xeTable);
|
|
10880
|
+
updateStyle($xeTable);
|
|
10881
|
+
if (!reactData.isAllOverflow) {
|
|
10882
|
+
calcCellHeight($xeTable);
|
|
10883
|
+
updateRowOffsetTop($xeTable);
|
|
10884
|
+
}
|
|
10885
|
+
});
|
|
10886
|
+
},
|
|
10853
10887
|
/**
|
|
10854
10888
|
* 加载表格数据
|
|
10855
10889
|
* @param {Array} datas 数据
|
|
@@ -18981,14 +19015,27 @@ const Methods = {
|
|
|
18981
19015
|
if (!(scrollXLoad && overflowX)) {
|
|
18982
19016
|
xSpaceLeft = 0;
|
|
18983
19017
|
}
|
|
18984
|
-
if (
|
|
18985
|
-
|
|
18986
|
-
|
|
18987
|
-
|
|
18988
|
-
|
|
18989
|
-
|
|
18990
|
-
|
|
18991
|
-
|
|
19018
|
+
if (methods_getConfig().scrollMarginStyle) {
|
|
19019
|
+
// 已废弃方式
|
|
19020
|
+
if (headerTableElem) {
|
|
19021
|
+
headerTableElem.style.marginLeft = headerTableElem.getAttribute('xvm') ? `${xSpaceLeft}px` : '';
|
|
19022
|
+
}
|
|
19023
|
+
if (bodyTableElem) {
|
|
19024
|
+
bodyTableElem.style.marginLeft = `${xSpaceLeft}px`;
|
|
19025
|
+
}
|
|
19026
|
+
if (footerTableElem) {
|
|
19027
|
+
footerTableElem.style.marginLeft = footerTableElem.getAttribute('xvm') ? `${xSpaceLeft}px` : '';
|
|
19028
|
+
}
|
|
19029
|
+
} else {
|
|
19030
|
+
if (headerTableElem) {
|
|
19031
|
+
headerTableElem.style.transform = headerTableElem.getAttribute('xvm') ? `translate(${xSpaceLeft}px, 0px)` : '';
|
|
19032
|
+
}
|
|
19033
|
+
if (bodyTableElem) {
|
|
19034
|
+
bodyTableElem.style.transform = `translate(${xSpaceLeft}px, ${reactData.scrollYTop || 0}px)`;
|
|
19035
|
+
}
|
|
19036
|
+
if (footerTableElem) {
|
|
19037
|
+
footerTableElem.style.transform = footerTableElem.getAttribute('xvm') ? `translate(${xSpaceLeft}px, 0px)` : '';
|
|
19038
|
+
}
|
|
18992
19039
|
}
|
|
18993
19040
|
const containerList = ['main'];
|
|
18994
19041
|
containerList.forEach(name => {
|
|
@@ -19117,14 +19164,26 @@ const Methods = {
|
|
|
19117
19164
|
if (!(scrollYLoad && overflowY)) {
|
|
19118
19165
|
scrollYTop = 0;
|
|
19119
19166
|
}
|
|
19120
|
-
if (
|
|
19121
|
-
|
|
19122
|
-
|
|
19123
|
-
|
|
19124
|
-
|
|
19125
|
-
|
|
19126
|
-
|
|
19127
|
-
|
|
19167
|
+
if (methods_getConfig().scrollMarginStyle) {
|
|
19168
|
+
if (leftBodyTableElem) {
|
|
19169
|
+
leftBodyTableElem.style.marginTop = `${scrollYTop}px`;
|
|
19170
|
+
}
|
|
19171
|
+
if (bodyTableElem) {
|
|
19172
|
+
bodyTableElem.style.marginTop = `${scrollYTop}px`;
|
|
19173
|
+
}
|
|
19174
|
+
if (rightbodyTableElem) {
|
|
19175
|
+
rightbodyTableElem.style.marginTop = `${scrollYTop}px`;
|
|
19176
|
+
}
|
|
19177
|
+
} else {
|
|
19178
|
+
if (leftBodyTableElem) {
|
|
19179
|
+
leftBodyTableElem.style.transform = `translate(0px, ${scrollYTop}px)`;
|
|
19180
|
+
}
|
|
19181
|
+
if (bodyTableElem) {
|
|
19182
|
+
bodyTableElem.style.transform = `translate(${reactData.scrollXLeft || 0}px, ${scrollYTop}px)`;
|
|
19183
|
+
}
|
|
19184
|
+
if (rightbodyTableElem) {
|
|
19185
|
+
rightbodyTableElem.style.transform = `translate(0px, ${scrollYTop}px)`;
|
|
19186
|
+
}
|
|
19128
19187
|
}
|
|
19129
19188
|
containerList.forEach(name => {
|
|
19130
19189
|
const layoutList = ['header', 'body', 'footer'];
|
|
@@ -21072,13 +21131,7 @@ function renderFilterRows(h, _vm, isOptimizeMode, cols) {
|
|
|
21072
21131
|
colid
|
|
21073
21132
|
},
|
|
21074
21133
|
class: 'vxe-cell--wrapper vxe-header-cell--wrapper'
|
|
21075
|
-
}, flSlot ? $xeTable.callSlot(flSlot, cellParams, h) : rtFloatingFilter && firstFilterOption ? getSlotVNs(rtFloatingFilter.call($xeTable, h, filterRender,
|
|
21076
|
-
$table: $xeTable,
|
|
21077
|
-
option: firstFilterOption,
|
|
21078
|
-
column: column,
|
|
21079
|
-
columnIndex,
|
|
21080
|
-
$columnIndex
|
|
21081
|
-
})) : [])])]);
|
|
21134
|
+
}, flSlot ? $xeTable.callSlot(flSlot, cellParams, h) : rtFloatingFilter && firstFilterOption ? getSlotVNs(rtFloatingFilter.call($xeTable, h, filterRender, cellParams)) : [])])]);
|
|
21082
21135
|
});
|
|
21083
21136
|
}
|
|
21084
21137
|
function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
|
|
@@ -31909,7 +31962,6 @@ function renderBody(h, $xeTable) {
|
|
|
31909
31962
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, createInternalData());
|
|
31910
31963
|
handleKeyField($xeTable);
|
|
31911
31964
|
const {
|
|
31912
|
-
data,
|
|
31913
31965
|
exportConfig,
|
|
31914
31966
|
importConfig,
|
|
31915
31967
|
treeConfig,
|
|
@@ -32173,15 +32225,7 @@ function renderBody(h, $xeTable) {
|
|
|
32173
32225
|
visibleSize: 0
|
|
32174
32226
|
});
|
|
32175
32227
|
this.handleUpdateRowGroup(groupFields);
|
|
32176
|
-
this.
|
|
32177
|
-
if (data && data.length) {
|
|
32178
|
-
this.inited = true;
|
|
32179
|
-
this.initStatus = true;
|
|
32180
|
-
this.handleLoadDefaults();
|
|
32181
|
-
}
|
|
32182
|
-
this.handleInitDefaults();
|
|
32183
|
-
this.updateStyle();
|
|
32184
|
-
});
|
|
32228
|
+
this.initData();
|
|
32185
32229
|
table_globalEvents.on($xeTable, 'paste', this.handleGlobalPasteEvent);
|
|
32186
32230
|
table_globalEvents.on($xeTable, 'copy', this.handleGlobalCopyEvent);
|
|
32187
32231
|
table_globalEvents.on($xeTable, 'cut', this.handleGlobalCutEvent);
|