vxe-table 3.24.4 → 3.25.0-beta.0
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/grid/src/grid.js +15 -2
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +3 -2
- package/es/table/module/edit/mixin.js +5 -4
- package/es/table/module/export/mixin.js +6 -4
- package/es/table/module/filter/mixin.js +2 -2
- package/es/table/module/keyboard/mixin.js +4 -3
- package/es/table/module/menu/mixin.js +3 -3
- package/es/table/render/index.js +5 -3
- package/es/table/src/body.js +4 -4
- package/es/table/src/header.js +4 -3
- package/es/table/src/methods.js +76 -48
- package/es/table/src/table.js +29 -26
- package/es/table/src/util.js +6 -3
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.js +9 -0
- package/lib/grid/src/grid.js +14 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +129 -80
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +2 -1
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +4 -3
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/mixin.js +9 -3
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/filter/mixin.js +1 -1
- package/lib/table/module/filter/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +4 -3
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +2 -2
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/render/index.js +4 -2
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +3 -3
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/header.js +3 -2
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +32 -30
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +32 -25
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +8 -2
- package/lib/table/src/util.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/lib/ui/src/utils.js +10 -0
- package/lib/ui/src/utils.min.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +16 -2
- package/packages/table/module/custom/panel.ts +3 -2
- package/packages/table/module/edit/mixin.ts +5 -4
- package/packages/table/module/export/mixin.ts +6 -4
- package/packages/table/module/filter/mixin.ts +2 -2
- package/packages/table/module/keyboard/mixin.ts +4 -3
- package/packages/table/module/menu/mixin.ts +3 -3
- package/packages/table/render/index.ts +5 -3
- package/packages/table/src/body.ts +4 -4
- package/packages/table/src/header.ts +4 -3
- package/packages/table/src/methods.ts +73 -46
- package/packages/table/src/table.ts +29 -26
- package/packages/table/src/util.ts +6 -3
- package/packages/ui/src/utils.ts +10 -0
- /package/es/{iconfont.1791617048832.ttf → iconfont.1791880417274.ttf} +0 -0
- /package/es/{iconfont.1791617048832.woff → iconfont.1791880417274.woff} +0 -0
- /package/es/{iconfont.1791617048832.woff2 → iconfont.1791880417274.woff2} +0 -0
- /package/lib/{iconfont.1791617048832.ttf → iconfont.1791880417274.ttf} +0 -0
- /package/lib/{iconfont.1791617048832.woff → iconfont.1791880417274.woff} +0 -0
- /package/lib/{iconfont.1791617048832.woff2 → iconfont.1791880417274.woff2} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineVxeComponent } from '../../../ui/src/comp';
|
|
2
2
|
import { VxeUI } from '../../../ui';
|
|
3
|
-
import { formatText } from '../../../ui/src/utils';
|
|
3
|
+
import { formatText, hasEnableConf } from '../../../ui/src/utils';
|
|
4
4
|
import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/dom';
|
|
5
5
|
import { createComponentLog } from '../../../ui/src/log';
|
|
6
6
|
import XEUtils from 'xe-utils';
|
|
@@ -415,6 +415,7 @@ export default {
|
|
|
415
415
|
const { customColumnList } = tableReactData;
|
|
416
416
|
const { collectColumn } = tableInternalData;
|
|
417
417
|
const customOpts = $xeTable.computeCustomOpts;
|
|
418
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
418
419
|
const { immediate } = customOpts;
|
|
419
420
|
const trEl = evnt.currentTarget;
|
|
420
421
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
@@ -558,7 +559,7 @@ export default {
|
|
|
558
559
|
nafIndex = XEUtils.findIndexOf(customColumnList, item => item.id === newColumn.id);
|
|
559
560
|
customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
|
|
560
561
|
}
|
|
561
|
-
if (mouseConfig) {
|
|
562
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
562
563
|
if ($xeTable.clearSelected) {
|
|
563
564
|
$xeTable.clearSelected();
|
|
564
565
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { VxeUI } from '../../../ui';
|
|
3
|
-
import { isEnableConf } from '../../../ui/src/utils';
|
|
3
|
+
import { hasEnableConf, isEnableConf } from '../../../ui/src/utils';
|
|
4
4
|
import { getCellValue, setCellValue, getRowid } from '../../src/util';
|
|
5
5
|
import { removeClass, addClass } from '../../../ui/src/dom';
|
|
6
6
|
import { createComponentLog } from '../../../ui/src/log';
|
|
@@ -391,6 +391,7 @@ function handleEditActive($xeTable, params, evnt, options) {
|
|
|
391
391
|
const { editConfig, mouseConfig } = props;
|
|
392
392
|
const { editStore, tableColumn } = reactData;
|
|
393
393
|
const editOpts = $xeTable.computeEditOpts;
|
|
394
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
394
395
|
const { mode } = editOpts;
|
|
395
396
|
const { actived, focused } = editStore;
|
|
396
397
|
const { row, column } = params;
|
|
@@ -406,7 +407,7 @@ function handleEditActive($xeTable, params, evnt, options) {
|
|
|
406
407
|
// 判断是否禁用编辑
|
|
407
408
|
let type = 'edit-disabled';
|
|
408
409
|
if (!beforeEditMethod || beforeEditMethod(Object.assign(Object.assign({}, editParams), { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }))) {
|
|
409
|
-
if (mouseConfig) {
|
|
410
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
410
411
|
$xeTable.clearSelected();
|
|
411
412
|
if ($xeTable.clearCellAreas) {
|
|
412
413
|
$xeTable.clearCellAreas();
|
|
@@ -464,7 +465,7 @@ function handleEditActive($xeTable, params, evnt, options) {
|
|
|
464
465
|
}
|
|
465
466
|
else {
|
|
466
467
|
const { column: oldColumn } = actived;
|
|
467
|
-
if (mouseConfig) {
|
|
468
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
468
469
|
$xeTable.clearSelected();
|
|
469
470
|
if ($xeTable.clearCellAreas) {
|
|
470
471
|
$xeTable.clearCellAreas();
|
|
@@ -1081,7 +1082,7 @@ export default {
|
|
|
1081
1082
|
const editOpts = $xeTable.computeEditOpts;
|
|
1082
1083
|
const { actived, selected } = editStore;
|
|
1083
1084
|
const { row, column } = params;
|
|
1084
|
-
const isMouseSelected = mouseConfig && mouseOpts.selected;
|
|
1085
|
+
const isMouseSelected = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected;
|
|
1085
1086
|
const selectMethod = () => {
|
|
1086
1087
|
if (isMouseSelected && (selected.row !== row || selected.column !== column)) {
|
|
1087
1088
|
if (actived.row !== row || (editOpts.mode === 'cell' ? actived.column !== column : false)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { VxeUI } from '../../../ui';
|
|
3
3
|
import { isColumnInfo, getCellValue, createHandleGetRowId } from '../../src/util';
|
|
4
|
-
import { parseFile, formatText, eqEmptyValue } from '../../../ui/src/utils';
|
|
4
|
+
import { parseFile, formatText, eqEmptyValue, hasEnableConf } from '../../../ui/src/utils';
|
|
5
5
|
import { hasClass, toCssUnit } from '../../../ui/src/dom';
|
|
6
6
|
import { createHtmlPage, getExportBlobByContent } from './util';
|
|
7
7
|
import { createComponentLog } from '../../../ui/src/log';
|
|
@@ -1945,7 +1945,7 @@ export default {
|
|
|
1945
1945
|
}
|
|
1946
1946
|
return;
|
|
1947
1947
|
}
|
|
1948
|
-
if (!importConfig) {
|
|
1948
|
+
if (!hasEnableConf(importConfig, importOpts)) {
|
|
1949
1949
|
errLog('vxe.error.reqProp', ['import-config']);
|
|
1950
1950
|
}
|
|
1951
1951
|
// 处理类型
|
|
@@ -1985,12 +1985,13 @@ export default {
|
|
|
1985
1985
|
_openExport(options) {
|
|
1986
1986
|
const $xeTable = this;
|
|
1987
1987
|
const props = $xeTable;
|
|
1988
|
+
const { exportConfig } = props;
|
|
1988
1989
|
const exportOpts = $xeTable.computeExportOpts;
|
|
1989
1990
|
const defOpts = Object.assign({
|
|
1990
1991
|
message: true,
|
|
1991
1992
|
types: XEUtils.keys(exportOpts._typeMaps)
|
|
1992
1993
|
}, exportOpts, options);
|
|
1993
|
-
if (!
|
|
1994
|
+
if (!hasEnableConf(exportConfig, exportOpts)) {
|
|
1994
1995
|
errLog('vxe.error.reqProp', ['export-config']);
|
|
1995
1996
|
}
|
|
1996
1997
|
return handleExportAndPrint($xeTable, defOpts);
|
|
@@ -1999,11 +2000,12 @@ export default {
|
|
|
1999
2000
|
_openPrint(options) {
|
|
2000
2001
|
const $xeTable = this;
|
|
2001
2002
|
const props = $xeTable;
|
|
2003
|
+
const { printConfig } = props;
|
|
2002
2004
|
const printOpts = $xeTable.computePrintOpts;
|
|
2003
2005
|
const defOpts = Object.assign({
|
|
2004
2006
|
message: true
|
|
2005
2007
|
}, printOpts, options);
|
|
2006
|
-
if (!
|
|
2008
|
+
if (!hasEnableConf(printConfig, printOpts)) {
|
|
2007
2009
|
errLog('vxe.error.reqProp', ['print-config']);
|
|
2008
2010
|
}
|
|
2009
2011
|
return handleExportAndPrint($xeTable, defOpts, true);
|
|
@@ -2,7 +2,7 @@ import XEUtils from 'xe-utils';
|
|
|
2
2
|
import { VxeUI } from '../../../ui';
|
|
3
3
|
import { toFilters, handleFieldOrColumn, getRefElem } from '../../src/util';
|
|
4
4
|
import { toCssUnit, triggerEvent, updatePanelPlacement } from '../../../ui/src/dom';
|
|
5
|
-
import { isEnableConf } from '../../../ui/src/utils';
|
|
5
|
+
import { hasEnableConf, isEnableConf } from '../../../ui/src/utils';
|
|
6
6
|
const { renderer } = VxeUI;
|
|
7
7
|
const sourceType = 'table';
|
|
8
8
|
function updatePopupStyle($xeTable) {
|
|
@@ -405,7 +405,7 @@ export default {
|
|
|
405
405
|
$xeTable.handleTableData(true);
|
|
406
406
|
$xeTable.checkSelectionStatus();
|
|
407
407
|
}
|
|
408
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleFilterEvent) {
|
|
408
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleFilterEvent) {
|
|
409
409
|
$xeTable.handleFilterEvent(evnt, params);
|
|
410
410
|
}
|
|
411
411
|
if (evnt) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { getRefElem } from '../../src/util';
|
|
3
3
|
import { getAbsolutePos, addClass, removeClass, hasControlKey } from '../../../ui/src/dom';
|
|
4
|
+
import { hasEnableConf } from '../../../ui/src/utils';
|
|
4
5
|
function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offsetClientTop, moveRange) {
|
|
5
6
|
const props = $xeTable;
|
|
6
7
|
const reactData = $xeTable;
|
|
@@ -508,14 +509,14 @@ export default {
|
|
|
508
509
|
const checkboxOpts = $xeTable.computeCheckboxOpts;
|
|
509
510
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
510
511
|
const editOpts = $xeTable.computeEditOpts;
|
|
511
|
-
if (mouseConfig && mouseOpts.area && $xeTable.
|
|
512
|
-
return $xeTable.
|
|
512
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.triggerClAaMnEvent) {
|
|
513
|
+
return $xeTable.triggerClAaMnEvent(evnt, params);
|
|
513
514
|
}
|
|
514
515
|
else {
|
|
515
516
|
if (checkboxConfig && checkboxOpts.range) {
|
|
516
517
|
handleCheckboxRangeEvent($xeTable, evnt, params);
|
|
517
518
|
}
|
|
518
|
-
if (mouseConfig && mouseOpts.selected) {
|
|
519
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
|
|
519
520
|
if (!editConfig || editOpts.mode === 'cell') {
|
|
520
521
|
$xeTable.handleSelected(params, evnt);
|
|
521
522
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { VxeUI } from '../../../ui';
|
|
3
3
|
import { getDomNode, getAbsolutePos, getEventTargetNode, toCssUnit } from '../../../ui/src/dom';
|
|
4
|
-
import { isEnableConf, hasChildrenList } from '../../../ui/src/utils';
|
|
4
|
+
import { isEnableConf, hasChildrenList, hasEnableConf } from '../../../ui/src/utils';
|
|
5
5
|
import { createComponentLog } from '../../../ui/src/log';
|
|
6
6
|
const { warnLog } = createComponentLog('table');
|
|
7
7
|
const { menus, globalEvents, GLOBAL_EVENT_KEYS } = VxeUI;
|
|
@@ -87,7 +87,7 @@ export default {
|
|
|
87
87
|
const type = 'body';
|
|
88
88
|
const params = { source: 'table', type, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, keyboard: true, columns: visibleColumn.slice(0), $event: evnt };
|
|
89
89
|
// 如果开启单元格区域
|
|
90
|
-
if (mouseConfig && mouseOpts.area) {
|
|
90
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
|
|
91
91
|
const activeArea = $xeTable.getActiveCellArea();
|
|
92
92
|
if (activeArea && activeArea.row && activeArea.column) {
|
|
93
93
|
params.row = activeArea.row;
|
|
@@ -96,7 +96,7 @@ export default {
|
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
else if (mouseConfig && mouseOpts.selected) {
|
|
99
|
+
else if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
|
|
100
100
|
// 如果启用键盘导航且已选中单元格
|
|
101
101
|
if (selected.row && selected.column) {
|
|
102
102
|
params.row = selected.row;
|
package/es/table/render/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { VxeUI } from '../../ui';
|
|
3
3
|
import { getCellValue, setCellValue } from '../src/util';
|
|
4
|
-
import { getFuncText, formatText, isEmptyValue } from '../../ui/src/utils';
|
|
4
|
+
import { getFuncText, formatText, isEmptyValue, hasEnableConf } from '../../ui/src/utils';
|
|
5
5
|
import { getOnName, getModelEvent, getChangeEvent, hasInputType } from '../../ui/src/vn';
|
|
6
6
|
import { createComponentLog } from '../../ui/src/log';
|
|
7
7
|
const { errLog } = createComponentLog('table');
|
|
@@ -847,9 +847,10 @@ function getNativeInputRenderCellVNs(h, cellValue, labelVNs, renderOpts, renderP
|
|
|
847
847
|
const { name } = renderOpts;
|
|
848
848
|
const tableProps = $table;
|
|
849
849
|
const { editConfig, mouseConfig } = tableProps;
|
|
850
|
+
const mouseOpts = $table.computeMouseOpts;
|
|
850
851
|
let isColSelected = false;
|
|
851
852
|
let isActiveCellArea = false;
|
|
852
|
-
if (editConfig && mouseConfig) {
|
|
853
|
+
if (editConfig && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
853
854
|
const tableReactData = $table;
|
|
854
855
|
const { editStore } = tableReactData;
|
|
855
856
|
const { selected } = editStore;
|
|
@@ -879,9 +880,10 @@ function getInputRenderCellVNs(h, cellValue, labelVNs, renderOpts, renderParams)
|
|
|
879
880
|
const { $table, row, column } = renderParams;
|
|
880
881
|
const tableProps = $table;
|
|
881
882
|
const { editConfig, mouseConfig } = tableProps;
|
|
883
|
+
const mouseOpts = $table.computeMouseOpts;
|
|
882
884
|
let isColSelected = false;
|
|
883
885
|
let isActiveCellArea = false;
|
|
884
|
-
if (editConfig && mouseConfig) {
|
|
886
|
+
if (editConfig && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
885
887
|
const tableReactData = $table;
|
|
886
888
|
const { editStore } = tableReactData;
|
|
887
889
|
const editOpts = $table.computeEditOpts;
|
package/es/table/src/body.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { VxeUI } from '../../ui';
|
|
3
3
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
4
|
-
import { isEnableConf, getClass, getDefaultConfig } from '../../ui/src/utils';
|
|
4
|
+
import { isEnableConf, getClass, getDefaultConfig, hasEnableConf } from '../../ui/src/utils';
|
|
5
5
|
import { getRowid, createHandleGetRowId, getCellRestHeight } from './util';
|
|
6
6
|
import { updateCellTitle } from '../../ui/src/dom';
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
@@ -199,7 +199,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
|
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
// 按下事件处理
|
|
202
|
-
if (isRowDragCell || checkboxOpts.range || mouseConfig) {
|
|
202
|
+
if (isRowDragCell || checkboxOpts.range || hasEnableConf(mouseConfig, mouseOpts)) {
|
|
203
203
|
tdOns.mousedown = (evnt) => {
|
|
204
204
|
$xeTable.triggerCellMousedownEvent(evnt, cellParams);
|
|
205
205
|
};
|
|
@@ -382,7 +382,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
|
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
384
|
let showAreaRowStatus = false;
|
|
385
|
-
if (mouseConfig && mouseOpts.area && !_columnIndex && selectCellToRow) {
|
|
385
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && !_columnIndex && selectCellToRow) {
|
|
386
386
|
showAreaRowStatus = true;
|
|
387
387
|
}
|
|
388
388
|
if (!fixedHiddenColumn && showResizable && isAllColumnDrag) {
|
|
@@ -875,7 +875,7 @@ export default {
|
|
|
875
875
|
h('div', {
|
|
876
876
|
class: 'vxe-table--checkbox-range'
|
|
877
877
|
}),
|
|
878
|
-
mouseConfig && mouseOpts.area
|
|
878
|
+
hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area
|
|
879
879
|
? h('div', {
|
|
880
880
|
class: 'vxe-table--cell-area',
|
|
881
881
|
attrs: {
|
package/es/table/src/header.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { VxeUI } from '../../ui';
|
|
3
3
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
4
|
-
import { isEnableConf, getClass, getDefaultConfig } from '../../ui/src/utils';
|
|
4
|
+
import { isEnableConf, getClass, getDefaultConfig, hasEnableConf } from '../../ui/src/utils';
|
|
5
5
|
import { getCalcHeight, convertHeaderColumnToRows, convertHeaderToGridRows } from './util';
|
|
6
6
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
7
7
|
const { renderer, renderEmptyElement } = VxeUI;
|
|
@@ -27,6 +27,7 @@ function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, _rowIndex, co
|
|
|
27
27
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
28
28
|
const headerCellOpts = $xeTable.computeHeaderCellOpts;
|
|
29
29
|
const rendererOpts = $xeTable.computeRendererOpts;
|
|
30
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
30
31
|
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
31
32
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
32
33
|
const isLastRow = _rowIndex === headerGroups.length - 1;
|
|
@@ -113,7 +114,7 @@ function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, _rowIndex, co
|
|
|
113
114
|
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(cellParams));
|
|
114
115
|
}
|
|
115
116
|
// 按下事件处理
|
|
116
|
-
if (mouseConfig || isColDragCell) {
|
|
117
|
+
if (hasEnableConf(mouseConfig, mouseOpts) || isColDragCell) {
|
|
117
118
|
thOns.mousedown = (evnt) => $xeTable.triggerHeaderCellMousedownEvent(evnt, cellParams);
|
|
118
119
|
}
|
|
119
120
|
// 拖拽列事件
|
|
@@ -529,7 +530,7 @@ export default {
|
|
|
529
530
|
ref: 'refHeaderTHead'
|
|
530
531
|
}, renderHeads(h, _vm, isGroup, isOptimizeMode, renderHeaderList, renderColumnList))
|
|
531
532
|
]),
|
|
532
|
-
mouseConfig && mouseOpts.area
|
|
533
|
+
hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area
|
|
533
534
|
? h('div', {
|
|
534
535
|
class: 'vxe-table--cell-area',
|
|
535
536
|
attrs: {
|
package/es/table/src/methods.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, wheelScrollLeftTo, wheelScrollTopTo, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey, checkTargetElement, hasAxternalInputTarget } from '../../ui/src/dom';
|
|
3
|
-
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils';
|
|
3
|
+
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue, hasEnableConf } from '../../ui/src/utils';
|
|
4
4
|
import { VxeUI } from '../../ui';
|
|
5
5
|
import Cell from './cell';
|
|
6
6
|
import { getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn, getRowMaxHeight, handleCustomStoreConfig, encodeRowid } from './util';
|
|
@@ -1255,7 +1255,7 @@ function updateStyle($xeTable) {
|
|
|
1255
1255
|
if (currentRow) {
|
|
1256
1256
|
$xeTable.setCurrentRow(currentRow);
|
|
1257
1257
|
}
|
|
1258
|
-
if (mouseConfig && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
1258
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
1259
1259
|
$xeTable.addCellSelectedClass();
|
|
1260
1260
|
}
|
|
1261
1261
|
if ($xeGanttView && $xeGanttView.handleUpdateStyle) {
|
|
@@ -3455,12 +3455,13 @@ function loadTableData($xeTable, datas, isReload, isReset) {
|
|
|
3455
3455
|
const props = $xeTable;
|
|
3456
3456
|
const reactData = $xeTable;
|
|
3457
3457
|
const internalData = $xeTable;
|
|
3458
|
-
const { keepSource, treeConfig, aggregateConfig,
|
|
3458
|
+
const { keepSource, treeConfig, rowGroupConfig, aggregateConfig, mouseConfig } = props;
|
|
3459
3459
|
const { rowGroupList, scrollYLoad: oldScrollYLoad } = reactData;
|
|
3460
3460
|
const { initStatus, scrollYStore, scrollXStore, lastScrollLeft, lastScrollTop } = internalData;
|
|
3461
3461
|
const rowOpts = $xeTable.computeRowOpts;
|
|
3462
3462
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
3463
3463
|
const expandOpts = $xeTable.computeExpandOpts;
|
|
3464
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
3464
3465
|
const { transform } = treeOpts;
|
|
3465
3466
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
3466
3467
|
let treeData = [];
|
|
@@ -3550,7 +3551,7 @@ function loadTableData($xeTable, datas, isReload, isReset) {
|
|
|
3550
3551
|
if (keepSource) {
|
|
3551
3552
|
$xeTable.cacheSourceMap(fullData);
|
|
3552
3553
|
}
|
|
3553
|
-
if ($xeTable.clearCellAreas &&
|
|
3554
|
+
if ($xeTable.clearCellAreas && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
3554
3555
|
$xeTable.clearCellAreas();
|
|
3555
3556
|
$xeTable.clearCopyCellArea();
|
|
3556
3557
|
}
|
|
@@ -4678,9 +4679,25 @@ const tableMethods = {
|
|
|
4678
4679
|
const $xeTable = this;
|
|
4679
4680
|
const $xeGrid = $xeTable.$xeGrid;
|
|
4680
4681
|
const $xeGantt = $xeTable.$xeGantt;
|
|
4681
|
-
const
|
|
4682
|
-
|
|
4683
|
-
|
|
4682
|
+
const el = $xeTable.$refs.refElem;
|
|
4683
|
+
if (!el) {
|
|
4684
|
+
return null;
|
|
4685
|
+
}
|
|
4686
|
+
const parentEl = el.parentElement;
|
|
4687
|
+
if (!parentEl) {
|
|
4688
|
+
return null;
|
|
4689
|
+
}
|
|
4690
|
+
if ($xeGantt && hasClass(parentEl, 'vxe-gantt--table-wrapper')) {
|
|
4691
|
+
return $xeGantt.getParentElem();
|
|
4692
|
+
}
|
|
4693
|
+
else if ($xeGrid && hasClass(parentEl, 'vxe-grid--table-wrapper')) {
|
|
4694
|
+
return $xeGrid.getParentElem();
|
|
4695
|
+
}
|
|
4696
|
+
// 如果是虚拟滚动条
|
|
4697
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
4698
|
+
return parentEl.parentElement;
|
|
4699
|
+
}
|
|
4700
|
+
return parentEl;
|
|
4684
4701
|
},
|
|
4685
4702
|
/**
|
|
4686
4703
|
* 获取父容器的高度
|
|
@@ -4692,24 +4709,32 @@ const tableMethods = {
|
|
|
4692
4709
|
const props = $xeTable;
|
|
4693
4710
|
const { height } = props;
|
|
4694
4711
|
const el = $xeTable.$refs.refElem;
|
|
4695
|
-
if (el) {
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4712
|
+
if (!el) {
|
|
4713
|
+
return 0;
|
|
4714
|
+
}
|
|
4715
|
+
let parentEl = el.parentElement;
|
|
4716
|
+
let parentPaddingSize = 0;
|
|
4717
|
+
let parentWrapperHeight = 0;
|
|
4718
|
+
if (!parentEl) {
|
|
4719
|
+
return 0;
|
|
4720
|
+
}
|
|
4721
|
+
if ($xeGantt && hasClass(parentEl, 'vxe-gantt--table-wrapper')) {
|
|
4722
|
+
parentWrapperHeight = $xeGantt.getParentHeight();
|
|
4723
|
+
}
|
|
4724
|
+
else if ($xeGrid && hasClass(parentEl, 'vxe-grid--table-wrapper')) {
|
|
4725
|
+
parentWrapperHeight = $xeGrid.getParentHeight();
|
|
4726
|
+
}
|
|
4727
|
+
else {
|
|
4728
|
+
// 如果是虚拟滚动条
|
|
4729
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
4730
|
+
parentEl = parentEl.parentElement;
|
|
4731
|
+
}
|
|
4732
|
+
if (parentEl) {
|
|
4733
|
+
parentWrapperHeight = parentEl.clientHeight;
|
|
4734
|
+
parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentEl) : 0;
|
|
4709
4735
|
}
|
|
4710
|
-
return Math.floor(parentWrapperHeight - parentPaddingSize);
|
|
4711
4736
|
}
|
|
4712
|
-
return
|
|
4737
|
+
return Math.floor(parentWrapperHeight - parentPaddingSize);
|
|
4713
4738
|
},
|
|
4714
4739
|
/**
|
|
4715
4740
|
* 获取需要排除的高度
|
|
@@ -6443,7 +6468,8 @@ const tableMethods = {
|
|
|
6443
6468
|
const $xeTable = this;
|
|
6444
6469
|
const props = $xeTable;
|
|
6445
6470
|
const { mouseConfig } = props;
|
|
6446
|
-
|
|
6471
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
6472
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
6447
6473
|
if ($xeTable.clearSelected) {
|
|
6448
6474
|
$xeTable.clearSelected();
|
|
6449
6475
|
}
|
|
@@ -7505,6 +7531,7 @@ const tableMethods = {
|
|
|
7505
7531
|
const editOpts = $xeTable.computeEditOpts;
|
|
7506
7532
|
const validOpts = $xeTable.computeValidOpts;
|
|
7507
7533
|
const areaOpts = $xeTable.computeAreaOpts;
|
|
7534
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
7508
7535
|
const { actived } = editStore;
|
|
7509
7536
|
const tableFilter = $xeTable.$refs.refTableFilter;
|
|
7510
7537
|
const tableMenu = $xeTable.$refs.refTableMenu;
|
|
@@ -7600,7 +7627,7 @@ const tableMethods = {
|
|
|
7600
7627
|
}
|
|
7601
7628
|
}
|
|
7602
7629
|
}
|
|
7603
|
-
else if (mouseConfig) {
|
|
7630
|
+
else if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
7604
7631
|
if (!getEventTargetNode(evnt, el).flag && !($xeGGWrapper && getEventTargetNode(evnt, $xeGGWrapper.$el).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.$el).flag) && !(this.$toolbar && getEventTargetNode(evnt, this.$toolbar.$el).flag)) {
|
|
7605
7632
|
if ($xeTable.clearSelected) {
|
|
7606
7633
|
$xeTable.clearSelected();
|
|
@@ -7677,7 +7704,7 @@ const tableMethods = {
|
|
|
7677
7704
|
if (isEsc) {
|
|
7678
7705
|
$xeTable.preventEvent(evnt, 'event.keydown', null, () => {
|
|
7679
7706
|
$xeTable.dispatchEvent('keydown-start', {}, evnt);
|
|
7680
|
-
if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
7707
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
7681
7708
|
$xeTable.handleKdClAreaEvent(evnt);
|
|
7682
7709
|
}
|
|
7683
7710
|
else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
|
|
@@ -7685,13 +7712,13 @@ const tableMethods = {
|
|
|
7685
7712
|
// 如果按下了 Esc 键,关闭快捷菜单、筛选
|
|
7686
7713
|
$xeTable.closeFilter();
|
|
7687
7714
|
$xeTable.closeMenu();
|
|
7688
|
-
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
7715
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEsc) {
|
|
7689
7716
|
// 如果是激活编辑状态,则取消编辑
|
|
7690
7717
|
if (actived.row) {
|
|
7691
7718
|
const params = actived.args;
|
|
7692
7719
|
$xeTable.handleClearEdit(evnt);
|
|
7693
7720
|
// 如果配置了选中功能,则为选中状态
|
|
7694
|
-
if (mouseConfig && mouseOpts.selected) {
|
|
7721
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
|
|
7695
7722
|
$xeTable.$nextTick(() => $xeTable.handleSelected(params, evnt));
|
|
7696
7723
|
}
|
|
7697
7724
|
}
|
|
@@ -7769,7 +7796,7 @@ const tableMethods = {
|
|
|
7769
7796
|
$xeTable.moveCtxMenu(evnt, ctxMenuStore, 'selected', isRightArrow, true, menuList);
|
|
7770
7797
|
}
|
|
7771
7798
|
}
|
|
7772
|
-
else if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
7799
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
7773
7800
|
$xeTable.handleKdClAreaEvent(evnt);
|
|
7774
7801
|
}
|
|
7775
7802
|
else if (isEsc) {
|
|
@@ -7778,7 +7805,7 @@ const tableMethods = {
|
|
|
7778
7805
|
$xeTable.closeMenu();
|
|
7779
7806
|
}
|
|
7780
7807
|
$xeTable.closeFilter();
|
|
7781
|
-
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
7808
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEsc) {
|
|
7782
7809
|
// 如果是激活编辑状态,则取消编辑
|
|
7783
7810
|
if (actived.row) {
|
|
7784
7811
|
const params = actived.args;
|
|
@@ -7790,7 +7817,7 @@ const tableMethods = {
|
|
|
7790
7817
|
}
|
|
7791
7818
|
}
|
|
7792
7819
|
}
|
|
7793
|
-
else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selectRow && selectColumn && (selectColumn.type === 'checkbox' || selectColumn.type === 'radio')) {
|
|
7820
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && isSpacebar && keyboardOpts.isChecked && selectRow && selectColumn && (selectColumn.type === 'checkbox' || selectColumn.type === 'radio')) {
|
|
7794
7821
|
// 空格键支持选中复选框
|
|
7795
7822
|
evnt.preventDefault();
|
|
7796
7823
|
if (selectColumn.type === 'checkbox') {
|
|
@@ -7817,7 +7844,7 @@ const tableMethods = {
|
|
|
7817
7844
|
internalData._keyCtx = false;
|
|
7818
7845
|
}, 1000);
|
|
7819
7846
|
}
|
|
7820
|
-
else if (isEnter && !hasAltKey && keyboardConfig && keyboardOpts.isEnter && (selectRow || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
7847
|
+
else if (isEnter && !hasAltKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEnter && (selectRow || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
7821
7848
|
// 退出选中
|
|
7822
7849
|
if (isControlKey) {
|
|
7823
7850
|
// 如果是激活编辑状态,则取消编辑
|
|
@@ -7825,7 +7852,7 @@ const tableMethods = {
|
|
|
7825
7852
|
const params = actived.args;
|
|
7826
7853
|
$xeTable.handleClearEdit(evnt);
|
|
7827
7854
|
// 如果配置了选中功能,则为选中状态
|
|
7828
|
-
if (mouseConfig && mouseOpts.selected) {
|
|
7855
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
|
|
7829
7856
|
$xeTable.$nextTick(() => $xeTable.handleSelected(params, evnt));
|
|
7830
7857
|
}
|
|
7831
7858
|
}
|
|
@@ -7943,7 +7970,7 @@ const tableMethods = {
|
|
|
7943
7970
|
}
|
|
7944
7971
|
}
|
|
7945
7972
|
}
|
|
7946
|
-
else if (operArrow && keyboardConfig && keyboardOpts.isArrow) {
|
|
7973
|
+
else if (operArrow && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow) {
|
|
7947
7974
|
if (!isEditStatus) {
|
|
7948
7975
|
// 如果按下了方向键
|
|
7949
7976
|
if (mouseOpts.selected && selectRow && selectColumn) {
|
|
@@ -7961,7 +7988,7 @@ const tableMethods = {
|
|
|
7961
7988
|
}
|
|
7962
7989
|
}
|
|
7963
7990
|
}
|
|
7964
|
-
else if (isTab && keyboardConfig && keyboardOpts.isTab) {
|
|
7991
|
+
else if (isTab && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isTab) {
|
|
7965
7992
|
// 如果按下了 Tab 键切换
|
|
7966
7993
|
if (selectRow || actived.row) {
|
|
7967
7994
|
const activeRow = selectRow || actived.row;
|
|
@@ -8011,7 +8038,7 @@ const tableMethods = {
|
|
|
8011
8038
|
}
|
|
8012
8039
|
}
|
|
8013
8040
|
}
|
|
8014
|
-
else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
8041
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
8015
8042
|
// 如果是删除键
|
|
8016
8043
|
if (!isEditStatus) {
|
|
8017
8044
|
const { delMethod } = keyboardOpts;
|
|
@@ -8042,7 +8069,7 @@ const tableMethods = {
|
|
|
8042
8069
|
}
|
|
8043
8070
|
}
|
|
8044
8071
|
}
|
|
8045
|
-
else if (hasBackspaceKey && keyboardConfig && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
8072
|
+
else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
8046
8073
|
if (!isEditStatus) {
|
|
8047
8074
|
const { backMethod } = keyboardOpts;
|
|
8048
8075
|
// 如果是删除键
|
|
@@ -8075,7 +8102,7 @@ const tableMethods = {
|
|
|
8075
8102
|
}
|
|
8076
8103
|
}
|
|
8077
8104
|
}
|
|
8078
|
-
else if (hasBackspaceKey && keyboardConfig && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
8105
|
+
else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
8079
8106
|
// 如果树形表格回退键关闭当前行返回父节点
|
|
8080
8107
|
const { parent: parentRow } = XEUtils.findTree(internalData.afterTreeFullData, item => item === currentRow, { children: childrenField });
|
|
8081
8108
|
if (parentRow) {
|
|
@@ -8093,7 +8120,7 @@ const tableMethods = {
|
|
|
8093
8120
|
.then(() => $xeTable.triggerCurrentRowEvent(evnt, params));
|
|
8094
8121
|
}
|
|
8095
8122
|
}
|
|
8096
|
-
else if (keyboardConfig && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasAxternalInputTarget(evnt.target)) {
|
|
8123
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasAxternalInputTarget(evnt.target)) {
|
|
8097
8124
|
if (isY || (hasShiftKey && isZ)) {
|
|
8098
8125
|
// 恢复被撤销的操作:Ctrl + Y 或 Ctrl + Shift + Z
|
|
8099
8126
|
evnt.preventDefault();
|
|
@@ -8105,7 +8132,7 @@ const tableMethods = {
|
|
|
8105
8132
|
$xeTable.handleUndoStackEvent(evnt);
|
|
8106
8133
|
}
|
|
8107
8134
|
}
|
|
8108
|
-
else if (keyboardConfig && keyboardOpts.isEdit && !isControlKey && (isSpacebar || isProcess || (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || (keyCode >= 186 && keyCode <= 192) || (keyCode >= 219 && keyCode <= 222))) {
|
|
8135
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEdit && !isControlKey && (isSpacebar || isProcess || (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || (keyCode >= 186 && keyCode <= 192) || (keyCode >= 219 && keyCode <= 222))) {
|
|
8109
8136
|
const { editMode, editMethod } = keyboardOpts;
|
|
8110
8137
|
// 启用编辑后,空格键功能将失效
|
|
8111
8138
|
// if (isSpacebar) {
|
|
@@ -8161,7 +8188,7 @@ const tableMethods = {
|
|
|
8161
8188
|
const { actived } = editStore;
|
|
8162
8189
|
if (isActivated && !filterStore.visible) {
|
|
8163
8190
|
if (!(actived.row || actived.column)) {
|
|
8164
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handlePeClAreaEvent) {
|
|
8191
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handlePeClAreaEvent) {
|
|
8165
8192
|
$xeTable.handlePeClAreaEvent(evnt);
|
|
8166
8193
|
}
|
|
8167
8194
|
}
|
|
@@ -8181,7 +8208,7 @@ const tableMethods = {
|
|
|
8181
8208
|
const { actived } = editStore;
|
|
8182
8209
|
if (isActivated && !filterStore.visible) {
|
|
8183
8210
|
if (!(actived.row || actived.column)) {
|
|
8184
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handleCyClAreaEvent) {
|
|
8211
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleCyClAreaEvent) {
|
|
8185
8212
|
$xeTable.handleCyClAreaEvent(evnt);
|
|
8186
8213
|
}
|
|
8187
8214
|
}
|
|
@@ -8201,7 +8228,7 @@ const tableMethods = {
|
|
|
8201
8228
|
const { actived } = editStore;
|
|
8202
8229
|
if (isActivated && !filterStore.visible) {
|
|
8203
8230
|
if (!(actived.row || actived.column)) {
|
|
8204
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handleCutCellAreaEvent) {
|
|
8231
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleCutCellAreaEvent) {
|
|
8205
8232
|
$xeTable.handleCutCellAreaEvent(evnt);
|
|
8206
8233
|
}
|
|
8207
8234
|
}
|
|
@@ -9645,7 +9672,7 @@ const tableMethods = {
|
|
|
9645
9672
|
const internalData = $xeTable;
|
|
9646
9673
|
const { mouseConfig } = props;
|
|
9647
9674
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
9648
|
-
const isMouseSelected = mouseConfig && mouseOpts.selected;
|
|
9675
|
+
const isMouseSelected = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected;
|
|
9649
9676
|
const column = handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
9650
9677
|
if (column) {
|
|
9651
9678
|
$xeTable.clearCurrentColumn();
|
|
@@ -9859,7 +9886,7 @@ const tableMethods = {
|
|
|
9859
9886
|
const { field, sortable, order } = column;
|
|
9860
9887
|
if (sortable) {
|
|
9861
9888
|
const params = { $table: $xeTable, $event: evnt, column, field, property: field, order, sortList: $xeTable.getSortColumns(), sortTime: column.sortTime };
|
|
9862
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleSortEvent) {
|
|
9889
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleSortEvent) {
|
|
9863
9890
|
$xeTable.handleSortEvent(evnt, params);
|
|
9864
9891
|
}
|
|
9865
9892
|
if (!order) {
|
|
@@ -9941,7 +9968,7 @@ const tableMethods = {
|
|
|
9941
9968
|
$xeTable.handleHeaderCellDragMousedownEvent(evnt, params);
|
|
9942
9969
|
}
|
|
9943
9970
|
}
|
|
9944
|
-
if (!triggerDrag && mouseConfig && mouseOpts.area && $xeTable.handleHeaderCellAreaMouseDnEvent) {
|
|
9971
|
+
if (!triggerDrag && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleHeaderCellAreaMouseDnEvent) {
|
|
9945
9972
|
$xeTable.handleHeaderCellAreaMouseDnEvent(evnt, Object.assign({ cell, triggerSort, triggerFilter }, params));
|
|
9946
9973
|
}
|
|
9947
9974
|
$xeTable.focus();
|
|
@@ -10723,6 +10750,7 @@ const tableMethods = {
|
|
|
10723
10750
|
const internalData = $xeTable;
|
|
10724
10751
|
const { mouseConfig } = props;
|
|
10725
10752
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
10753
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
10726
10754
|
const { animation, isPeerDrag, isCrossDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod, dragToChildMethod } = columnDragOpts;
|
|
10727
10755
|
const { collectColumn, fullColumnIdData } = internalData;
|
|
10728
10756
|
const el = $xeTable.$refs.refElem;
|
|
@@ -10885,7 +10913,7 @@ const tableMethods = {
|
|
|
10885
10913
|
}
|
|
10886
10914
|
});
|
|
10887
10915
|
$xeTable.handleClearStack();
|
|
10888
|
-
if (mouseConfig) {
|
|
10916
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
10889
10917
|
if ($xeTable.clearSelected) {
|
|
10890
10918
|
$xeTable.clearSelected();
|
|
10891
10919
|
}
|
|
@@ -13490,7 +13518,7 @@ const tableMethods = {
|
|
|
13490
13518
|
const props = $xeTable;
|
|
13491
13519
|
const { mouseConfig } = props;
|
|
13492
13520
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
13493
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
13521
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
13494
13522
|
return $xeTable.handleRecalculateCellAreaEvent();
|
|
13495
13523
|
}
|
|
13496
13524
|
return $xeTable.$nextTick();
|