vxe-table 3.11.39 → 3.12.0-beta.1
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/custom/panel.js +6 -2
- package/es/table/render/index.js +3 -1
- package/es/table/src/body.js +56 -13
- package/es/table/src/footer.js +28 -3
- package/es/table/src/header.js +36 -6
- package/es/table/src/methods.js +136 -104
- package/es/table/src/table.js +5 -13
- package/es/table/style.css +3 -5
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +5 -3
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +3 -5
- 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 +294 -166
- 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/custom/panel.js +6 -4
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/render/index.js +3 -1
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +58 -13
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +31 -3
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +39 -6
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +146 -120
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +5 -15
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +3 -5
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +5 -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/vxe-table/style/style.css +3 -5
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/module/custom/panel.ts +7 -2
- package/packages/table/render/index.ts +3 -1
- package/packages/table/src/body.ts +56 -13
- package/packages/table/src/footer.ts +28 -3
- package/packages/table/src/header.ts +40 -7
- package/packages/table/src/methods.ts +140 -109
- package/packages/table/src/table.ts +6 -15
- package/packages/ui/index.ts +4 -2
- package/styles/components/table.scss +1 -3
- /package/es/{iconfont.1735027791418.ttf → iconfont.1735108867776.ttf} +0 -0
- /package/es/{iconfont.1735027791418.woff → iconfont.1735108867776.woff} +0 -0
- /package/es/{iconfont.1735027791418.woff2 → iconfont.1735108867776.woff2} +0 -0
- /package/lib/{iconfont.1735027791418.ttf → iconfont.1735108867776.ttf} +0 -0
- /package/lib/{iconfont.1735027791418.woff → iconfont.1735108867776.woff} +0 -0
- /package/lib/{iconfont.1735027791418.woff2 → iconfont.1735108867776.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.
|
|
2223
|
+
const version = "3.12.0-beta.1";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2263,11 +2263,13 @@ core_.VxeUI.setConfig({
|
|
|
2263
2263
|
},
|
|
2264
2264
|
rowDragConfig: {
|
|
2265
2265
|
showIcon: true,
|
|
2266
|
-
animation: true
|
|
2266
|
+
animation: true,
|
|
2267
|
+
showGuidesStatus: true
|
|
2267
2268
|
},
|
|
2268
2269
|
columnDragConfig: {
|
|
2269
2270
|
showIcon: true,
|
|
2270
|
-
animation: true
|
|
2271
|
+
animation: true,
|
|
2272
|
+
showGuidesStatus: true
|
|
2271
2273
|
},
|
|
2272
2274
|
checkboxConfig: {
|
|
2273
2275
|
// trigger: 'default',
|
|
@@ -2793,7 +2795,7 @@ function isNodeElement(elem) {
|
|
|
2793
2795
|
const {
|
|
2794
2796
|
log: log_log
|
|
2795
2797
|
} = core_.VxeUI;
|
|
2796
|
-
const log_version = `table v${"3.
|
|
2798
|
+
const log_version = `table v${"3.12.0-beta.1"}`;
|
|
2797
2799
|
const warnLog = log_log.create('warn', log_version);
|
|
2798
2800
|
const errLog = log_log.create('error', log_version);
|
|
2799
2801
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -4916,8 +4918,6 @@ const {
|
|
|
4916
4918
|
interceptor: methods_interceptor,
|
|
4917
4919
|
createEvent
|
|
4918
4920
|
} = core_.VxeUI;
|
|
4919
|
-
// const isWebkit = browse['-webkit'] && !browse.edge
|
|
4920
|
-
// const debounceScrollYDuration = browse.msie ? 80 : 20
|
|
4921
4921
|
const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
4922
4922
|
// 获取所有的列,排除分组
|
|
4923
4923
|
const getColumnList = columns => {
|
|
@@ -5251,7 +5251,7 @@ const calcCellHeight = $xeTable => {
|
|
|
5251
5251
|
const {
|
|
5252
5252
|
fullAllDataRowIdData
|
|
5253
5253
|
} = internalData;
|
|
5254
|
-
const el = $xeTable.$
|
|
5254
|
+
const el = $xeTable.$refs.refElem;
|
|
5255
5255
|
if (!showOverflow && (scrollXLoad || scrollYLoad) && el) {
|
|
5256
5256
|
let paddingTop = 0;
|
|
5257
5257
|
let paddingBottom = 0;
|
|
@@ -5259,28 +5259,27 @@ const calcCellHeight = $xeTable => {
|
|
|
5259
5259
|
tableData.forEach(row => {
|
|
5260
5260
|
const rowid = getRowid($xeTable, row);
|
|
5261
5261
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
5262
|
-
const
|
|
5263
|
-
if (rowRest &&
|
|
5262
|
+
const cellList = el.querySelectorAll(`.vxe-body--row[rowid="${rowid}"]>.vxe-body--column>.vxe-cell`);
|
|
5263
|
+
if (rowRest && cellList.length) {
|
|
5264
5264
|
let height = 0;
|
|
5265
|
-
for (let i = 0; i <
|
|
5266
|
-
const
|
|
5267
|
-
const
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
}
|
|
5276
|
-
let cellHeight = paddingTop + paddingBottom;
|
|
5277
|
-
if (cellElem) {
|
|
5278
|
-
cellHeight += cellElem.offsetHeight;
|
|
5279
|
-
}
|
|
5280
|
-
height = Math.max(height, cellHeight);
|
|
5265
|
+
for (let i = 0; i < cellList.length; i++) {
|
|
5266
|
+
const cellElem = cellList[i];
|
|
5267
|
+
const tdEl = cellElem.parentElement;
|
|
5268
|
+
if (!tdEl || !tdEl.clientWidth) {
|
|
5269
|
+
break;
|
|
5270
|
+
}
|
|
5271
|
+
if (!calcPadding) {
|
|
5272
|
+
paddingTop = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(tdEl).paddingTop);
|
|
5273
|
+
paddingBottom = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(tdEl).paddingBottom);
|
|
5274
|
+
calcPadding = true;
|
|
5281
5275
|
}
|
|
5276
|
+
let cellHeight = paddingTop + paddingBottom;
|
|
5277
|
+
if (cellElem) {
|
|
5278
|
+
cellHeight += cellElem.clientHeight;
|
|
5279
|
+
}
|
|
5280
|
+
height = Math.max(height, cellHeight);
|
|
5282
5281
|
}
|
|
5283
|
-
rowRest.height = height;
|
|
5282
|
+
rowRest.height = scrollXLoad ? Math.max(rowRest.height, height) : height;
|
|
5284
5283
|
}
|
|
5285
5284
|
});
|
|
5286
5285
|
}
|
|
@@ -5411,15 +5410,22 @@ function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
|
|
|
5411
5410
|
prevDragToChild
|
|
5412
5411
|
} = internalData;
|
|
5413
5412
|
const wrapperRect = el.getBoundingClientRect();
|
|
5413
|
+
const tableWidth = el.clientWidth;
|
|
5414
|
+
const tableHeight = el.clientHeight;
|
|
5414
5415
|
if (trEl) {
|
|
5415
5416
|
const rdLineEl = $xeTable.$refs.refDragRowLineElem;
|
|
5416
5417
|
if (rdLineEl) {
|
|
5417
5418
|
if (showLine) {
|
|
5418
5419
|
const trRect = trEl.getBoundingClientRect();
|
|
5420
|
+
let trHeight = trEl.clientHeight;
|
|
5421
|
+
const offsetTop = Math.max(1, trRect.y - wrapperRect.y);
|
|
5422
|
+
if (offsetTop + trHeight > tableHeight - scrollbarHeight) {
|
|
5423
|
+
trHeight = tableHeight - offsetTop - scrollbarHeight;
|
|
5424
|
+
}
|
|
5419
5425
|
rdLineEl.style.display = 'block';
|
|
5420
|
-
rdLineEl.style.top = `${
|
|
5421
|
-
rdLineEl.style.height = `${
|
|
5422
|
-
rdLineEl.style.width = `${
|
|
5426
|
+
rdLineEl.style.top = `${offsetTop}px`;
|
|
5427
|
+
rdLineEl.style.height = `${trHeight}px`;
|
|
5428
|
+
rdLineEl.style.width = `${tableWidth - scrollbarWidth}px`;
|
|
5423
5429
|
rdLineEl.setAttribute('drag-pos', dragPos);
|
|
5424
5430
|
rdLineEl.setAttribute('drag-to-child', prevDragToChild ? 'y' : 'n');
|
|
5425
5431
|
} else {
|
|
@@ -5430,16 +5436,31 @@ function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
|
|
|
5430
5436
|
const cdLineEl = $xeTable.$refs.refDragColLineElem;
|
|
5431
5437
|
if (cdLineEl) {
|
|
5432
5438
|
if (showLine) {
|
|
5439
|
+
const leftContainerElem = $xeTable.$refs.leftContainer;
|
|
5440
|
+
const leftContainerWidth = leftContainerElem ? leftContainerElem.clientWidth : 0;
|
|
5441
|
+
const rightContainerElem = $xeTable.$refs.rightContainer;
|
|
5442
|
+
const rightContainerWidth = rightContainerElem ? rightContainerElem.clientWidth : 0;
|
|
5433
5443
|
const thRect = thEl.getBoundingClientRect();
|
|
5444
|
+
let thWidth = thEl.clientWidth;
|
|
5434
5445
|
const offsetTop = Math.max(0, thRect.y - wrapperRect.y);
|
|
5446
|
+
const startX = leftContainerWidth;
|
|
5447
|
+
let offsetLeft = thRect.x - wrapperRect.x;
|
|
5448
|
+
if (offsetLeft < startX) {
|
|
5449
|
+
thWidth -= startX - offsetLeft;
|
|
5450
|
+
offsetLeft = startX;
|
|
5451
|
+
}
|
|
5452
|
+
const endX = tableWidth - rightContainerWidth - (rightContainerWidth ? 0 : scrollbarWidth);
|
|
5453
|
+
if (offsetLeft + thWidth > endX) {
|
|
5454
|
+
thWidth = endX - offsetLeft;
|
|
5455
|
+
}
|
|
5435
5456
|
cdLineEl.style.display = 'block';
|
|
5436
5457
|
cdLineEl.style.top = `${offsetTop}px`;
|
|
5437
|
-
cdLineEl.style.left = `${
|
|
5438
|
-
cdLineEl.style.width = `${
|
|
5458
|
+
cdLineEl.style.left = `${offsetLeft}px`;
|
|
5459
|
+
cdLineEl.style.width = `${thWidth}px`;
|
|
5439
5460
|
if (prevDragToChild) {
|
|
5440
5461
|
cdLineEl.style.height = `${thRect.height}px`;
|
|
5441
5462
|
} else {
|
|
5442
|
-
cdLineEl.style.height = `${
|
|
5463
|
+
cdLineEl.style.height = `${tableHeight - offsetTop - scrollbarHeight}px`;
|
|
5443
5464
|
}
|
|
5444
5465
|
cdLineEl.setAttribute('drag-pos', dragPos);
|
|
5445
5466
|
cdLineEl.setAttribute('drag-to-child', prevDragToChild ? 'y' : 'n');
|
|
@@ -5927,7 +5948,7 @@ const Methods = {
|
|
|
5927
5948
|
return Promise.resolve(this.restoreCustomStorage()).then(() => {
|
|
5928
5949
|
this._isLoading = false;
|
|
5929
5950
|
this.cacheColumnMap();
|
|
5930
|
-
this.parseColumns().then(() => {
|
|
5951
|
+
this.parseColumns(true).then(() => {
|
|
5931
5952
|
if (this.scrollXLoad) {
|
|
5932
5953
|
this.loadScrollXData(true);
|
|
5933
5954
|
}
|
|
@@ -7799,15 +7820,11 @@ const Methods = {
|
|
|
7799
7820
|
/**
|
|
7800
7821
|
* 刷新列配置
|
|
7801
7822
|
*/
|
|
7802
|
-
refreshColumn(
|
|
7803
|
-
if (
|
|
7804
|
-
|
|
7805
|
-
this.collectColumn = columnList;
|
|
7806
|
-
const tableFullColumn = getColumnList(columnList);
|
|
7807
|
-
this.tableFullColumn = tableFullColumn;
|
|
7808
|
-
this.cacheColumnMap();
|
|
7823
|
+
refreshColumn(initSort) {
|
|
7824
|
+
if (initSort) {
|
|
7825
|
+
this.handleUpdateColumn();
|
|
7809
7826
|
}
|
|
7810
|
-
return this.parseColumns().then(() => {
|
|
7827
|
+
return this.parseColumns(true).then(() => {
|
|
7811
7828
|
return this.refreshScroll();
|
|
7812
7829
|
}).then(() => {
|
|
7813
7830
|
return this.recalculate();
|
|
@@ -7817,7 +7834,7 @@ const Methods = {
|
|
|
7817
7834
|
* 刷新列信息
|
|
7818
7835
|
* 将固定的列左边、右边分别靠边
|
|
7819
7836
|
*/
|
|
7820
|
-
parseColumns() {
|
|
7837
|
+
parseColumns(isReset) {
|
|
7821
7838
|
const $xeTable = this;
|
|
7822
7839
|
const props = $xeTable;
|
|
7823
7840
|
const internalData = $xeTable;
|
|
@@ -7921,12 +7938,14 @@ const Methods = {
|
|
|
7921
7938
|
warnLog('vxe.error.scrollErrProp', ['footer-span-method']);
|
|
7922
7939
|
}
|
|
7923
7940
|
}
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7941
|
+
if (isReset) {
|
|
7942
|
+
const {
|
|
7943
|
+
visibleSize
|
|
7944
|
+
} = handleVirtualXVisible(this);
|
|
7945
|
+
scrollXStore.startIndex = 0;
|
|
7946
|
+
scrollXStore.endIndex = visibleSize;
|
|
7947
|
+
scrollXStore.visibleSize = visibleSize;
|
|
7948
|
+
}
|
|
7930
7949
|
}
|
|
7931
7950
|
// 如果列被显示/隐藏,则清除合并状态
|
|
7932
7951
|
// 如果列被设置为固定,则清除合并状态
|
|
@@ -7944,12 +7963,15 @@ const Methods = {
|
|
|
7944
7963
|
});
|
|
7945
7964
|
this.visibleColumn = visibleColumn;
|
|
7946
7965
|
this.handleTableColumn();
|
|
7947
|
-
|
|
7948
|
-
return this.
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7966
|
+
if (isReset) {
|
|
7967
|
+
return this.updateFooter().then(() => {
|
|
7968
|
+
return this.recalculate();
|
|
7969
|
+
}).then(() => {
|
|
7970
|
+
this.updateCellAreas();
|
|
7971
|
+
return this.recalculate();
|
|
7972
|
+
});
|
|
7973
|
+
}
|
|
7974
|
+
return this.updateFooter();
|
|
7953
7975
|
},
|
|
7954
7976
|
/**
|
|
7955
7977
|
* 指定列宽的列进行拆分
|
|
@@ -8280,56 +8302,6 @@ const Methods = {
|
|
|
8280
8302
|
this.checkScrolling();
|
|
8281
8303
|
}
|
|
8282
8304
|
},
|
|
8283
|
-
calcCellHeight() {
|
|
8284
|
-
const $xeTable = this;
|
|
8285
|
-
const props = $xeTable;
|
|
8286
|
-
const reactData = $xeTable;
|
|
8287
|
-
const internalData = $xeTable;
|
|
8288
|
-
const {
|
|
8289
|
-
showOverflow
|
|
8290
|
-
} = props;
|
|
8291
|
-
const {
|
|
8292
|
-
tableData,
|
|
8293
|
-
scrollXLoad,
|
|
8294
|
-
scrollYLoad
|
|
8295
|
-
} = reactData;
|
|
8296
|
-
const {
|
|
8297
|
-
fullAllDataRowIdData
|
|
8298
|
-
} = internalData;
|
|
8299
|
-
const el = $xeTable.$el;
|
|
8300
|
-
if (!showOverflow && (scrollXLoad || scrollYLoad) && el) {
|
|
8301
|
-
let paddingTop = 0;
|
|
8302
|
-
let paddingBottom = 0;
|
|
8303
|
-
let calcPadding = false;
|
|
8304
|
-
tableData.forEach(row => {
|
|
8305
|
-
const rowid = getRowid($xeTable, row);
|
|
8306
|
-
const rowRest = fullAllDataRowIdData[rowid];
|
|
8307
|
-
const trList = el.querySelectorAll(`.vxe-body--row[rowid="${rowid}"]`);
|
|
8308
|
-
if (rowRest && trList.length) {
|
|
8309
|
-
let height = 0;
|
|
8310
|
-
for (let i = 0; i < trList.length; i++) {
|
|
8311
|
-
const trEl = trList[i];
|
|
8312
|
-
const tdList = trEl.children;
|
|
8313
|
-
for (let j = 0; j < tdList.length; j++) {
|
|
8314
|
-
const tdEl = tdList[j];
|
|
8315
|
-
const cellElem = tdEl.querySelector('.vxe-cell');
|
|
8316
|
-
if (!calcPadding) {
|
|
8317
|
-
paddingTop = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(tdEl).paddingTop);
|
|
8318
|
-
paddingBottom = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(tdEl).paddingBottom);
|
|
8319
|
-
calcPadding = true;
|
|
8320
|
-
}
|
|
8321
|
-
let cellHeight = paddingTop + paddingBottom;
|
|
8322
|
-
if (cellElem) {
|
|
8323
|
-
cellHeight += cellElem.offsetHeight;
|
|
8324
|
-
}
|
|
8325
|
-
height = Math.max(height, cellHeight);
|
|
8326
|
-
}
|
|
8327
|
-
}
|
|
8328
|
-
rowRest.height = scrollXLoad ? Math.max(rowRest.height, height) : height;
|
|
8329
|
-
}
|
|
8330
|
-
});
|
|
8331
|
-
}
|
|
8332
|
-
},
|
|
8333
8305
|
updateHeight() {
|
|
8334
8306
|
this.customHeight = calcTableHeight(this, 'height');
|
|
8335
8307
|
this.customMinHeight = calcTableHeight(this, 'minHeight');
|
|
@@ -8425,7 +8397,7 @@ const Methods = {
|
|
|
8425
8397
|
} else {
|
|
8426
8398
|
if (fixedType) {
|
|
8427
8399
|
// 如果是使用优化模式
|
|
8428
|
-
if (allColumnHeaderOverflow) {
|
|
8400
|
+
if (scrollXLoad || scrollYLoad || allColumnHeaderOverflow) {
|
|
8429
8401
|
// 如果不支持优化模式
|
|
8430
8402
|
if (spanMethod || footerSpanMethod) {
|
|
8431
8403
|
renderColumnList = visibleColumn;
|
|
@@ -8547,7 +8519,7 @@ const Methods = {
|
|
|
8547
8519
|
let renderColumnList = tableColumn;
|
|
8548
8520
|
if (fixedType) {
|
|
8549
8521
|
// 如果是使用优化模式
|
|
8550
|
-
if (allColumnFooterOverflow) {
|
|
8522
|
+
if (scrollXLoad || scrollYLoad || allColumnFooterOverflow) {
|
|
8551
8523
|
// 如果不支持优化模式
|
|
8552
8524
|
if (spanMethod || footerSpanMethod) {
|
|
8553
8525
|
renderColumnList = visibleColumn;
|
|
@@ -11001,7 +10973,10 @@ const Methods = {
|
|
|
11001
10973
|
const triggerFilter = getEventTargetNode(evnt, cell, 'vxe-cell--filter').flag;
|
|
11002
10974
|
let triggerDrag = false;
|
|
11003
10975
|
if (!(triggerInput || triggerCheckbox || triggerSort || triggerFilter)) {
|
|
11004
|
-
|
|
10976
|
+
const {
|
|
10977
|
+
column
|
|
10978
|
+
} = params;
|
|
10979
|
+
if (columnOpts.drag && !column.fixed && trigger === 'cell' && !(disabledMethod && disabledMethod(params))) {
|
|
11005
10980
|
triggerDrag = true;
|
|
11006
10981
|
$xeTable.handleHeaderCellDragMousedownEvent(evnt, params);
|
|
11007
10982
|
}
|
|
@@ -11377,7 +11352,7 @@ const Methods = {
|
|
|
11377
11352
|
evnt.dataTransfer.setDragImage(img, 0, 0);
|
|
11378
11353
|
}
|
|
11379
11354
|
},
|
|
11380
|
-
|
|
11355
|
+
handleColDragSwapEvent(evnt, isSyncColumn, dragCol, prevDragCol, prevDragPos, prevDragToChild) {
|
|
11381
11356
|
const $xeTable = this;
|
|
11382
11357
|
const props = $xeTable;
|
|
11383
11358
|
const reactData = $xeTable;
|
|
@@ -11393,13 +11368,7 @@ const Methods = {
|
|
|
11393
11368
|
dragEndMethod
|
|
11394
11369
|
} = columnDragOpts;
|
|
11395
11370
|
const {
|
|
11396
|
-
|
|
11397
|
-
} = reactData;
|
|
11398
|
-
const {
|
|
11399
|
-
collectColumn,
|
|
11400
|
-
prevDragCol,
|
|
11401
|
-
prevDragPos,
|
|
11402
|
-
prevDragToChild
|
|
11371
|
+
collectColumn
|
|
11403
11372
|
} = internalData;
|
|
11404
11373
|
const dragOffsetIndex = prevDragPos === 'right' ? 1 : 0;
|
|
11405
11374
|
if (prevDragCol && dragCol) {
|
|
@@ -11407,7 +11376,7 @@ const Methods = {
|
|
|
11407
11376
|
if (prevDragCol !== dragCol) {
|
|
11408
11377
|
const oldColumn = dragCol;
|
|
11409
11378
|
const newColumn = prevDragCol;
|
|
11410
|
-
Promise.resolve(dragEndMethod ? dragEndMethod({
|
|
11379
|
+
return Promise.resolve(dragEndMethod ? dragEndMethod({
|
|
11411
11380
|
oldColumn,
|
|
11412
11381
|
newColumn,
|
|
11413
11382
|
dragPos: prevDragPos,
|
|
@@ -11528,9 +11497,6 @@ const Methods = {
|
|
|
11528
11497
|
$xeTable.clearCopyCellArea();
|
|
11529
11498
|
}
|
|
11530
11499
|
}
|
|
11531
|
-
$xeTable.refreshColumn(true).then(() => {
|
|
11532
|
-
$xeTable.updateCellAreas();
|
|
11533
|
-
});
|
|
11534
11500
|
$xeTable.dispatchEvent('column-dragend', {
|
|
11535
11501
|
oldColumn,
|
|
11536
11502
|
newColumn,
|
|
@@ -11541,10 +11507,31 @@ const Methods = {
|
|
|
11541
11507
|
oldIndex: oafIndex
|
|
11542
11508
|
}
|
|
11543
11509
|
}, evnt);
|
|
11544
|
-
|
|
11510
|
+
if (isSyncColumn) {
|
|
11511
|
+
$xeTable.handleUpdateColumn();
|
|
11512
|
+
$xeTable.parseColumns(false).then(() => {
|
|
11513
|
+
$xeTable.updateCellAreas();
|
|
11514
|
+
return $xeTable.saveCustomStore('update:sort');
|
|
11515
|
+
});
|
|
11516
|
+
}
|
|
11545
11517
|
}).catch(() => {});
|
|
11546
11518
|
}
|
|
11547
11519
|
}
|
|
11520
|
+
return Promise.resolve();
|
|
11521
|
+
},
|
|
11522
|
+
handleHeaderCellDragDragendEvent(evnt) {
|
|
11523
|
+
const $xeTable = this;
|
|
11524
|
+
const reactData = $xeTable;
|
|
11525
|
+
const internalData = $xeTable;
|
|
11526
|
+
const {
|
|
11527
|
+
dragCol
|
|
11528
|
+
} = reactData;
|
|
11529
|
+
const {
|
|
11530
|
+
prevDragCol,
|
|
11531
|
+
prevDragPos,
|
|
11532
|
+
prevDragToChild
|
|
11533
|
+
} = internalData;
|
|
11534
|
+
$xeTable.handleColDragSwapEvent(evnt, true, dragCol, prevDragCol, prevDragPos, prevDragToChild);
|
|
11548
11535
|
hideDropTip($xeTable);
|
|
11549
11536
|
clearColDropOrigin($xeTable);
|
|
11550
11537
|
internalData.prevDragToChild = false;
|
|
@@ -11552,6 +11539,9 @@ const Methods = {
|
|
|
11552
11539
|
reactData.dragCol = null;
|
|
11553
11540
|
setTimeout(() => {
|
|
11554
11541
|
reactData.isDragColMove = false;
|
|
11542
|
+
$xeTable.recalculate().then(() => {
|
|
11543
|
+
$xeTable.loadScrollXData();
|
|
11544
|
+
});
|
|
11555
11545
|
}, 500);
|
|
11556
11546
|
},
|
|
11557
11547
|
handleHeaderCellDragDragoverEvent(evnt) {
|
|
@@ -11577,11 +11567,11 @@ const Methods = {
|
|
|
11577
11567
|
if (column) {
|
|
11578
11568
|
evnt.preventDefault();
|
|
11579
11569
|
const {
|
|
11580
|
-
|
|
11581
|
-
} =
|
|
11582
|
-
const offsetX =
|
|
11570
|
+
clientX
|
|
11571
|
+
} = evnt;
|
|
11572
|
+
const offsetX = clientX - thEl.getBoundingClientRect().x;
|
|
11583
11573
|
const dragPos = offsetX < thEl.clientWidth / 2 ? 'left' : 'right';
|
|
11584
|
-
if (dragCol && dragCol.id === column.id || !isCrossDrag && column.parentId) {
|
|
11574
|
+
if (column.fixed || dragCol && dragCol.id === column.id || !isCrossDrag && column.parentId) {
|
|
11585
11575
|
showDropTip($xeTable, evnt, null, thEl, false, dragPos);
|
|
11586
11576
|
return;
|
|
11587
11577
|
}
|
|
@@ -11594,6 +11584,35 @@ const Methods = {
|
|
|
11594
11584
|
targetColumn: column,
|
|
11595
11585
|
dragPos
|
|
11596
11586
|
}, evnt);
|
|
11587
|
+
// 边缘滚动
|
|
11588
|
+
const el = $xeTable.$refs.refElem;
|
|
11589
|
+
if (!el) {
|
|
11590
|
+
return;
|
|
11591
|
+
}
|
|
11592
|
+
const xHandleEl = $xeTable.$refs.refScrollXHandleElem;
|
|
11593
|
+
const tableBody = $xeTable.$refs.tableBody;
|
|
11594
|
+
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
11595
|
+
const scrollTargetEl = xHandleEl || tableBodyElem;
|
|
11596
|
+
if (scrollTargetEl) {
|
|
11597
|
+
const wrapperRect = el.getBoundingClientRect();
|
|
11598
|
+
const tableWidth = el.clientWidth;
|
|
11599
|
+
const leftContainerElem = $xeTable.$refs.leftContainer;
|
|
11600
|
+
const leftContainerWidth = leftContainerElem ? leftContainerElem.clientWidth : 0;
|
|
11601
|
+
const rightContainerElem = $xeTable.$refs.rightContainer;
|
|
11602
|
+
const rightContainerWidth = rightContainerElem ? rightContainerElem.clientWidth : 0;
|
|
11603
|
+
const srartX = wrapperRect.x + leftContainerWidth;
|
|
11604
|
+
const endX = wrapperRect.x + tableWidth - rightContainerWidth;
|
|
11605
|
+
const distSize = 28;
|
|
11606
|
+
const startDistSize = clientX - srartX;
|
|
11607
|
+
const endDistSize = endX - clientX;
|
|
11608
|
+
if (startDistSize > 0 && startDistSize <= distSize) {
|
|
11609
|
+
const scrollRatio = Math.floor(tableWidth / (startDistSize > distSize / 2 ? 240 : 120));
|
|
11610
|
+
scrollTargetEl.scrollLeft -= scrollRatio * (distSize - startDistSize);
|
|
11611
|
+
} else if (endDistSize > 0 && endDistSize <= distSize) {
|
|
11612
|
+
const scrollRatio = Math.floor(tableWidth / (endDistSize > distSize / 2 ? 240 : 120));
|
|
11613
|
+
scrollTargetEl.scrollLeft += scrollRatio * (distSize - endDistSize);
|
|
11614
|
+
}
|
|
11615
|
+
}
|
|
11597
11616
|
}
|
|
11598
11617
|
},
|
|
11599
11618
|
handleHeaderCellDragMousedownEvent(evnt, params) {
|
|
@@ -13151,6 +13170,15 @@ const Methods = {
|
|
|
13151
13170
|
});
|
|
13152
13171
|
this.tableColumn = tableColumn;
|
|
13153
13172
|
},
|
|
13173
|
+
handleUpdateColumn() {
|
|
13174
|
+
const $xeTable = this;
|
|
13175
|
+
const internalData = $xeTable;
|
|
13176
|
+
const columnList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(internalData.collectColumn, 'renderSortNumber');
|
|
13177
|
+
internalData.collectColumn = columnList;
|
|
13178
|
+
const tableFullColumn = getColumnList(columnList);
|
|
13179
|
+
internalData.tableFullColumn = tableFullColumn;
|
|
13180
|
+
$xeTable.cacheColumnMap();
|
|
13181
|
+
},
|
|
13154
13182
|
updateScrollXData() {
|
|
13155
13183
|
const $xeTable = this;
|
|
13156
13184
|
const props = $xeTable;
|
|
@@ -14180,15 +14208,9 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
14180
14208
|
}
|
|
14181
14209
|
// 拖拽行事件
|
|
14182
14210
|
if (rowOpts.drag && (!treeConfig || transform)) {
|
|
14183
|
-
trOn.dragstart =
|
|
14184
|
-
|
|
14185
|
-
|
|
14186
|
-
trOn.dragover = evnt => {
|
|
14187
|
-
$xeTable.handleRowDragDragoverEvent(evnt);
|
|
14188
|
-
};
|
|
14189
|
-
trOn.dragend = evnt => {
|
|
14190
|
-
$xeTable.handleRowDragDragendEvent(evnt);
|
|
14191
|
-
};
|
|
14211
|
+
trOn.dragstart = $xeTable.handleRowDragDragstartEvent;
|
|
14212
|
+
trOn.dragend = $xeTable.handleRowDragDragendEvent;
|
|
14213
|
+
trOn.dragover = $xeTable.handleRowDragDragoverEvent;
|
|
14192
14214
|
}
|
|
14193
14215
|
const trClass = ['vxe-body--row', treeConfig ? `row--level-${rowLevel}` : '', {
|
|
14194
14216
|
'row--stripe': stripe && (_rowIndex + 1) % 2 === 0,
|
|
@@ -14366,16 +14388,21 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
14366
14388
|
scrollYLoad,
|
|
14367
14389
|
isAllOverflow,
|
|
14368
14390
|
isDragRowMove,
|
|
14369
|
-
expandColumn
|
|
14391
|
+
expandColumn,
|
|
14392
|
+
dragRow,
|
|
14393
|
+
dragCol
|
|
14370
14394
|
} = tableReactData;
|
|
14371
14395
|
const {
|
|
14372
|
-
visibleColumn
|
|
14396
|
+
visibleColumn,
|
|
14397
|
+
fullAllDataRowIdData,
|
|
14398
|
+
fullColumnIdData
|
|
14373
14399
|
} = tableInternalData;
|
|
14374
14400
|
const rowOpts = $xeTable.computeRowOpts;
|
|
14375
14401
|
const sYOpts = $xeTable.computeSYOpts;
|
|
14376
14402
|
const emptyOpts = $xeTable.computeEmptyOpts;
|
|
14377
14403
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
14378
14404
|
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
14405
|
+
let renderDataList = tableData;
|
|
14379
14406
|
let renderColumnList = tableColumn;
|
|
14380
14407
|
if (fixedType) {
|
|
14381
14408
|
// 如果是使用优化模式
|
|
@@ -14390,6 +14417,52 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
14390
14417
|
renderColumnList = visibleColumn;
|
|
14391
14418
|
}
|
|
14392
14419
|
}
|
|
14420
|
+
// 行拖拽
|
|
14421
|
+
if (scrollYLoad && dragRow) {
|
|
14422
|
+
if (renderDataList.length > 2) {
|
|
14423
|
+
const dRowRest = fullAllDataRowIdData[getRowid($xeTable, dragRow)];
|
|
14424
|
+
if (dRowRest) {
|
|
14425
|
+
const drIndex = dRowRest._index;
|
|
14426
|
+
const firstRow = renderDataList[0];
|
|
14427
|
+
const lastRow = renderDataList[renderDataList.length - 1];
|
|
14428
|
+
const firstRowRest = fullAllDataRowIdData[getRowid($xeTable, firstRow)];
|
|
14429
|
+
const lastRowRest = fullAllDataRowIdData[getRowid($xeTable, lastRow)];
|
|
14430
|
+
if (firstRowRest && lastRowRest) {
|
|
14431
|
+
const frIndex = firstRowRest._index;
|
|
14432
|
+
const lrIndex = lastRowRest._index;
|
|
14433
|
+
if (drIndex < frIndex) {
|
|
14434
|
+
renderDataList = [dragRow].concat(renderDataList);
|
|
14435
|
+
} else if (drIndex > lrIndex) {
|
|
14436
|
+
renderDataList = renderDataList.concat([dragRow]);
|
|
14437
|
+
}
|
|
14438
|
+
}
|
|
14439
|
+
}
|
|
14440
|
+
}
|
|
14441
|
+
}
|
|
14442
|
+
if (!fixedType) {
|
|
14443
|
+
// 列拖拽
|
|
14444
|
+
if (scrollXLoad && dragCol) {
|
|
14445
|
+
if (renderColumnList.length > 2) {
|
|
14446
|
+
const dCowRest = fullColumnIdData[dragCol.id];
|
|
14447
|
+
if (dCowRest) {
|
|
14448
|
+
const dcIndex = dCowRest._index;
|
|
14449
|
+
const firstCol = renderColumnList[0];
|
|
14450
|
+
const lastCol = renderColumnList[renderColumnList.length - 1];
|
|
14451
|
+
const firstColRest = fullColumnIdData[firstCol.id];
|
|
14452
|
+
const lastColRest = fullColumnIdData[lastCol.id];
|
|
14453
|
+
if (firstColRest && lastColRest) {
|
|
14454
|
+
const fcIndex = firstColRest._index;
|
|
14455
|
+
const lcIndex = lastColRest._index;
|
|
14456
|
+
if (dcIndex < fcIndex) {
|
|
14457
|
+
renderColumnList = [dragCol].concat(renderColumnList);
|
|
14458
|
+
} else if (dcIndex > lcIndex) {
|
|
14459
|
+
renderColumnList = renderColumnList.concat([dragCol]);
|
|
14460
|
+
}
|
|
14461
|
+
}
|
|
14462
|
+
}
|
|
14463
|
+
}
|
|
14464
|
+
}
|
|
14465
|
+
}
|
|
14393
14466
|
let emptyContent;
|
|
14394
14467
|
if ($scopedSlots.empty) {
|
|
14395
14468
|
emptyContent = $scopedSlots.empty.call(this, {
|
|
@@ -14457,9 +14530,9 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
14457
14530
|
tag: 'tbody',
|
|
14458
14531
|
name: `vxe-body--row-list${isDragRowMove ? '' : '-disabled'}`
|
|
14459
14532
|
}
|
|
14460
|
-
}, renderRows(h, this, $xeTable, fixedType,
|
|
14533
|
+
}, renderRows(h, this, $xeTable, fixedType, renderDataList, renderColumnList)) : h('tbody', {
|
|
14461
14534
|
ref: 'tbody'
|
|
14462
|
-
}, renderRows(h, this, $xeTable, fixedType,
|
|
14535
|
+
}, renderRows(h, this, $xeTable, fixedType, renderDataList, renderColumnList))]), h('div', {
|
|
14463
14536
|
class: 'vxe-table--checkbox-range'
|
|
14464
14537
|
}), mouseConfig && mouseOpts.area ? h('div', {
|
|
14465
14538
|
class: 'vxe-table--cell-area'
|
|
@@ -14821,6 +14894,7 @@ const header_renderRows = (h, _vm, cols, $rowIndex) => {
|
|
|
14821
14894
|
'is--sortable': column.sortable,
|
|
14822
14895
|
'col--filter': !!column.filters,
|
|
14823
14896
|
'is--filter-active': hasFilter,
|
|
14897
|
+
'is--drag-active': !column.fixed && !isDisabledDrag,
|
|
14824
14898
|
'is--drag-disabled': isDisabledDrag,
|
|
14825
14899
|
'col--current': currentColumn === column
|
|
14826
14900
|
}, getClass(headerClassName, params), getClass(headerCellClassName, params)],
|
|
@@ -14972,19 +15046,23 @@ function renderHeads(h, _vm, headerGroups) {
|
|
|
14972
15046
|
} = tableProps;
|
|
14973
15047
|
const {
|
|
14974
15048
|
isGroup,
|
|
14975
|
-
|
|
15049
|
+
scrollXLoad,
|
|
15050
|
+
scrollYLoad,
|
|
15051
|
+
scrollbarWidth,
|
|
15052
|
+
dragCol
|
|
14976
15053
|
} = tableReactData;
|
|
14977
15054
|
const {
|
|
14978
|
-
visibleColumn
|
|
15055
|
+
visibleColumn,
|
|
15056
|
+
fullColumnIdData
|
|
14979
15057
|
} = tableInternalData;
|
|
14980
|
-
let
|
|
15058
|
+
let renderHeaderList = headerColumn;
|
|
14981
15059
|
let renderColumnList = tableColumn;
|
|
14982
15060
|
if (isGroup) {
|
|
14983
15061
|
renderColumnList = visibleColumn;
|
|
14984
15062
|
} else {
|
|
14985
15063
|
if (fixedType) {
|
|
14986
15064
|
// 如果是使用优化模式
|
|
14987
|
-
if (allColumnHeaderOverflow) {
|
|
15065
|
+
if (scrollXLoad || scrollYLoad || allColumnHeaderOverflow) {
|
|
14988
15066
|
// 如果不支持优化模式
|
|
14989
15067
|
if (spanMethod || footerSpanMethod) {
|
|
14990
15068
|
renderColumnList = visibleColumn;
|
|
@@ -14995,7 +15073,35 @@ function renderHeads(h, _vm, headerGroups) {
|
|
|
14995
15073
|
renderColumnList = visibleColumn;
|
|
14996
15074
|
}
|
|
14997
15075
|
}
|
|
14998
|
-
|
|
15076
|
+
renderHeaderList = [renderColumnList];
|
|
15077
|
+
}
|
|
15078
|
+
if (!fixedType) {
|
|
15079
|
+
// 列拖拽
|
|
15080
|
+
if (scrollXLoad && dragCol) {
|
|
15081
|
+
if (renderColumnList.length > 2) {
|
|
15082
|
+
const dCowRest = fullColumnIdData[dragCol.id];
|
|
15083
|
+
if (dCowRest) {
|
|
15084
|
+
const dcIndex = dCowRest._index;
|
|
15085
|
+
const firstCol = renderColumnList[0];
|
|
15086
|
+
const lastCol = renderColumnList[renderColumnList.length - 1];
|
|
15087
|
+
const firstColRest = fullColumnIdData[firstCol.id];
|
|
15088
|
+
const lastColRest = fullColumnIdData[lastCol.id];
|
|
15089
|
+
if (firstColRest && lastColRest) {
|
|
15090
|
+
const fcIndex = firstColRest._index;
|
|
15091
|
+
const lcIndex = lastColRest._index;
|
|
15092
|
+
console.log(dragCol.id, dcIndex, fcIndex, lcIndex, renderColumnList.length);
|
|
15093
|
+
if (dcIndex < fcIndex) {
|
|
15094
|
+
renderColumnList = [dragCol].concat(renderColumnList);
|
|
15095
|
+
renderHeaderList = [[dragCol].concat(renderHeaderList[0])].concat(renderHeaderList.slice(1));
|
|
15096
|
+
} else if (dcIndex > lcIndex) {
|
|
15097
|
+
renderColumnList = renderColumnList.concat([dragCol]);
|
|
15098
|
+
renderHeaderList = [renderHeaderList[0].concat([dragCol])].concat(renderHeaderList.slice(1));
|
|
15099
|
+
}
|
|
15100
|
+
console.log(renderColumnList.length);
|
|
15101
|
+
}
|
|
15102
|
+
}
|
|
15103
|
+
}
|
|
15104
|
+
}
|
|
14999
15105
|
}
|
|
15000
15106
|
return h('div', {
|
|
15001
15107
|
class: ['vxe-table--header-wrapper', fixedType ? `fixed-${fixedType}--wrapper` : 'body--wrapper'],
|
|
@@ -15037,7 +15143,7 @@ function renderHeads(h, _vm, headerGroups) {
|
|
|
15037
15143
|
*/
|
|
15038
15144
|
h('thead', {
|
|
15039
15145
|
ref: 'thead'
|
|
15040
|
-
}, renderHeads(h, this,
|
|
15146
|
+
}, renderHeads(h, this, renderHeaderList))]),
|
|
15041
15147
|
/**
|
|
15042
15148
|
* 其他
|
|
15043
15149
|
*/
|
|
@@ -15485,16 +15591,20 @@ function footer_renderHeads(h, _vm, renderColumnList) {
|
|
|
15485
15591
|
showFooterOverflow: allColumnFooterOverflow
|
|
15486
15592
|
} = tableProps;
|
|
15487
15593
|
const {
|
|
15488
|
-
visibleColumn
|
|
15594
|
+
visibleColumn,
|
|
15595
|
+
fullColumnIdData
|
|
15489
15596
|
} = tableInternalData;
|
|
15490
15597
|
const {
|
|
15491
|
-
|
|
15598
|
+
scrollXLoad,
|
|
15599
|
+
scrollYLoad,
|
|
15600
|
+
scrollbarWidth,
|
|
15601
|
+
dragCol
|
|
15492
15602
|
} = tableReactData;
|
|
15493
15603
|
let renderColumnList = tableColumn;
|
|
15494
15604
|
// 如果是使用优化模式
|
|
15495
15605
|
if (fixedType) {
|
|
15496
15606
|
// 如果是使用优化模式
|
|
15497
|
-
if (allColumnFooterOverflow) {
|
|
15607
|
+
if (scrollXLoad || scrollYLoad || allColumnFooterOverflow) {
|
|
15498
15608
|
// 如果不支持优化模式
|
|
15499
15609
|
if (spanMethod || footerSpanMethod) {
|
|
15500
15610
|
renderColumnList = visibleColumn;
|
|
@@ -15505,6 +15615,30 @@ function footer_renderHeads(h, _vm, renderColumnList) {
|
|
|
15505
15615
|
renderColumnList = visibleColumn;
|
|
15506
15616
|
}
|
|
15507
15617
|
}
|
|
15618
|
+
if (!fixedType) {
|
|
15619
|
+
// 列拖拽
|
|
15620
|
+
if (scrollXLoad && dragCol) {
|
|
15621
|
+
if (renderColumnList.length > 2) {
|
|
15622
|
+
const dCowRest = fullColumnIdData[dragCol.id];
|
|
15623
|
+
if (dCowRest) {
|
|
15624
|
+
const dcIndex = dCowRest._index;
|
|
15625
|
+
const firstCol = renderColumnList[0];
|
|
15626
|
+
const lastCol = renderColumnList[renderColumnList.length - 1];
|
|
15627
|
+
const firstColRest = fullColumnIdData[firstCol.id];
|
|
15628
|
+
const lastColRest = fullColumnIdData[lastCol.id];
|
|
15629
|
+
if (firstColRest && lastColRest) {
|
|
15630
|
+
const fcIndex = firstColRest._index;
|
|
15631
|
+
const lcIndex = lastColRest._index;
|
|
15632
|
+
if (dcIndex < fcIndex) {
|
|
15633
|
+
renderColumnList = [dragCol].concat(renderColumnList);
|
|
15634
|
+
} else if (dcIndex > lcIndex) {
|
|
15635
|
+
renderColumnList = renderColumnList.concat([dragCol]);
|
|
15636
|
+
}
|
|
15637
|
+
}
|
|
15638
|
+
}
|
|
15639
|
+
}
|
|
15640
|
+
}
|
|
15641
|
+
}
|
|
15508
15642
|
const ons = {};
|
|
15509
15643
|
if (!fixedType) {
|
|
15510
15644
|
ons.scroll = this.scrollEvent;
|
|
@@ -15919,12 +16053,14 @@ function panel_hideDropTip(_vm) {
|
|
|
15919
16053
|
}
|
|
15920
16054
|
}
|
|
15921
16055
|
const renderDragTip = (h, _vm) => {
|
|
15922
|
-
const
|
|
15923
|
-
|
|
15924
|
-
|
|
16056
|
+
const $xeTable = _vm.$xeTable;
|
|
16057
|
+
const dragCol = $xeTable.dragColumnRef;
|
|
16058
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
15925
16059
|
return h('div', {}, [h('div', {
|
|
15926
16060
|
ref: 'refDragLineElem',
|
|
15927
|
-
class: 'vxe-table-custom-popup--drag-line'
|
|
16061
|
+
class: ['vxe-table-custom-popup--drag-line', {
|
|
16062
|
+
'is--guides': columnDragOpts.showGuidesStatus
|
|
16063
|
+
}]
|
|
15928
16064
|
}), h('div', {
|
|
15929
16065
|
ref: 'refDragTipElem',
|
|
15930
16066
|
class: 'vxe-table-custom-popup--drag-tip'
|
|
@@ -23922,19 +24058,6 @@ function handleUupdateResize(_vm) {
|
|
|
23922
24058
|
y: overflowY && scrollYLoad
|
|
23923
24059
|
};
|
|
23924
24060
|
},
|
|
23925
|
-
computeTableStyle() {
|
|
23926
|
-
const $xeTable = this;
|
|
23927
|
-
const reactData = $xeTable;
|
|
23928
|
-
const {
|
|
23929
|
-
tableData
|
|
23930
|
-
} = reactData;
|
|
23931
|
-
const columnOpts = $xeTable.computeColumnOpts;
|
|
23932
|
-
const stys = {};
|
|
23933
|
-
if (columnOpts.drag) {
|
|
23934
|
-
stys['--vxe-ui-table-drag-column-move-delay'] = `${Math.max(0.06, Math.min(0.3, tableData.length / 800))}s`;
|
|
23935
|
-
}
|
|
23936
|
-
return stys;
|
|
23937
|
-
},
|
|
23938
24061
|
tabsResizeFlag() {
|
|
23939
24062
|
const $xeTable = this;
|
|
23940
24063
|
const $xeTabs = $xeTable.$xeTabs;
|
|
@@ -23990,6 +24113,11 @@ function handleUupdateResize(_vm) {
|
|
|
23990
24113
|
maxHeight() {
|
|
23991
24114
|
this.$nextTick(() => this.recalculate(true));
|
|
23992
24115
|
},
|
|
24116
|
+
computeSize() {
|
|
24117
|
+
this.$nextTick(() => {
|
|
24118
|
+
this.recalculate(true).then(() => this.refreshScroll());
|
|
24119
|
+
});
|
|
24120
|
+
},
|
|
23993
24121
|
syncResize(value) {
|
|
23994
24122
|
if (value) {
|
|
23995
24123
|
handleUupdateResize(this);
|
|
@@ -24409,7 +24537,6 @@ function handleUupdateResize(_vm) {
|
|
|
24409
24537
|
const tableBorder = $xeTable.computeTableBorder;
|
|
24410
24538
|
const virtualScrollBars = $xeTable.computeVirtualScrollBars;
|
|
24411
24539
|
const isArea = mouseConfig && mouseOpts.area;
|
|
24412
|
-
const tableStyle = $xeTable.computeTableStyle;
|
|
24413
24540
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
24414
24541
|
return h('div', {
|
|
24415
24542
|
ref: 'refElem',
|
|
@@ -24444,7 +24571,6 @@ function handleUupdateResize(_vm) {
|
|
|
24444
24571
|
'is--virtual-x': scrollXLoad,
|
|
24445
24572
|
'is--virtual-y': scrollYLoad
|
|
24446
24573
|
}],
|
|
24447
|
-
style: tableStyle,
|
|
24448
24574
|
attrs: {
|
|
24449
24575
|
spellcheck: false
|
|
24450
24576
|
},
|
|
@@ -27768,7 +27894,9 @@ render_renderer.mixin({
|
|
|
27768
27894
|
} = params;
|
|
27769
27895
|
let cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
27770
27896
|
if (cellValue) {
|
|
27771
|
-
|
|
27897
|
+
if (props.type !== 'time') {
|
|
27898
|
+
cellValue = getLabelFormatDate(cellValue, props);
|
|
27899
|
+
}
|
|
27772
27900
|
}
|
|
27773
27901
|
return getCellLabelVNs(h, renderOpts, params, cellValue);
|
|
27774
27902
|
},
|