vxe-table 4.10.12 → 4.10.14
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/module/edit/hook.js +133 -123
- package/es/table/module/export/hook.js +3 -2
- package/es/table/src/body.js +1 -0
- package/es/table/src/table.js +40 -12
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +224 -168
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/hook.js +159 -149
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +3 -2
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/src/body.js +1 -0
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/table.js +57 -13
- 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 +2 -2
- package/packages/table/module/edit/hook.ts +136 -124
- package/packages/table/module/export/hook.ts +3 -2
- package/packages/table/src/body.ts +1 -0
- package/packages/table/src/table.ts +43 -12
- /package/es/{iconfont.1739237387649.ttf → iconfont.1739333111603.ttf} +0 -0
- /package/es/{iconfont.1739237387649.woff → iconfont.1739333111603.woff} +0 -0
- /package/es/{iconfont.1739237387649.woff2 → iconfont.1739333111603.woff2} +0 -0
- /package/lib/{iconfont.1739237387649.ttf → iconfont.1739333111603.ttf} +0 -0
- /package/lib/{iconfont.1739237387649.woff → iconfont.1739333111603.woff} +0 -0
- /package/lib/{iconfont.1739237387649.woff2 → iconfont.1739333111603.woff2} +0 -0
|
@@ -38,7 +38,7 @@ hooks.add('tableEditModule', {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
const syncActivedCell = () => {
|
|
42
42
|
const { editStore, tableColumn } = reactData;
|
|
43
43
|
const editOpts = computeEditOpts.value;
|
|
44
44
|
const { actived } = editStore;
|
|
@@ -51,8 +51,8 @@ hooks.add('tableEditModule', {
|
|
|
51
51
|
setEditColumnModel(row, column);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
}
|
|
55
|
-
|
|
54
|
+
};
|
|
55
|
+
const insertTreeRow = (newRecords, isAppend) => {
|
|
56
56
|
const { tableFullTreeData, afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData;
|
|
57
57
|
const treeOpts = computeTreeOpts.value;
|
|
58
58
|
const { rowField, parentField, mapChildrenField } = treeOpts;
|
|
@@ -93,7 +93,7 @@ hooks.add('tableEditModule', {
|
|
|
93
93
|
fullAllDataRowIdData[rowid] = rest;
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
-
}
|
|
96
|
+
};
|
|
97
97
|
const handleInsertRowAt = (records, targetRow, isInsertNextRow) => {
|
|
98
98
|
const { treeConfig } = props;
|
|
99
99
|
const { mergeList, editStore } = reactData;
|
|
@@ -325,6 +325,132 @@ hooks.add('tableEditModule', {
|
|
|
325
325
|
}
|
|
326
326
|
});
|
|
327
327
|
};
|
|
328
|
+
const handleEditActive = (params, evnt, isFocus) => {
|
|
329
|
+
const { editConfig, mouseConfig } = props;
|
|
330
|
+
const { editStore, tableColumn } = reactData;
|
|
331
|
+
const editOpts = computeEditOpts.value;
|
|
332
|
+
const { mode } = editOpts;
|
|
333
|
+
const { actived, focused } = editStore;
|
|
334
|
+
const { row, column } = params;
|
|
335
|
+
const { editRender } = column;
|
|
336
|
+
const cell = (params.cell || $xeTable.getCellElement(row, column));
|
|
337
|
+
const beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
338
|
+
params.cell = cell;
|
|
339
|
+
if (cell && isEnableConf(editConfig) && isEnableConf(editRender)) {
|
|
340
|
+
// 激活编辑
|
|
341
|
+
if (!$xeTable.isPendingByRow(row)) {
|
|
342
|
+
if (actived.row !== row || (mode === 'cell' ? actived.column !== column : false)) {
|
|
343
|
+
// 判断是否禁用编辑
|
|
344
|
+
let type = 'edit-disabled';
|
|
345
|
+
if (!beforeEditMethod || beforeEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeTable.xegrid }))) {
|
|
346
|
+
if (mouseConfig) {
|
|
347
|
+
$xeTable.clearSelected();
|
|
348
|
+
if ($xeTable.clearCellAreas) {
|
|
349
|
+
$xeTable.clearCellAreas();
|
|
350
|
+
$xeTable.clearCopyCellArea();
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
$xeTable.closeTooltip();
|
|
354
|
+
if (actived.column) {
|
|
355
|
+
handleClearEdit(evnt);
|
|
356
|
+
}
|
|
357
|
+
type = 'edit-activated';
|
|
358
|
+
column.renderHeight = cell.offsetHeight;
|
|
359
|
+
actived.args = params;
|
|
360
|
+
actived.row = row;
|
|
361
|
+
actived.column = column;
|
|
362
|
+
if (mode === 'row') {
|
|
363
|
+
tableColumn.forEach((column) => getEditColumnModel(row, column));
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
getEditColumnModel(row, column);
|
|
367
|
+
}
|
|
368
|
+
const afterEditMethod = editOpts.afterEditMethod;
|
|
369
|
+
nextTick(() => {
|
|
370
|
+
if (isFocus) {
|
|
371
|
+
$xeTable.handleFocus(params, evnt);
|
|
372
|
+
}
|
|
373
|
+
if (afterEditMethod) {
|
|
374
|
+
afterEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeTable.xegrid }));
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
$xeTable.dispatchEvent(type, {
|
|
379
|
+
row,
|
|
380
|
+
rowIndex: $xeTable.getRowIndex(row),
|
|
381
|
+
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
382
|
+
column,
|
|
383
|
+
columnIndex: $xeTable.getColumnIndex(column),
|
|
384
|
+
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
385
|
+
}, evnt);
|
|
386
|
+
// v4已废弃
|
|
387
|
+
if (type === 'edit-activated') {
|
|
388
|
+
$xeTable.dispatchEvent('edit-actived', {
|
|
389
|
+
row,
|
|
390
|
+
rowIndex: $xeTable.getRowIndex(row),
|
|
391
|
+
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
392
|
+
column,
|
|
393
|
+
columnIndex: $xeTable.getColumnIndex(column),
|
|
394
|
+
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
395
|
+
}, evnt);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
const { column: oldColumn } = actived;
|
|
400
|
+
if (mouseConfig) {
|
|
401
|
+
$xeTable.clearSelected();
|
|
402
|
+
if ($xeTable.clearCellAreas) {
|
|
403
|
+
$xeTable.clearCellAreas();
|
|
404
|
+
$xeTable.clearCopyCellArea();
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
if (oldColumn !== column) {
|
|
408
|
+
const { model: oldModel } = oldColumn;
|
|
409
|
+
if (oldModel.update) {
|
|
410
|
+
setCellValue(row, oldColumn, oldModel.value);
|
|
411
|
+
}
|
|
412
|
+
if ($xeTable.clearValidate) {
|
|
413
|
+
$xeTable.clearValidate(row, column);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
column.renderHeight = cell.offsetHeight;
|
|
417
|
+
actived.args = params;
|
|
418
|
+
actived.column = column;
|
|
419
|
+
if (isFocus) {
|
|
420
|
+
setTimeout(() => {
|
|
421
|
+
$xeTable.handleFocus(params, evnt);
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
focused.column = null;
|
|
426
|
+
focused.row = null;
|
|
427
|
+
$xeTable.focus();
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
return nextTick();
|
|
431
|
+
};
|
|
432
|
+
const handleEditCell = (row, fieldOrColumn, isPos) => {
|
|
433
|
+
const { editConfig } = props;
|
|
434
|
+
const column = XEUtils.isString(fieldOrColumn) ? $xeTable.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
435
|
+
if (row && column && isEnableConf(editConfig) && isEnableConf(column.editRender)) {
|
|
436
|
+
return Promise.resolve(isPos ? $xeTable.scrollToRow(row, column) : null).then(() => {
|
|
437
|
+
const cell = $xeTable.getCellElement(row, column);
|
|
438
|
+
if (cell) {
|
|
439
|
+
handleEditActive({
|
|
440
|
+
row,
|
|
441
|
+
rowIndex: $xeTable.getRowIndex(row),
|
|
442
|
+
column,
|
|
443
|
+
columnIndex: $xeTable.getColumnIndex(column),
|
|
444
|
+
cell,
|
|
445
|
+
$table: $xeTable
|
|
446
|
+
}, null, false);
|
|
447
|
+
internalData._lastCallTime = Date.now();
|
|
448
|
+
}
|
|
449
|
+
return nextTick();
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
return nextTick();
|
|
453
|
+
};
|
|
328
454
|
editMethods = {
|
|
329
455
|
/**
|
|
330
456
|
* 往表格中插入临时数据
|
|
@@ -658,7 +784,7 @@ hooks.add('tableEditModule', {
|
|
|
658
784
|
if (fieldOrColumn) {
|
|
659
785
|
column = XEUtils.isString(fieldOrColumn) ? $xeTable.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
660
786
|
}
|
|
661
|
-
return
|
|
787
|
+
return handleEditCell(row, column, false);
|
|
662
788
|
},
|
|
663
789
|
setActiveCell(row, fieldOrColumn) {
|
|
664
790
|
if (process.env.NODE_ENV === 'development') {
|
|
@@ -671,26 +797,7 @@ hooks.add('tableEditModule', {
|
|
|
671
797
|
* 激活单元格编辑
|
|
672
798
|
*/
|
|
673
799
|
setEditCell(row, fieldOrColumn) {
|
|
674
|
-
|
|
675
|
-
const column = XEUtils.isString(fieldOrColumn) ? $xeTable.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
676
|
-
if (row && column && isEnableConf(editConfig) && isEnableConf(column.editRender)) {
|
|
677
|
-
return $xeTable.scrollToRow(row, column).then(() => {
|
|
678
|
-
const cell = $xeTable.getCellElement(row, column);
|
|
679
|
-
if (cell) {
|
|
680
|
-
editPrivateMethods.handleEdit({
|
|
681
|
-
row,
|
|
682
|
-
rowIndex: $xeTable.getRowIndex(row),
|
|
683
|
-
column,
|
|
684
|
-
columnIndex: $xeTable.getColumnIndex(column),
|
|
685
|
-
cell,
|
|
686
|
-
$table: $xeTable
|
|
687
|
-
});
|
|
688
|
-
internalData._lastCallTime = Date.now();
|
|
689
|
-
}
|
|
690
|
-
return nextTick();
|
|
691
|
-
});
|
|
692
|
-
}
|
|
693
|
-
return nextTick();
|
|
800
|
+
return handleEditCell(row, fieldOrColumn, true);
|
|
694
801
|
},
|
|
695
802
|
/**
|
|
696
803
|
* 只对 trigger=dblclick 有效,选中单元格
|
|
@@ -721,104 +828,7 @@ hooks.add('tableEditModule', {
|
|
|
721
828
|
* 处理激活编辑
|
|
722
829
|
*/
|
|
723
830
|
handleEdit(params, evnt) {
|
|
724
|
-
|
|
725
|
-
const { editStore, tableColumn } = reactData;
|
|
726
|
-
const editOpts = computeEditOpts.value;
|
|
727
|
-
const { mode } = editOpts;
|
|
728
|
-
const { actived, focused } = editStore;
|
|
729
|
-
const { row, column } = params;
|
|
730
|
-
const { editRender } = column;
|
|
731
|
-
const cell = (params.cell || $xeTable.getCellElement(row, column));
|
|
732
|
-
const beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
733
|
-
params.cell = cell;
|
|
734
|
-
if (cell && isEnableConf(editConfig) && isEnableConf(editRender)) {
|
|
735
|
-
// 激活编辑
|
|
736
|
-
if (!$xeTable.isPendingByRow(row)) {
|
|
737
|
-
if (actived.row !== row || (mode === 'cell' ? actived.column !== column : false)) {
|
|
738
|
-
// 判断是否禁用编辑
|
|
739
|
-
let type = 'edit-disabled';
|
|
740
|
-
if (!beforeEditMethod || beforeEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeTable.xegrid }))) {
|
|
741
|
-
if (mouseConfig) {
|
|
742
|
-
editMethods.clearSelected();
|
|
743
|
-
if ($xeTable.clearCellAreas) {
|
|
744
|
-
$xeTable.clearCellAreas();
|
|
745
|
-
$xeTable.clearCopyCellArea();
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
$xeTable.closeTooltip();
|
|
749
|
-
if (actived.column) {
|
|
750
|
-
handleClearEdit(evnt);
|
|
751
|
-
}
|
|
752
|
-
type = 'edit-activated';
|
|
753
|
-
column.renderHeight = cell.offsetHeight;
|
|
754
|
-
actived.args = params;
|
|
755
|
-
actived.row = row;
|
|
756
|
-
actived.column = column;
|
|
757
|
-
if (mode === 'row') {
|
|
758
|
-
tableColumn.forEach((column) => getEditColumnModel(row, column));
|
|
759
|
-
}
|
|
760
|
-
else {
|
|
761
|
-
getEditColumnModel(row, column);
|
|
762
|
-
}
|
|
763
|
-
const afterEditMethod = editOpts.afterEditMethod;
|
|
764
|
-
nextTick(() => {
|
|
765
|
-
editPrivateMethods.handleFocus(params, evnt);
|
|
766
|
-
if (afterEditMethod) {
|
|
767
|
-
afterEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeTable.xegrid }));
|
|
768
|
-
}
|
|
769
|
-
});
|
|
770
|
-
}
|
|
771
|
-
$xeTable.dispatchEvent(type, {
|
|
772
|
-
row,
|
|
773
|
-
rowIndex: $xeTable.getRowIndex(row),
|
|
774
|
-
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
775
|
-
column,
|
|
776
|
-
columnIndex: $xeTable.getColumnIndex(column),
|
|
777
|
-
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
778
|
-
}, evnt);
|
|
779
|
-
// v4已废弃
|
|
780
|
-
if (type === 'edit-activated') {
|
|
781
|
-
$xeTable.dispatchEvent('edit-actived', {
|
|
782
|
-
row,
|
|
783
|
-
rowIndex: $xeTable.getRowIndex(row),
|
|
784
|
-
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
785
|
-
column,
|
|
786
|
-
columnIndex: $xeTable.getColumnIndex(column),
|
|
787
|
-
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
788
|
-
}, evnt);
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
else {
|
|
792
|
-
const { column: oldColumn } = actived;
|
|
793
|
-
if (mouseConfig) {
|
|
794
|
-
editMethods.clearSelected();
|
|
795
|
-
if ($xeTable.clearCellAreas) {
|
|
796
|
-
$xeTable.clearCellAreas();
|
|
797
|
-
$xeTable.clearCopyCellArea();
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
if (oldColumn !== column) {
|
|
801
|
-
const { model: oldModel } = oldColumn;
|
|
802
|
-
if (oldModel.update) {
|
|
803
|
-
setCellValue(row, oldColumn, oldModel.value);
|
|
804
|
-
}
|
|
805
|
-
if ($xeTable.clearValidate) {
|
|
806
|
-
$xeTable.clearValidate(row, column);
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
column.renderHeight = cell.offsetHeight;
|
|
810
|
-
actived.args = params;
|
|
811
|
-
actived.column = column;
|
|
812
|
-
setTimeout(() => {
|
|
813
|
-
editPrivateMethods.handleFocus(params, evnt);
|
|
814
|
-
});
|
|
815
|
-
}
|
|
816
|
-
focused.column = null;
|
|
817
|
-
focused.row = null;
|
|
818
|
-
$xeTable.focus();
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
return nextTick();
|
|
831
|
+
return handleEditActive(params, evnt, true);
|
|
822
832
|
},
|
|
823
833
|
/**
|
|
824
834
|
* @deprecated
|
|
@@ -3,6 +3,7 @@ import XEUtils from 'xe-utils';
|
|
|
3
3
|
import { VxeUI } from '../../../ui';
|
|
4
4
|
import { isColumnInfo, mergeBodyMethod, getCellValue } from '../../src/util';
|
|
5
5
|
import { parseFile, formatText, eqEmptyValue } from '../../../ui/src/utils';
|
|
6
|
+
import { hasClass } from '../../../ui/src/dom';
|
|
6
7
|
import { createHtmlPage, getExportBlobByContent } from './util';
|
|
7
8
|
import { warnLog, errLog } from '../../../ui/src/log';
|
|
8
9
|
const { getI18n, hooks, renderer } = VxeUI;
|
|
@@ -357,7 +358,7 @@ hooks.add('tableExportModule', {
|
|
|
357
358
|
}
|
|
358
359
|
else {
|
|
359
360
|
const cell = $xeTable.getCellElement(row, column);
|
|
360
|
-
if (cell) {
|
|
361
|
+
if (cell && !hasClass(cell, 'is--progress')) {
|
|
361
362
|
cellValue = cell.innerText.trim();
|
|
362
363
|
}
|
|
363
364
|
}
|
|
@@ -418,7 +419,7 @@ hooks.add('tableExportModule', {
|
|
|
418
419
|
}
|
|
419
420
|
else {
|
|
420
421
|
const cell = $xeTable.getCellElement(row, column);
|
|
421
|
-
if (cell) {
|
|
422
|
+
if (cell && !hasClass(cell, 'is--progress')) {
|
|
422
423
|
cellValue = cell.innerText.trim();
|
|
423
424
|
}
|
|
424
425
|
}
|
package/es/table/src/body.js
CHANGED
|
@@ -364,6 +364,7 @@ export default defineComponent({
|
|
|
364
364
|
'fixed--width': !isAutoCellWidth,
|
|
365
365
|
'fixed--hidden': fixedHiddenColumn,
|
|
366
366
|
'is--padding': isCellPadding,
|
|
367
|
+
'is--progress': (fixedHiddenColumn && isAllOverflow) || isVNPreEmptyStatus,
|
|
367
368
|
'is--drag-cell': isRowDragCell && (isCrossDrag || isPeerDrag || !rowLevel),
|
|
368
369
|
'is--drag-disabled': isDisabledDrag,
|
|
369
370
|
'col--dirty': isDirty,
|
package/es/table/src/table.js
CHANGED
|
@@ -1540,12 +1540,12 @@ export default defineComponent({
|
|
|
1540
1540
|
const sortOpts = computeSortOpts.value;
|
|
1541
1541
|
const treeOpts = computeTreeOpts.value;
|
|
1542
1542
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
1543
|
-
const { transform } = treeOpts;
|
|
1543
|
+
const { transform, rowField, parentField, mapChildrenField } = treeOpts;
|
|
1544
1544
|
const { remote: allRemoteFilter, filterMethod: allFilterMethod } = filterOpts;
|
|
1545
1545
|
const { remote: allRemoteSort, sortMethod: allSortMethod, multiple: sortMultiple, chronological } = sortOpts;
|
|
1546
1546
|
let tableData = [];
|
|
1547
1547
|
let tableTree = [];
|
|
1548
|
-
//
|
|
1548
|
+
// 处理数据
|
|
1549
1549
|
if (!allRemoteFilter || !allRemoteSort) {
|
|
1550
1550
|
const filterColumns = [];
|
|
1551
1551
|
let orderColumns = [];
|
|
@@ -1601,7 +1601,7 @@ export default defineComponent({
|
|
|
1601
1601
|
tableTree = XEUtils.searchTree(tableFullTreeData, handleFilter, {
|
|
1602
1602
|
original: true,
|
|
1603
1603
|
isEvery: true,
|
|
1604
|
-
children:
|
|
1604
|
+
children: mapChildrenField,
|
|
1605
1605
|
mapChildren: childrenField
|
|
1606
1606
|
});
|
|
1607
1607
|
tableData = tableTree;
|
|
@@ -1617,7 +1617,7 @@ export default defineComponent({
|
|
|
1617
1617
|
tableTree = XEUtils.searchTree(tableFullTreeData, () => true, {
|
|
1618
1618
|
original: true,
|
|
1619
1619
|
isEvery: true,
|
|
1620
|
-
children:
|
|
1620
|
+
children: mapChildrenField,
|
|
1621
1621
|
mapChildren: childrenField
|
|
1622
1622
|
});
|
|
1623
1623
|
tableData = tableTree;
|
|
@@ -1637,7 +1637,15 @@ export default defineComponent({
|
|
|
1637
1637
|
tableTree = XEUtils.isArray(sortRests) ? sortRests : tableTree;
|
|
1638
1638
|
}
|
|
1639
1639
|
else {
|
|
1640
|
-
|
|
1640
|
+
const treeList = XEUtils.toTreeArray(tableTree, {
|
|
1641
|
+
children: mapChildrenField
|
|
1642
|
+
});
|
|
1643
|
+
tableTree = XEUtils.toArrayTree(XEUtils.orderBy(treeList, orderColumns.map(({ column, order }) => [getOrderField(column), order])), {
|
|
1644
|
+
key: rowField,
|
|
1645
|
+
parentKey: parentField,
|
|
1646
|
+
children: childrenField,
|
|
1647
|
+
mapChildren: mapChildrenField
|
|
1648
|
+
});
|
|
1641
1649
|
}
|
|
1642
1650
|
tableData = tableTree;
|
|
1643
1651
|
}
|
|
@@ -8500,6 +8508,7 @@ export default defineComponent({
|
|
|
8500
8508
|
}
|
|
8501
8509
|
},
|
|
8502
8510
|
triggerBodyScrollEvent(evnt, fixedType) {
|
|
8511
|
+
const { scrollYLoad, scrollXLoad } = reactData;
|
|
8503
8512
|
const { elemStore, intoRunScroll, lastScrollTop, lastScrollLeft, inWheelScroll, inVirtualScroll, inHeaderScroll, inBodyScroll, scrollRenderType, inFooterScroll } = internalData;
|
|
8504
8513
|
const xHandleEl = refScrollXHandleElem.value;
|
|
8505
8514
|
const yHandleEl = refScrollYHandleElem.value;
|
|
@@ -8558,13 +8567,17 @@ export default defineComponent({
|
|
|
8558
8567
|
setScrollTop(rightScrollElem, scrollTop);
|
|
8559
8568
|
}
|
|
8560
8569
|
setScrollTop(yHandleEl, scrollTop);
|
|
8561
|
-
|
|
8570
|
+
if (scrollYLoad) {
|
|
8571
|
+
$xeTable.triggerScrollYEvent(evnt);
|
|
8572
|
+
}
|
|
8562
8573
|
}
|
|
8563
8574
|
if (isRollX) {
|
|
8564
8575
|
setScrollLeft(xHandleEl, scrollLeft);
|
|
8565
8576
|
setScrollLeft(headerScrollElem, scrollLeft);
|
|
8566
8577
|
setScrollLeft(footerScrollElem, scrollLeft);
|
|
8567
|
-
|
|
8578
|
+
if (scrollXLoad) {
|
|
8579
|
+
$xeTable.triggerScrollXEvent(evnt);
|
|
8580
|
+
}
|
|
8568
8581
|
}
|
|
8569
8582
|
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
8570
8583
|
type: 'body',
|
|
@@ -8572,6 +8585,7 @@ export default defineComponent({
|
|
|
8572
8585
|
});
|
|
8573
8586
|
},
|
|
8574
8587
|
triggerHeaderScrollEvent(evnt, fixedType) {
|
|
8588
|
+
const { scrollXLoad } = reactData;
|
|
8575
8589
|
const { elemStore, intoRunScroll, inWheelScroll, inVirtualScroll, inBodyScroll, inFooterScroll } = internalData;
|
|
8576
8590
|
const yHandleEl = refScrollYHandleElem.value;
|
|
8577
8591
|
const xHandleEl = refScrollXHandleElem.value;
|
|
@@ -8601,13 +8615,16 @@ export default defineComponent({
|
|
|
8601
8615
|
setScrollLeft(xHandleEl, scrollLeft);
|
|
8602
8616
|
setScrollLeft(footerScrollElem, scrollLeft);
|
|
8603
8617
|
setScrollLeft(bodyScrollElem, scrollLeft);
|
|
8604
|
-
|
|
8618
|
+
if (scrollXLoad) {
|
|
8619
|
+
$xeTable.triggerScrollXEvent(evnt);
|
|
8620
|
+
}
|
|
8605
8621
|
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
8606
8622
|
type: 'header',
|
|
8607
8623
|
fixed: fixedType
|
|
8608
8624
|
});
|
|
8609
8625
|
},
|
|
8610
8626
|
triggerFooterScrollEvent(evnt, fixedType) {
|
|
8627
|
+
const { scrollXLoad } = reactData;
|
|
8611
8628
|
const { elemStore, intoRunScroll, inWheelScroll, inVirtualScroll, inHeaderScroll, inBodyScroll } = internalData;
|
|
8612
8629
|
const yHandleEl = refScrollYHandleElem.value;
|
|
8613
8630
|
const xHandleEl = refScrollXHandleElem.value;
|
|
@@ -8637,7 +8654,9 @@ export default defineComponent({
|
|
|
8637
8654
|
setScrollLeft(xHandleEl, scrollLeft);
|
|
8638
8655
|
setScrollLeft(headerScrollElem, scrollLeft);
|
|
8639
8656
|
setScrollLeft(bodyScrollElem, scrollLeft);
|
|
8640
|
-
|
|
8657
|
+
if (scrollXLoad) {
|
|
8658
|
+
$xeTable.triggerScrollXEvent(evnt);
|
|
8659
|
+
}
|
|
8641
8660
|
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
8642
8661
|
type: 'footer',
|
|
8643
8662
|
fixed: fixedType
|
|
@@ -8649,6 +8668,7 @@ export default defineComponent({
|
|
|
8649
8668
|
return;
|
|
8650
8669
|
}
|
|
8651
8670
|
const { highlightHoverRow } = tableProps;
|
|
8671
|
+
const { scrollYLoad } = reactData;
|
|
8652
8672
|
const { elemStore, lastScrollTop, lastScrollLeft } = internalData;
|
|
8653
8673
|
const rowOpts = computeRowOpts.value;
|
|
8654
8674
|
const xHandleEl = refScrollXHandleElem.value;
|
|
@@ -8691,7 +8711,9 @@ export default defineComponent({
|
|
|
8691
8711
|
setScrollTop(bodyScrollElem, currTopNum);
|
|
8692
8712
|
setScrollTop(leftScrollElem, currTopNum);
|
|
8693
8713
|
setScrollTop(rightScrollElem, currTopNum);
|
|
8694
|
-
|
|
8714
|
+
if (scrollYLoad) {
|
|
8715
|
+
$xeTable.triggerScrollYEvent(evnt);
|
|
8716
|
+
}
|
|
8695
8717
|
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, currTopNum, scrollLeft, {
|
|
8696
8718
|
type: 'table',
|
|
8697
8719
|
fixed: ''
|
|
@@ -8710,6 +8732,7 @@ export default defineComponent({
|
|
|
8710
8732
|
}
|
|
8711
8733
|
},
|
|
8712
8734
|
triggerVirtualScrollXEvent(evnt) {
|
|
8735
|
+
const { scrollXLoad } = reactData;
|
|
8713
8736
|
const { elemStore, inWheelScroll, lastScrollTop, inHeaderScroll, inBodyScroll, inFooterScroll } = internalData;
|
|
8714
8737
|
if (inHeaderScroll || inBodyScroll || inFooterScroll) {
|
|
8715
8738
|
return;
|
|
@@ -8734,13 +8757,16 @@ export default defineComponent({
|
|
|
8734
8757
|
setScrollLeft(bodyScrollElem, scrollLeft);
|
|
8735
8758
|
setScrollLeft(headerScrollElem, scrollLeft);
|
|
8736
8759
|
setScrollLeft(footerScrollElem, scrollLeft);
|
|
8737
|
-
|
|
8760
|
+
if (scrollXLoad) {
|
|
8761
|
+
$xeTable.triggerScrollXEvent(evnt);
|
|
8762
|
+
}
|
|
8738
8763
|
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
8739
8764
|
type: 'table',
|
|
8740
8765
|
fixed: ''
|
|
8741
8766
|
});
|
|
8742
8767
|
},
|
|
8743
8768
|
triggerVirtualScrollYEvent(evnt) {
|
|
8769
|
+
const { scrollYLoad } = reactData;
|
|
8744
8770
|
const { elemStore, inWheelScroll, lastScrollLeft, inHeaderScroll, inBodyScroll, inFooterScroll } = internalData;
|
|
8745
8771
|
if (inHeaderScroll || inBodyScroll || inFooterScroll) {
|
|
8746
8772
|
return;
|
|
@@ -8765,7 +8791,9 @@ export default defineComponent({
|
|
|
8765
8791
|
setScrollTop(bodyScrollElem, scrollTop);
|
|
8766
8792
|
setScrollTop(leftScrollElem, scrollTop);
|
|
8767
8793
|
setScrollTop(rightScrollElem, scrollTop);
|
|
8768
|
-
|
|
8794
|
+
if (scrollYLoad) {
|
|
8795
|
+
$xeTable.triggerScrollYEvent(evnt);
|
|
8796
|
+
}
|
|
8769
8797
|
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
8770
8798
|
type: 'table',
|
|
8771
8799
|
fixed: ''
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED