vxe-table 4.22.4 → 4.23.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/dist/all.esm.js +211 -126
- package/dist/style.css +1 -1
- package/es/grid/src/grid.js +14 -2
- package/es/locale/lang/fr-FR.js +29 -29
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +4 -3
- package/es/table/module/edit/hook.js +5 -4
- package/es/table/module/export/hook.js +6 -4
- package/es/table/module/filter/hook.js +2 -2
- package/es/table/module/keyboard/hook.js +4 -3
- package/es/table/module/menu/hook.js +3 -3
- package/es/table/render/index.js +7 -4
- package/es/table/src/body.js +4 -4
- package/es/table/src/header.js +4 -3
- package/es/table/src/props.js +4 -0
- package/es/table/src/table.js +140 -90
- package/es/table/src/util.js +7 -3
- package/es/ui/index.js +9 -11
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.js +9 -0
- package/lib/grid/src/grid.js +13 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +136 -84
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/fr-FR.js +29 -29
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +29 -29
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +3 -1
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +4 -3
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +9 -3
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/filter/hook.js +1 -1
- package/lib/table/module/filter/hook.min.js +1 -1
- package/lib/table/module/keyboard/hook.js +4 -3
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/module/menu/hook.js +2 -2
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/render/index.js +11 -5
- 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/props.js +4 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +48 -46
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +12 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +9 -11
- 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 +14 -2
- package/packages/locale/lang/fr-FR.ts +903 -903
- package/packages/table/module/custom/panel.ts +4 -3
- package/packages/table/module/edit/hook.ts +5 -4
- package/packages/table/module/export/hook.ts +6 -4
- package/packages/table/module/filter/hook.ts +2 -2
- package/packages/table/module/keyboard/hook.ts +4 -3
- package/packages/table/module/menu/hook.ts +3 -3
- package/packages/table/render/index.ts +7 -4
- package/packages/table/src/body.ts +4 -4
- package/packages/table/src/header.ts +4 -3
- package/packages/table/src/props.ts +4 -0
- package/packages/table/src/table.ts +141 -88
- package/packages/table/src/util.ts +7 -3
- package/packages/ui/index.ts +8 -10
- package/packages/ui/src/utils.ts +10 -0
- /package/es/{iconfont.1791617063720.ttf → iconfont.1791954193706.ttf} +0 -0
- /package/es/{iconfont.1791617063720.woff → iconfont.1791954193706.woff} +0 -0
- /package/es/{iconfont.1791617063720.woff2 → iconfont.1791954193706.woff2} +0 -0
- /package/lib/{iconfont.1791617063720.ttf → iconfont.1791954193706.ttf} +0 -0
- /package/lib/{iconfont.1791617063720.woff → iconfont.1791954193706.woff} +0 -0
- /package/lib/{iconfont.1791617063720.woff2 → iconfont.1791954193706.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -8,6 +8,15 @@ const { getConfig: getConfig$a } = VxeUI;
|
|
|
8
8
|
function isEnableConf(conf) {
|
|
9
9
|
return conf && conf.enabled !== false;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* 用于开关类型的配置项
|
|
13
|
+
* 局部启用规则:conf={}
|
|
14
|
+
* 局部禁用规则:conf={enabled:false}
|
|
15
|
+
* 全局默认启用规则:conf.enabled=true
|
|
16
|
+
*/
|
|
17
|
+
function hasEnableConf(conf, opts) {
|
|
18
|
+
return opts && (conf ? opts.enabled !== false : opts.enabled);
|
|
19
|
+
}
|
|
11
20
|
function isEmptyValue(cellValue) {
|
|
12
21
|
return cellValue === null || cellValue === undefined || cellValue === '';
|
|
13
22
|
}
|
|
@@ -47,7 +56,7 @@ function getDefaultConfig(val1, def1) {
|
|
|
47
56
|
return XEUtils.eqNull(val1) ? def1 : val1;
|
|
48
57
|
}
|
|
49
58
|
|
|
50
|
-
const version = "4.
|
|
59
|
+
const version = "4.23.0-beta.1";
|
|
51
60
|
VxeUI.version = version;
|
|
52
61
|
VxeUI.tableVersion = version;
|
|
53
62
|
VxeUI.setConfig({
|
|
@@ -309,16 +318,14 @@ VxeUI.setConfig({
|
|
|
309
318
|
oSize: 0
|
|
310
319
|
},
|
|
311
320
|
scrollbarConfig: {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
visible: true
|
|
321
|
-
}
|
|
321
|
+
// xConfig: {
|
|
322
|
+
// // position: 'bottom',
|
|
323
|
+
// // visible: true
|
|
324
|
+
// },
|
|
325
|
+
// yConfig: {
|
|
326
|
+
// // position: 'right',
|
|
327
|
+
// // visible: true
|
|
328
|
+
// }
|
|
322
329
|
},
|
|
323
330
|
undoRedoHistoryConfig: {
|
|
324
331
|
stackSize: 50
|
|
@@ -931,7 +938,7 @@ function getPopupWrapperElement(panelElem) {
|
|
|
931
938
|
}
|
|
932
939
|
|
|
933
940
|
const { log } = VxeUI;
|
|
934
|
-
const tableVersion = `table v${"4.
|
|
941
|
+
const tableVersion = `table v${"4.23.0-beta.1"}`;
|
|
935
942
|
function createComponentLog(name) {
|
|
936
943
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
937
944
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -2033,6 +2040,10 @@ function getLastChildColumn(column) {
|
|
|
2033
2040
|
}
|
|
2034
2041
|
function clearTableDefaultStatus($xeTable) {
|
|
2035
2042
|
const { props, internalData } = $xeTable;
|
|
2043
|
+
const { keyboardConfig, mouseConfig } = props;
|
|
2044
|
+
const { computeMouseOpts, computeKeyboardOpts } = $xeTable.getComputeMaps();
|
|
2045
|
+
const mouseOpts = computeMouseOpts.value;
|
|
2046
|
+
const keyboardOpts = computeKeyboardOpts.value;
|
|
2036
2047
|
internalData.initStatus = false;
|
|
2037
2048
|
const actionList = [
|
|
2038
2049
|
$xeTable.clearSort(),
|
|
@@ -2050,10 +2061,10 @@ function clearTableDefaultStatus($xeTable) {
|
|
|
2050
2061
|
if ($xeTable.clearFilter) {
|
|
2051
2062
|
actionList.push($xeTable.clearFilter());
|
|
2052
2063
|
}
|
|
2053
|
-
if ($xeTable.clearSelected && (
|
|
2064
|
+
if ($xeTable.clearSelected && (hasEnableConf(keyboardConfig, keyboardOpts) || hasEnableConf(mouseConfig, mouseOpts))) {
|
|
2054
2065
|
actionList.push($xeTable.clearSelected());
|
|
2055
2066
|
}
|
|
2056
|
-
if ($xeTable.clearCellAreas &&
|
|
2067
|
+
if ($xeTable.clearCellAreas && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
2057
2068
|
actionList.push($xeTable.clearCellAreas(), $xeTable.clearCopyCellArea());
|
|
2058
2069
|
}
|
|
2059
2070
|
return Promise.all(actionList).then(() => {
|
|
@@ -4062,6 +4073,10 @@ const tableProps = {
|
|
|
4062
4073
|
virtualXConfig: Object,
|
|
4063
4074
|
// 纵向虚拟滚动配置项
|
|
4064
4075
|
virtualYConfig: Object,
|
|
4076
|
+
useScrollbar: {
|
|
4077
|
+
type: Boolean,
|
|
4078
|
+
default: () => getConfig$7().table.useScrollbar
|
|
4079
|
+
},
|
|
4065
4080
|
// 滚动条配置项
|
|
4066
4081
|
scrollbarConfig: Object,
|
|
4067
4082
|
// 撤销/恢复历史配置项
|
|
@@ -4490,7 +4505,7 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
4490
4505
|
};
|
|
4491
4506
|
}
|
|
4492
4507
|
// 按下事件处理
|
|
4493
|
-
if (isRowDragCell || checkboxOpts.range || mouseConfig) {
|
|
4508
|
+
if (isRowDragCell || checkboxOpts.range || hasEnableConf(mouseConfig, mouseOpts)) {
|
|
4494
4509
|
tdOns.onMousedown = (evnt) => {
|
|
4495
4510
|
$xeTable.triggerCellMousedownEvent(evnt, cellParams);
|
|
4496
4511
|
};
|
|
@@ -4669,7 +4684,7 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
4669
4684
|
}
|
|
4670
4685
|
}
|
|
4671
4686
|
let showAreaRowStatus = false;
|
|
4672
|
-
if (mouseConfig && mouseOpts.area && !_columnIndex && selectCellToRow) {
|
|
4687
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && !_columnIndex && selectCellToRow) {
|
|
4673
4688
|
showAreaRowStatus = true;
|
|
4674
4689
|
}
|
|
4675
4690
|
if (!fixedHiddenColumn && showResizable && isAllColumnDrag) {
|
|
@@ -5103,7 +5118,7 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
5103
5118
|
h('div', {
|
|
5104
5119
|
class: 'vxe-table--checkbox-range'
|
|
5105
5120
|
}),
|
|
5106
|
-
mouseConfig && mouseOpts.area
|
|
5121
|
+
hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area
|
|
5107
5122
|
? h('div', {
|
|
5108
5123
|
class: 'vxe-table--cell-area',
|
|
5109
5124
|
xid: xID
|
|
@@ -5214,6 +5229,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5214
5229
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
5215
5230
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
5216
5231
|
const rendererOpts = computeRendererOpts.value;
|
|
5232
|
+
const mouseOpts = computeMouseOpts.value;
|
|
5217
5233
|
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
5218
5234
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
5219
5235
|
const isLastRow = _rowIndex === headerGroups.length - 1;
|
|
@@ -5299,7 +5315,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5299
5315
|
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(cellParams));
|
|
5300
5316
|
}
|
|
5301
5317
|
// 按下事件处理
|
|
5302
|
-
if (mouseConfig || isColDragCell) {
|
|
5318
|
+
if (hasEnableConf(mouseConfig, mouseOpts) || isColDragCell) {
|
|
5303
5319
|
thOns.onMousedown = (evnt) => $xeTable.triggerHeaderCellMousedownEvent(evnt, cellParams);
|
|
5304
5320
|
}
|
|
5305
5321
|
// 拖拽列事件
|
|
@@ -5616,7 +5632,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5616
5632
|
ref: refHeaderTHead
|
|
5617
5633
|
}, renderHeads(isGroup, isOptimizeMode, renderHeaderList, renderColumnList))
|
|
5618
5634
|
]),
|
|
5619
|
-
mouseConfig && mouseOpts.area
|
|
5635
|
+
hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area
|
|
5620
5636
|
? h('div', {
|
|
5621
5637
|
class: 'vxe-table--cell-area',
|
|
5622
5638
|
xid: xID
|
|
@@ -6051,7 +6067,7 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6051
6067
|
const VxeUIRadioGroupComponent = VxeUI.getComponent('VxeRadioGroup');
|
|
6052
6068
|
const $xeTable = inject('$xeTable', {});
|
|
6053
6069
|
const { props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
6054
|
-
const { computeSize, computeCustomOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts, computeAggregateOpts } = $xeTable.getComputeMaps();
|
|
6070
|
+
const { computeSize, computeCustomOpts, computeMouseOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts, computeAggregateOpts } = $xeTable.getComputeMaps();
|
|
6055
6071
|
const refElem = ref();
|
|
6056
6072
|
const refBodyWrapperElem = ref();
|
|
6057
6073
|
const refCustomBodyElem = ref();
|
|
@@ -6357,6 +6373,7 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6357
6373
|
const { customColumnList } = tableReactData;
|
|
6358
6374
|
const { collectColumn } = tableInternalData;
|
|
6359
6375
|
const customOpts = computeCustomOpts.value;
|
|
6376
|
+
const mouseOpts = computeMouseOpts.value;
|
|
6360
6377
|
const { immediate } = customOpts;
|
|
6361
6378
|
const trEl = evnt.currentTarget;
|
|
6362
6379
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
@@ -6498,7 +6515,7 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6498
6515
|
nafIndex = XEUtils.findIndexOf(customColumnList, item => item.id === newColumn.id);
|
|
6499
6516
|
customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
|
|
6500
6517
|
}
|
|
6501
|
-
if (mouseConfig) {
|
|
6518
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
6502
6519
|
if ($xeTable.clearSelected) {
|
|
6503
6520
|
$xeTable.clearSelected();
|
|
6504
6521
|
}
|
|
@@ -9097,7 +9114,7 @@ hooks$7.add('tableFilterModule', {
|
|
|
9097
9114
|
$xeTable.handleTableData(true);
|
|
9098
9115
|
$xeTable.checkSelectionStatus();
|
|
9099
9116
|
}
|
|
9100
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleFilterEvent) {
|
|
9117
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleFilterEvent) {
|
|
9101
9118
|
$xeTable.handleFilterEvent(evnt, params);
|
|
9102
9119
|
}
|
|
9103
9120
|
if (evnt) {
|
|
@@ -9573,7 +9590,7 @@ hooks$6.add('tableMenuModule', {
|
|
|
9573
9590
|
const type = 'body';
|
|
9574
9591
|
const params = { source: 'table', type, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, keyboard: true, columns: visibleColumn.slice(0), $event: evnt };
|
|
9575
9592
|
// 如果开启单元格区域
|
|
9576
|
-
if (mouseConfig && mouseOpts.area) {
|
|
9593
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
|
|
9577
9594
|
const activeArea = $xeTable.getActiveCellArea();
|
|
9578
9595
|
if (activeArea && activeArea.row && activeArea.column) {
|
|
9579
9596
|
params.row = activeArea.row;
|
|
@@ -9582,7 +9599,7 @@ hooks$6.add('tableMenuModule', {
|
|
|
9582
9599
|
return;
|
|
9583
9600
|
}
|
|
9584
9601
|
}
|
|
9585
|
-
else if (mouseConfig && mouseOpts.selected) {
|
|
9602
|
+
else if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
|
|
9586
9603
|
// 如果启用键盘导航且已选中单元格
|
|
9587
9604
|
if (selected.row && selected.column) {
|
|
9588
9605
|
params.row = selected.row;
|
|
@@ -10099,6 +10116,7 @@ hooks$5.add('tableEditModule', {
|
|
|
10099
10116
|
const { editConfig, mouseConfig } = props;
|
|
10100
10117
|
const { editStore, tableColumn } = reactData;
|
|
10101
10118
|
const editOpts = computeEditOpts.value;
|
|
10119
|
+
const mouseOpts = computeMouseOpts.value;
|
|
10102
10120
|
const { mode } = editOpts;
|
|
10103
10121
|
const { actived, focused } = editStore;
|
|
10104
10122
|
const { row, column } = params;
|
|
@@ -10114,7 +10132,7 @@ hooks$5.add('tableEditModule', {
|
|
|
10114
10132
|
// 判断是否禁用编辑
|
|
10115
10133
|
let type = 'edit-disabled';
|
|
10116
10134
|
if (!beforeEditMethod || beforeEditMethod(Object.assign(Object.assign({}, editParams), { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }))) {
|
|
10117
|
-
if (mouseConfig) {
|
|
10135
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
10118
10136
|
$xeTable.clearSelected();
|
|
10119
10137
|
if ($xeTable.clearCellAreas) {
|
|
10120
10138
|
$xeTable.clearCellAreas();
|
|
@@ -10172,7 +10190,7 @@ hooks$5.add('tableEditModule', {
|
|
|
10172
10190
|
}
|
|
10173
10191
|
else {
|
|
10174
10192
|
const { column: oldColumn } = actived;
|
|
10175
|
-
if (mouseConfig) {
|
|
10193
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
10176
10194
|
$xeTable.clearSelected();
|
|
10177
10195
|
if ($xeTable.clearCellAreas) {
|
|
10178
10196
|
$xeTable.clearCellAreas();
|
|
@@ -10755,7 +10773,7 @@ hooks$5.add('tableEditModule', {
|
|
|
10755
10773
|
const editOpts = computeEditOpts.value;
|
|
10756
10774
|
const { actived, selected } = editStore;
|
|
10757
10775
|
const { row, column } = params;
|
|
10758
|
-
const isMouseSelected = mouseConfig && mouseOpts.selected;
|
|
10776
|
+
const isMouseSelected = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected;
|
|
10759
10777
|
const selectMethod = () => {
|
|
10760
10778
|
if (isMouseSelected && (selected.row !== row || selected.column !== column)) {
|
|
10761
10779
|
if (actived.row !== row || (editOpts.mode === 'cell' ? actived.column !== column : false)) {
|
|
@@ -12752,7 +12770,7 @@ hooks$4.add('tableExportModule', {
|
|
|
12752
12770
|
}
|
|
12753
12771
|
return;
|
|
12754
12772
|
}
|
|
12755
|
-
if (!importConfig) {
|
|
12773
|
+
if (!hasEnableConf(importConfig, importOpts)) {
|
|
12756
12774
|
errLog$5('vxe.error.reqProp', ['import-config']);
|
|
12757
12775
|
}
|
|
12758
12776
|
// 处理类型
|
|
@@ -12790,23 +12808,25 @@ hooks$4.add('tableExportModule', {
|
|
|
12790
12808
|
},
|
|
12791
12809
|
closeExport: handleCloseExport,
|
|
12792
12810
|
openExport(options) {
|
|
12811
|
+
const { exportConfig } = props;
|
|
12793
12812
|
const exportOpts = computeExportOpts.value;
|
|
12794
12813
|
const defOpts = Object.assign({
|
|
12795
12814
|
message: true,
|
|
12796
12815
|
types: XEUtils.keys(exportOpts._typeMaps)
|
|
12797
12816
|
}, exportOpts, options);
|
|
12798
|
-
if (!
|
|
12817
|
+
if (!hasEnableConf(exportConfig, exportOpts)) {
|
|
12799
12818
|
errLog$5('vxe.error.reqProp', ['export-config']);
|
|
12800
12819
|
}
|
|
12801
12820
|
return handleExportAndPrint(defOpts);
|
|
12802
12821
|
},
|
|
12803
12822
|
closePrint: handleCloseExport,
|
|
12804
12823
|
openPrint(options) {
|
|
12824
|
+
const { printConfig } = props;
|
|
12805
12825
|
const printOpts = computePrintOpts.value;
|
|
12806
12826
|
const defOpts = Object.assign({
|
|
12807
12827
|
message: true
|
|
12808
12828
|
}, printOpts, options);
|
|
12809
|
-
if (!
|
|
12829
|
+
if (!hasEnableConf(printConfig, printOpts)) {
|
|
12810
12830
|
errLog$5('vxe.error.reqProp', ['print-config']);
|
|
12811
12831
|
}
|
|
12812
12832
|
return handleExportAndPrint(defOpts, true);
|
|
@@ -13070,14 +13090,14 @@ hooks$3.add('tableKeyboardModule', {
|
|
|
13070
13090
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
13071
13091
|
const mouseOpts = computeMouseOpts.value;
|
|
13072
13092
|
const editOpts = computeEditOpts.value;
|
|
13073
|
-
if (mouseConfig && mouseOpts.area && $xeTable.
|
|
13074
|
-
return $xeTable.
|
|
13093
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.triggerClAaMnEvent) {
|
|
13094
|
+
return $xeTable.triggerClAaMnEvent(evnt, params);
|
|
13075
13095
|
}
|
|
13076
13096
|
else {
|
|
13077
13097
|
if (checkboxConfig && checkboxOpts.range) {
|
|
13078
13098
|
handleCheckboxRangeEvent(evnt, params);
|
|
13079
13099
|
}
|
|
13080
|
-
if (mouseConfig && mouseOpts.selected) {
|
|
13100
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
|
|
13081
13101
|
if (!editConfig || editOpts.mode === 'cell') {
|
|
13082
13102
|
$xeTable.handleSelected(params, evnt);
|
|
13083
13103
|
}
|
|
@@ -15188,9 +15208,11 @@ function getNativeInputRenderCellVNs(cellValue, labelVNs, renderOpts, renderPara
|
|
|
15188
15208
|
const { name } = renderOpts;
|
|
15189
15209
|
const tableProps = $table.props;
|
|
15190
15210
|
const { editConfig, mouseConfig } = tableProps;
|
|
15211
|
+
const { computeMouseOpts } = $table.getComputeMaps();
|
|
15212
|
+
const mouseOpts = computeMouseOpts.value;
|
|
15191
15213
|
let isColSelected = false;
|
|
15192
15214
|
let isActiveCellArea = false;
|
|
15193
|
-
if (editConfig && mouseConfig) {
|
|
15215
|
+
if (editConfig && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
15194
15216
|
const tableReactData = $table.reactData;
|
|
15195
15217
|
const { editStore } = tableReactData;
|
|
15196
15218
|
const { selected } = editStore;
|
|
@@ -15212,12 +15234,13 @@ function getInputRenderCellVNs(cellValue, labelVNs, renderOpts, renderParams) {
|
|
|
15212
15234
|
const { $table, row, column } = renderParams;
|
|
15213
15235
|
const tableProps = $table.props;
|
|
15214
15236
|
const { editConfig, mouseConfig } = tableProps;
|
|
15237
|
+
const { computeEditOpts, computeMouseOpts } = $table.getComputeMaps();
|
|
15238
|
+
const mouseOpts = computeMouseOpts.value;
|
|
15215
15239
|
let isColSelected = false;
|
|
15216
15240
|
let isActiveCellArea = false;
|
|
15217
|
-
if (editConfig && mouseConfig) {
|
|
15241
|
+
if (editConfig && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
15218
15242
|
const tableReactData = $table.reactData;
|
|
15219
15243
|
const { editStore } = tableReactData;
|
|
15220
|
-
const { computeEditOpts } = $table.getComputeMaps();
|
|
15221
15244
|
const editOpts = computeEditOpts.value;
|
|
15222
15245
|
if (editOpts.isReuseKeep) {
|
|
15223
15246
|
const { selected } = editStore;
|
|
@@ -15968,6 +15991,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
15968
15991
|
const { slots, emit } = context;
|
|
15969
15992
|
const xID = XEUtils.uniqueId();
|
|
15970
15993
|
const browseObj = XEUtils.browse();
|
|
15994
|
+
const scrollDefaultConf = Object.assign({}, getConfig$2().scrollbar);
|
|
15971
15995
|
// 使用已安装的组件,如果未安装则不渲染
|
|
15972
15996
|
const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading');
|
|
15973
15997
|
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
|
|
@@ -16110,14 +16134,12 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
16110
16134
|
return Object.assign({}, getConfig$2().table.scrollbarConfig, props.scrollbarConfig);
|
|
16111
16135
|
});
|
|
16112
16136
|
const computeScrollbarXOpts = computed(() => {
|
|
16113
|
-
var _a;
|
|
16114
16137
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
16115
|
-
return Object.assign({}, scrollbarOpts.x,
|
|
16138
|
+
return scrollbarOpts.x ? Object.assign({}, scrollbarOpts.x, scrollbarOpts.xConfig) : (scrollbarOpts.xConfig || {});
|
|
16116
16139
|
});
|
|
16117
16140
|
const computeScrollbarYOpts = computed(() => {
|
|
16118
|
-
var _a;
|
|
16119
16141
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
16120
|
-
return Object.assign({}, scrollbarOpts.y,
|
|
16142
|
+
return scrollbarOpts.y ? Object.assign({}, scrollbarOpts.y, scrollbarOpts.yConfig) : (scrollbarOpts.yConfig || {});
|
|
16121
16143
|
});
|
|
16122
16144
|
const computeScrollbarXToTop = computed(() => {
|
|
16123
16145
|
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
@@ -16456,15 +16478,18 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
16456
16478
|
});
|
|
16457
16479
|
const computeTableStyle = computed(() => {
|
|
16458
16480
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
16459
|
-
const
|
|
16460
|
-
const
|
|
16461
|
-
|
|
16462
|
-
|
|
16463
|
-
}
|
|
16464
|
-
if (
|
|
16465
|
-
|
|
16481
|
+
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
16482
|
+
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
16483
|
+
const barWidth = getDefaultConfig(getDefaultConfig(scrollbarYOpts.width, scrollbarOpts.width), scrollDefaultConf.width);
|
|
16484
|
+
const barHeight = getDefaultConfig(getDefaultConfig(scrollbarXOpts.height, scrollbarOpts.height), scrollDefaultConf.height);
|
|
16485
|
+
const stys = {};
|
|
16486
|
+
if (barWidth || barHeight) {
|
|
16487
|
+
stys['--vxe-ui-table-view-scrollbar-width'] = toCssUnit(barWidth || barHeight);
|
|
16488
|
+
stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(barWidth || barHeight);
|
|
16489
|
+
stys['--vxe-ui-table-view-scrollbar-height'] = toCssUnit(barHeight || barWidth);
|
|
16490
|
+
stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(barHeight || barWidth);
|
|
16466
16491
|
}
|
|
16467
|
-
return
|
|
16492
|
+
return stys;
|
|
16468
16493
|
});
|
|
16469
16494
|
const computeTableRowExpandedList = computed(() => {
|
|
16470
16495
|
const { tableData, rowExpandedFlag, expandColumn, rowGroupExpandedFlag, treeExpandedFlag } = reactData;
|
|
@@ -18370,7 +18395,6 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
18370
18395
|
const isHeaderRenderOptimize = computeIsHeaderRenderOptimize.value;
|
|
18371
18396
|
const isBodyRenderOptimize = computeIsBodyRenderOptimize.value;
|
|
18372
18397
|
const isFooterRenderOptimize = computeIsFooterRenderOptimize.value;
|
|
18373
|
-
const scrollbarOpts = computeScrollbarOpts.value;
|
|
18374
18398
|
const mouseOpts = computeMouseOpts.value;
|
|
18375
18399
|
const bodyWrapperElem = getRefElem(elemStore['main-body-wrapper']);
|
|
18376
18400
|
const bodyTableElem = getRefElem(elemStore['main-body-table']);
|
|
@@ -18378,24 +18402,26 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
18378
18402
|
emptyPlaceholderElem.style.top = `${tHeaderHeight}px`;
|
|
18379
18403
|
emptyPlaceholderElem.style.height = bodyWrapperElem ? `${bodyWrapperElem.offsetHeight - osbHeight}px` : '';
|
|
18380
18404
|
}
|
|
18381
|
-
const
|
|
18382
|
-
const
|
|
18405
|
+
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
18406
|
+
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
18383
18407
|
const scrollbarYToLeft = computeScrollbarYToLeft.value;
|
|
18384
18408
|
let xScrollbarVisible = overflowX ? 'visible' : 'hidden';
|
|
18385
|
-
|
|
18409
|
+
const hideXScroll = scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden';
|
|
18410
|
+
if (!hideXScroll || $xeGanttView) {
|
|
18386
18411
|
osbHeight = scrollbarHeight;
|
|
18387
18412
|
xScrollbarVisible = 'visible';
|
|
18388
18413
|
}
|
|
18389
|
-
else if (
|
|
18414
|
+
else if (hideXScroll) {
|
|
18390
18415
|
osbHeight = 0;
|
|
18391
18416
|
xScrollbarVisible = 'hidden';
|
|
18392
18417
|
}
|
|
18393
18418
|
let yScrollbarVisible = overflowY ? 'visible' : 'hidden';
|
|
18394
|
-
|
|
18419
|
+
const showYScroll = !(scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden');
|
|
18420
|
+
if (!showYScroll || (($xeGantt && $xeGanttView && $xeGantt.reactData.showRightView) && !scrollbarYToLeft)) {
|
|
18395
18421
|
osbWidth = 0;
|
|
18396
18422
|
yScrollbarVisible = 'hidden';
|
|
18397
18423
|
}
|
|
18398
|
-
else if (
|
|
18424
|
+
else if (showYScroll) {
|
|
18399
18425
|
osbWidth = scrollbarWidth;
|
|
18400
18426
|
yScrollbarVisible = 'visible';
|
|
18401
18427
|
}
|
|
@@ -18629,7 +18655,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
18629
18655
|
if (currentRow) {
|
|
18630
18656
|
$xeTable.setCurrentRow(currentRow);
|
|
18631
18657
|
}
|
|
18632
|
-
if (mouseConfig && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
18658
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
18633
18659
|
$xeTable.addCellSelectedClass();
|
|
18634
18660
|
}
|
|
18635
18661
|
if ($xeGanttView && $xeGanttView.handleUpdateStyle) {
|
|
@@ -19216,14 +19242,18 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
19216
19242
|
let overflowY = false;
|
|
19217
19243
|
let overflowX = false;
|
|
19218
19244
|
if (bodyWrapperElem) {
|
|
19245
|
+
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
19246
|
+
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
19247
|
+
const barWidth = XEUtils.toNumber(getDefaultConfig(getDefaultConfig(scrollbarYOpts.width, scrollbarOpts.width), scrollDefaultConf.width));
|
|
19248
|
+
const barHeight = XEUtils.toNumber(getDefaultConfig(getDefaultConfig(scrollbarXOpts.height, scrollbarOpts.height), scrollDefaultConf.height));
|
|
19219
19249
|
overflowY = scrollYHeight > bodyWrapperElem.clientHeight;
|
|
19220
19250
|
if (yHandleEl) {
|
|
19221
|
-
reactData.scrollbarWidth =
|
|
19251
|
+
reactData.scrollbarWidth = (barWidth || barHeight) || (yHandleEl.offsetWidth - yHandleEl.clientWidth) || 14;
|
|
19222
19252
|
}
|
|
19223
19253
|
reactData.overflowY = overflowY;
|
|
19224
19254
|
overflowX = scrollXWidth > bodyWrapperElem.clientWidth;
|
|
19225
19255
|
if (xHandleEl) {
|
|
19226
|
-
reactData.scrollbarHeight =
|
|
19256
|
+
reactData.scrollbarHeight = (barHeight || barWidth) || (xHandleEl.offsetHeight - xHandleEl.clientHeight) || 14;
|
|
19227
19257
|
}
|
|
19228
19258
|
const hHeight = headerTableElem ? headerTableElem.clientHeight : 0;
|
|
19229
19259
|
const fHeight = footerTableElem ? footerTableElem.clientHeight : 0;
|
|
@@ -19633,12 +19663,13 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
19633
19663
|
* @param {Array} datas 数据
|
|
19634
19664
|
*/
|
|
19635
19665
|
const loadTableData = (datas, isReload, isReset) => {
|
|
19636
|
-
const { keepSource, treeConfig, rowGroupConfig, aggregateConfig } = props;
|
|
19666
|
+
const { keepSource, treeConfig, rowGroupConfig, aggregateConfig, mouseConfig } = props;
|
|
19637
19667
|
const { rowGroupList, scrollYLoad: oldScrollYLoad } = reactData;
|
|
19638
19668
|
const { initStatus, scrollYStore, scrollXStore, lastScrollLeft, lastScrollTop } = internalData;
|
|
19639
19669
|
const rowOpts = computeRowOpts.value;
|
|
19640
19670
|
const treeOpts = computeTreeOpts.value;
|
|
19641
19671
|
const expandOpts = computeExpandOpts.value;
|
|
19672
|
+
const mouseOpts = computeMouseOpts.value;
|
|
19642
19673
|
const { transform } = treeOpts;
|
|
19643
19674
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
19644
19675
|
let treeData = [];
|
|
@@ -19728,7 +19759,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
19728
19759
|
if (keepSource) {
|
|
19729
19760
|
$xeTable.cacheSourceMap(fullData);
|
|
19730
19761
|
}
|
|
19731
|
-
if ($xeTable.clearCellAreas &&
|
|
19762
|
+
if ($xeTable.clearCellAreas && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
19732
19763
|
$xeTable.clearCellAreas();
|
|
19733
19764
|
$xeTable.clearCopyCellArea();
|
|
19734
19765
|
}
|
|
@@ -22681,7 +22712,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
22681
22712
|
setCurrentColumn(fieldOrColumn) {
|
|
22682
22713
|
const { mouseConfig } = props;
|
|
22683
22714
|
const mouseOpts = computeMouseOpts.value;
|
|
22684
|
-
const isMouseSelected = mouseConfig && mouseOpts.selected;
|
|
22715
|
+
const isMouseSelected = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected;
|
|
22685
22716
|
const column = handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
22686
22717
|
if (column) {
|
|
22687
22718
|
$xeTable.clearCurrentColumn();
|
|
@@ -23928,7 +23959,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
23928
23959
|
updateCellAreas() {
|
|
23929
23960
|
const { mouseConfig } = props;
|
|
23930
23961
|
const mouseOpts = computeMouseOpts.value;
|
|
23931
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
23962
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
23932
23963
|
return $xeTable.handleRecalculateCellAreaEvent();
|
|
23933
23964
|
}
|
|
23934
23965
|
return nextTick();
|
|
@@ -24187,6 +24218,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24187
24218
|
const editOpts = computeEditOpts.value;
|
|
24188
24219
|
const validOpts = computeValidOpts.value;
|
|
24189
24220
|
const areaOpts = computeAreaOpts.value;
|
|
24221
|
+
const mouseOpts = computeMouseOpts.value;
|
|
24190
24222
|
const { actived } = editStore;
|
|
24191
24223
|
const $validTooltip = refValidTooltip.value;
|
|
24192
24224
|
const tableFilter = refTableFilter.value;
|
|
@@ -24273,7 +24305,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24273
24305
|
}
|
|
24274
24306
|
}
|
|
24275
24307
|
}
|
|
24276
|
-
else if (mouseConfig) {
|
|
24308
|
+
else if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
24277
24309
|
if (!getEventTargetNode(evnt, el).flag && !($xeGGWrapper && getEventTargetNode(evnt, $xeGGWrapper.getRefMaps().refElem.value).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.getRefMaps().refElem.value).flag) && !($xeToolbar && getEventTargetNode(evnt, $xeToolbar.getRefMaps().refElem.value).flag)) {
|
|
24278
24310
|
if ($xeTable.clearSelected) {
|
|
24279
24311
|
$xeTable.clearSelected();
|
|
@@ -24360,7 +24392,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24360
24392
|
if (isEsc) {
|
|
24361
24393
|
$xeTable.preventEvent(evnt, 'event.keydown', null, () => {
|
|
24362
24394
|
dispatchEvent('keydown-start', {}, evnt);
|
|
24363
|
-
if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
24395
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
24364
24396
|
$xeTable.handleKdClAreaEvent(evnt);
|
|
24365
24397
|
}
|
|
24366
24398
|
else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
|
|
@@ -24370,7 +24402,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24370
24402
|
$xeTable.closeMenu();
|
|
24371
24403
|
}
|
|
24372
24404
|
$xeTable.closeFilter();
|
|
24373
|
-
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
24405
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEsc) {
|
|
24374
24406
|
// 如果是激活编辑状态,则取消编辑
|
|
24375
24407
|
if (actived.row) {
|
|
24376
24408
|
const params = actived.args;
|
|
@@ -24447,7 +24479,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24447
24479
|
$xeTable.moveCtxMenu(evnt, ctxMenuStore, 'selected', isRightArrow, true, menuList);
|
|
24448
24480
|
}
|
|
24449
24481
|
}
|
|
24450
|
-
else if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
24482
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
24451
24483
|
$xeTable.handleKdClAreaEvent(evnt);
|
|
24452
24484
|
}
|
|
24453
24485
|
else if (isEsc) {
|
|
@@ -24456,7 +24488,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24456
24488
|
$xeTable.closeMenu();
|
|
24457
24489
|
}
|
|
24458
24490
|
$xeTable.closeFilter();
|
|
24459
|
-
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
24491
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEsc) {
|
|
24460
24492
|
// 如果是激活编辑状态,则取消编辑
|
|
24461
24493
|
if (actived.row) {
|
|
24462
24494
|
const params = actived.args;
|
|
@@ -24468,7 +24500,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24468
24500
|
}
|
|
24469
24501
|
}
|
|
24470
24502
|
}
|
|
24471
|
-
else if (isSpacebar && keyboardConfig && keyboardOpts.isChecked && selectRow && selectColumn && (selectColumn.type === 'checkbox' || selectColumn.type === 'radio')) {
|
|
24503
|
+
else if (isSpacebar && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isChecked && selectRow && selectColumn && (selectColumn.type === 'checkbox' || selectColumn.type === 'radio')) {
|
|
24472
24504
|
// 空格键支持选中复选框
|
|
24473
24505
|
evnt.preventDefault();
|
|
24474
24506
|
if (selectColumn.type === 'checkbox') {
|
|
@@ -24495,7 +24527,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24495
24527
|
internalData._keyCtx = false;
|
|
24496
24528
|
}, 1000);
|
|
24497
24529
|
}
|
|
24498
|
-
else if (isEnter && !isAltKey && keyboardConfig && keyboardOpts.isEnter && (selectRow || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
24530
|
+
else if (isEnter && !isAltKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEnter && (selectRow || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
24499
24531
|
// 退出选中
|
|
24500
24532
|
if (isControlKey) {
|
|
24501
24533
|
// 如果是激活编辑状态,则取消编辑
|
|
@@ -24623,7 +24655,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24623
24655
|
}
|
|
24624
24656
|
}
|
|
24625
24657
|
}
|
|
24626
|
-
else if (operArrow && keyboardConfig && keyboardOpts.isArrow) {
|
|
24658
|
+
else if (operArrow && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow) {
|
|
24627
24659
|
if (!isEditStatus) {
|
|
24628
24660
|
// 如果按下了方向键
|
|
24629
24661
|
if (mouseOpts.selected && selectRow && selectColumn) {
|
|
@@ -24641,7 +24673,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24641
24673
|
}
|
|
24642
24674
|
}
|
|
24643
24675
|
}
|
|
24644
|
-
else if (isTab && keyboardConfig && keyboardOpts.isTab) {
|
|
24676
|
+
else if (isTab && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isTab) {
|
|
24645
24677
|
// 如果按下了 Tab 键切换
|
|
24646
24678
|
if (selectRow || actived.row) {
|
|
24647
24679
|
const activeRow = selectRow || actived.row;
|
|
@@ -24691,7 +24723,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24691
24723
|
}
|
|
24692
24724
|
}
|
|
24693
24725
|
}
|
|
24694
|
-
else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
24726
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
24695
24727
|
// 如果是删除键
|
|
24696
24728
|
if (!isEditStatus) {
|
|
24697
24729
|
const { delMethod } = keyboardOpts;
|
|
@@ -24722,7 +24754,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24722
24754
|
}
|
|
24723
24755
|
}
|
|
24724
24756
|
}
|
|
24725
|
-
else if (hasBackspaceKey && keyboardConfig && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
24757
|
+
else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
24726
24758
|
if (!isEditStatus) {
|
|
24727
24759
|
const { backMethod } = keyboardOpts;
|
|
24728
24760
|
// 如果是删除键
|
|
@@ -24755,7 +24787,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24755
24787
|
}
|
|
24756
24788
|
}
|
|
24757
24789
|
}
|
|
24758
|
-
else if (hasBackspaceKey && keyboardConfig && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
24790
|
+
else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
24759
24791
|
// 如果树形表格回退键关闭当前行返回父节点
|
|
24760
24792
|
const { parent: parentRow } = XEUtils.findTree(internalData.afterTreeFullData, item => item === currentRow, { children: childrenField });
|
|
24761
24793
|
if (parentRow) {
|
|
@@ -24773,7 +24805,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24773
24805
|
.then(() => $xeTable.triggerCurrentRowEvent(evnt, params));
|
|
24774
24806
|
}
|
|
24775
24807
|
}
|
|
24776
|
-
else if (keyboardConfig && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasAxternalInputTarget(evnt.target)) {
|
|
24808
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasAxternalInputTarget(evnt.target)) {
|
|
24777
24809
|
if (evnt.target) {
|
|
24778
24810
|
if (isY || (hasShiftKey && isZ)) {
|
|
24779
24811
|
// 恢复被撤销的操作:Ctrl + Y 或 Ctrl + Shift + Z
|
|
@@ -24787,7 +24819,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24787
24819
|
}
|
|
24788
24820
|
}
|
|
24789
24821
|
}
|
|
24790
|
-
else if (keyboardConfig && isEnableConf(editConfig) && keyboardOpts.isEdit && !isControlKey && (isSpacebar || isProcess || evnt.key === 'Process' || (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || (keyCode >= 186 && keyCode <= 192) || (keyCode >= 219 && keyCode <= 222))) {
|
|
24822
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && isEnableConf(editConfig) && keyboardOpts.isEdit && !isControlKey && (isSpacebar || isProcess || evnt.key === 'Process' || (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || (keyCode >= 186 && keyCode <= 192) || (keyCode >= 219 && keyCode <= 222))) {
|
|
24791
24823
|
const { editMode, editMethod } = keyboardOpts;
|
|
24792
24824
|
// 启用编辑后,空格键功能将失效
|
|
24793
24825
|
// if (isSpacebar) {
|
|
@@ -24839,7 +24871,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24839
24871
|
const { actived } = editStore;
|
|
24840
24872
|
if (isActivated && !filterStore.visible) {
|
|
24841
24873
|
if (!(actived.row || actived.column)) {
|
|
24842
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handlePeClAreaEvent) {
|
|
24874
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handlePeClAreaEvent) {
|
|
24843
24875
|
$xeTable.handlePeClAreaEvent(evnt);
|
|
24844
24876
|
}
|
|
24845
24877
|
}
|
|
@@ -24855,7 +24887,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24855
24887
|
const { actived } = editStore;
|
|
24856
24888
|
if (isActivated && !filterStore.visible) {
|
|
24857
24889
|
if (!(actived.row || actived.column)) {
|
|
24858
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handleCyClAreaEvent) {
|
|
24890
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleCyClAreaEvent) {
|
|
24859
24891
|
$xeTable.handleCyClAreaEvent(evnt);
|
|
24860
24892
|
}
|
|
24861
24893
|
}
|
|
@@ -24871,7 +24903,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24871
24903
|
const { actived } = editStore;
|
|
24872
24904
|
if (isActivated && !filterStore.visible) {
|
|
24873
24905
|
if (!(actived.row || actived.column)) {
|
|
24874
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handleCutCellAreaEvent) {
|
|
24906
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleCutCellAreaEvent) {
|
|
24875
24907
|
$xeTable.handleCutCellAreaEvent(evnt);
|
|
24876
24908
|
}
|
|
24877
24909
|
}
|
|
@@ -25378,11 +25410,24 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
25378
25410
|
*/
|
|
25379
25411
|
getParentElem() {
|
|
25380
25412
|
const el = refElem.value;
|
|
25381
|
-
if (
|
|
25382
|
-
|
|
25383
|
-
|
|
25413
|
+
if (!el) {
|
|
25414
|
+
return null;
|
|
25415
|
+
}
|
|
25416
|
+
const parentEl = el.parentElement;
|
|
25417
|
+
if (!parentEl) {
|
|
25418
|
+
return null;
|
|
25384
25419
|
}
|
|
25385
|
-
|
|
25420
|
+
if ($xeGantt && hasClass(parentEl, 'vxe-gantt--table-wrapper')) {
|
|
25421
|
+
return $xeGantt.getParentElem();
|
|
25422
|
+
}
|
|
25423
|
+
else if ($xeGrid && hasClass(parentEl, 'vxe-grid--table-wrapper')) {
|
|
25424
|
+
return $xeGrid.getParentElem();
|
|
25425
|
+
}
|
|
25426
|
+
// 如果是虚拟滚动条
|
|
25427
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
25428
|
+
return parentEl.parentElement;
|
|
25429
|
+
}
|
|
25430
|
+
return parentEl;
|
|
25386
25431
|
},
|
|
25387
25432
|
/**
|
|
25388
25433
|
* 获取父容器的高度
|
|
@@ -25390,25 +25435,32 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
25390
25435
|
getParentHeight() {
|
|
25391
25436
|
const { height } = props;
|
|
25392
25437
|
const el = refElem.value;
|
|
25393
|
-
if (el) {
|
|
25394
|
-
|
|
25395
|
-
|
|
25396
|
-
|
|
25397
|
-
|
|
25398
|
-
|
|
25399
|
-
|
|
25400
|
-
|
|
25401
|
-
|
|
25402
|
-
|
|
25403
|
-
|
|
25404
|
-
|
|
25405
|
-
|
|
25406
|
-
|
|
25407
|
-
|
|
25438
|
+
if (!el) {
|
|
25439
|
+
return 0;
|
|
25440
|
+
}
|
|
25441
|
+
let parentEl = el.parentElement;
|
|
25442
|
+
let parentPaddingSize = 0;
|
|
25443
|
+
let parentWrapperHeight = 0;
|
|
25444
|
+
if (!parentEl) {
|
|
25445
|
+
return 0;
|
|
25446
|
+
}
|
|
25447
|
+
if ($xeGantt && hasClass(parentEl, 'vxe-gantt--table-wrapper')) {
|
|
25448
|
+
parentWrapperHeight = $xeGantt.getParentHeight();
|
|
25449
|
+
}
|
|
25450
|
+
else if ($xeGrid && hasClass(parentEl, 'vxe-grid--table-wrapper')) {
|
|
25451
|
+
parentWrapperHeight = $xeGrid.getParentHeight();
|
|
25452
|
+
}
|
|
25453
|
+
else {
|
|
25454
|
+
// 如果是虚拟滚动条
|
|
25455
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
25456
|
+
parentEl = parentEl.parentElement;
|
|
25457
|
+
}
|
|
25458
|
+
if (parentEl) {
|
|
25459
|
+
parentWrapperHeight = parentEl.clientHeight;
|
|
25460
|
+
parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentEl) : 0;
|
|
25408
25461
|
}
|
|
25409
|
-
return Math.floor(parentWrapperHeight - parentPaddingSize);
|
|
25410
25462
|
}
|
|
25411
|
-
return
|
|
25463
|
+
return Math.floor(parentWrapperHeight - parentPaddingSize);
|
|
25412
25464
|
},
|
|
25413
25465
|
/**
|
|
25414
25466
|
* 获取需要排除的高度
|
|
@@ -26075,7 +26127,8 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
26075
26127
|
*/
|
|
26076
26128
|
handleCustom() {
|
|
26077
26129
|
const { mouseConfig } = props;
|
|
26078
|
-
|
|
26130
|
+
const mouseOpts = computeMouseOpts.value;
|
|
26131
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
26079
26132
|
if ($xeTable.clearSelected) {
|
|
26080
26133
|
$xeTable.clearSelected();
|
|
26081
26134
|
}
|
|
@@ -27233,7 +27286,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
27233
27286
|
const { field, sortable, order } = column;
|
|
27234
27287
|
if (sortable) {
|
|
27235
27288
|
const params = { $table: $xeTable, $event: evnt, column, field, property: field, order, sortList: $xeTable.getSortColumns(), sortTime: column.sortTime };
|
|
27236
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleSortEvent) {
|
|
27289
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleSortEvent) {
|
|
27237
27290
|
$xeTable.handleSortEvent(evnt, params);
|
|
27238
27291
|
}
|
|
27239
27292
|
if (!order) {
|
|
@@ -27310,7 +27363,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
27310
27363
|
$xeTable.handleHeaderCellDragMousedownEvent(evnt, params);
|
|
27311
27364
|
}
|
|
27312
27365
|
}
|
|
27313
|
-
if (!triggerDrag && mouseConfig && mouseOpts.area && $xeTable.handleHeaderCellAreaMouseDnEvent) {
|
|
27366
|
+
if (!triggerDrag && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleHeaderCellAreaMouseDnEvent) {
|
|
27314
27367
|
$xeTable.handleHeaderCellAreaMouseDnEvent(evnt, Object.assign({ cell, triggerSort, triggerFilter }, params));
|
|
27315
27368
|
}
|
|
27316
27369
|
$xeTable.focus();
|
|
@@ -28049,6 +28102,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
28049
28102
|
handleColDragSwapEvent(evnt, isSyncColumn, dragCol, prevDragCol, prevDragPos, prevDragToChild) {
|
|
28050
28103
|
const { mouseConfig } = props;
|
|
28051
28104
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
28105
|
+
const mouseOpts = computeMouseOpts.value;
|
|
28052
28106
|
const { animation, isPeerDrag, isCrossDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod, dragToChildMethod } = columnDragOpts;
|
|
28053
28107
|
const { collectColumn, fullColumnIdData } = internalData;
|
|
28054
28108
|
const el = refElem.value;
|
|
@@ -28209,7 +28263,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
28209
28263
|
}
|
|
28210
28264
|
});
|
|
28211
28265
|
$xeTable.handleClearStack();
|
|
28212
|
-
if (mouseConfig) {
|
|
28266
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
28213
28267
|
if ($xeTable.clearSelected) {
|
|
28214
28268
|
$xeTable.clearSelected();
|
|
28215
28269
|
}
|
|
@@ -28747,14 +28801,14 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
28747
28801
|
const isRollY = overflowY && scrollTop !== lastScrollTop;
|
|
28748
28802
|
if (isRollX) {
|
|
28749
28803
|
// 如果禁用滚动
|
|
28750
|
-
if (scrollbarXOpts.visible === 'hidden') {
|
|
28804
|
+
if (scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden') {
|
|
28751
28805
|
evnt.preventDefault();
|
|
28752
28806
|
return;
|
|
28753
28807
|
}
|
|
28754
28808
|
}
|
|
28755
28809
|
if (isRollY) {
|
|
28756
28810
|
// 如果禁用滚动
|
|
28757
|
-
if (scrollbarYOpts.visible === 'hidden') {
|
|
28811
|
+
if (scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden') {
|
|
28758
28812
|
evnt.preventDefault();
|
|
28759
28813
|
return;
|
|
28760
28814
|
}
|
|
@@ -29351,10 +29405,15 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29351
29405
|
const osYBehavior = XEUtils.eqNull(overscrollYBehavior) ? scrollbarOpts.overscrollBehavior : overscrollYBehavior;
|
|
29352
29406
|
return h('div', {
|
|
29353
29407
|
ref: isFixedLeft ? refLeftContainer : refRightContainer,
|
|
29354
|
-
class: [
|
|
29408
|
+
class: [
|
|
29409
|
+
`vxe-table--fixed-${fixedType}-wrapper`,
|
|
29410
|
+
`sx--${(scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden') ? 'hidden' : 'visible'}`,
|
|
29411
|
+
`sy--${(scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden') ? 'hidden' : 'visible'}`,
|
|
29412
|
+
{
|
|
29355
29413
|
[`x-ob--${osXBehavior}`]: osXBehavior,
|
|
29356
29414
|
[`y-ob--${osYBehavior}`]: osYBehavior
|
|
29357
|
-
}
|
|
29415
|
+
}
|
|
29416
|
+
]
|
|
29358
29417
|
}, [
|
|
29359
29418
|
showHeader
|
|
29360
29419
|
? h(TableHeaderComponent, {
|
|
@@ -29663,7 +29722,11 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29663
29722
|
}]
|
|
29664
29723
|
}, [
|
|
29665
29724
|
h('div', {
|
|
29666
|
-
class: [
|
|
29725
|
+
class: [
|
|
29726
|
+
'vxe-table--main-wrapper',
|
|
29727
|
+
`sx--${(scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden') ? 'hidden' : 'visible'}`,
|
|
29728
|
+
`sy--${(scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden') ? 'hidden' : 'visible'}`
|
|
29729
|
+
]
|
|
29667
29730
|
}, [
|
|
29668
29731
|
/**
|
|
29669
29732
|
* 表头
|
|
@@ -29719,7 +29782,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29719
29782
|
]);
|
|
29720
29783
|
};
|
|
29721
29784
|
const renderVN = () => {
|
|
29722
|
-
const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props;
|
|
29785
|
+
const { loading, stripe, useScrollbar, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules, importConfig, exportConfig, printConfig } = props;
|
|
29723
29786
|
const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore, tooltipStore } = reactData;
|
|
29724
29787
|
const { teleportToWrapperElem, popupToWrapperElem, customPopupToElem } = internalData;
|
|
29725
29788
|
const { leftList, rightList } = columnStore;
|
|
@@ -29747,10 +29810,13 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29747
29810
|
const isContentMenu = computeIsContentMenu.value;
|
|
29748
29811
|
const currLoading = reactData.isColLoading || reactData.isRowLoading || loading;
|
|
29749
29812
|
const resizableOpts = computeResizableOpts.value;
|
|
29750
|
-
const isArea = mouseConfig && mouseOpts.area;
|
|
29813
|
+
const isArea = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area;
|
|
29751
29814
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
29752
29815
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
29753
29816
|
const scrollbarYToLeft = computeScrollbarYToLeft.value;
|
|
29817
|
+
const exportOpts = computeExportOpts.value;
|
|
29818
|
+
const importOpts = computeImportOpts.value;
|
|
29819
|
+
const printOpts = computePrintOpts.value;
|
|
29754
29820
|
const { isCrossTableDrag } = rowDragOpts;
|
|
29755
29821
|
const tbOns = {
|
|
29756
29822
|
onKeydown: keydownEvent,
|
|
@@ -29759,13 +29825,13 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29759
29825
|
if (isCrossTableDrag && !tableData.length) {
|
|
29760
29826
|
tbOns.onDragover = $xeTable.handleCrossTableRowDragoverEmptyEvent;
|
|
29761
29827
|
}
|
|
29762
|
-
return h('div', Object.assign({ ref: refElem, class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`, `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`, {
|
|
29828
|
+
return h('div', Object.assign({ ref: refElem, class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, useScrollbar ? 'is--virtual-scrollbar' : 'is--native-scrollbar', `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`, `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`, {
|
|
29763
29829
|
[`size--${vSize}`]: vSize,
|
|
29764
29830
|
[`valid-msg--${validOpts.msgMode}`]: !!editRules,
|
|
29765
29831
|
'vxe-editable': !!editConfig,
|
|
29766
29832
|
'old-cell-valid': editRules && getConfig$2().cellVaildMode === 'obsolete',
|
|
29767
29833
|
'cell--highlight': highlightCell,
|
|
29768
|
-
'cell--selected': mouseConfig && mouseOpts.selected,
|
|
29834
|
+
'cell--selected': hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected,
|
|
29769
29835
|
'cell--area': isArea,
|
|
29770
29836
|
'header-cell--area': isArea && areaOpts.selectCellByHeader,
|
|
29771
29837
|
'body-cell--area': isArea && areaOpts.selectCellByBody,
|
|
@@ -29975,7 +30041,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29975
30041
|
/**
|
|
29976
30042
|
* 导入
|
|
29977
30043
|
*/
|
|
29978
|
-
initStore.import &&
|
|
30044
|
+
initStore.import && hasEnableConf(importConfig, importOpts)
|
|
29979
30045
|
? h(TableImportPanelComponent, {
|
|
29980
30046
|
key: 'it',
|
|
29981
30047
|
defaultOptions: reactData.importParams,
|
|
@@ -29985,7 +30051,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29985
30051
|
/**
|
|
29986
30052
|
* 导出
|
|
29987
30053
|
*/
|
|
29988
|
-
initStore.export && (
|
|
30054
|
+
initStore.export && (hasEnableConf(exportConfig, exportOpts) || hasEnableConf(printConfig, printOpts))
|
|
29989
30055
|
? h(TableExportPanelComponent, {
|
|
29990
30056
|
key: 'et',
|
|
29991
30057
|
defaultOptions: reactData.exportParams,
|
|
@@ -30327,7 +30393,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30327
30393
|
$xeTable.preventEvent(null, 'deactivated', { $table: $xeTable });
|
|
30328
30394
|
});
|
|
30329
30395
|
onMounted(() => {
|
|
30330
|
-
const { editConfig, exportConfig, importConfig, treeConfig, minHeight, keepSource } = props;
|
|
30396
|
+
const { editConfig, exportConfig, importConfig, treeConfig, minHeight, keepSource, areaConfig } = props;
|
|
30331
30397
|
const { scrollXStore, scrollYStore } = internalData;
|
|
30332
30398
|
const columnOpts = computeColumnOpts.value;
|
|
30333
30399
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
@@ -30350,6 +30416,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30350
30416
|
const areaOpts = computeAreaOpts.value;
|
|
30351
30417
|
const sortOpts = computeSortOpts.value;
|
|
30352
30418
|
const filterOpts = computeFilterOpts.value;
|
|
30419
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
30353
30420
|
const { groupFields } = aggregateOpts;
|
|
30354
30421
|
if ($xeGantt) {
|
|
30355
30422
|
const { refClassifyWrapperElem } = $xeGantt.getRefMaps();
|
|
@@ -30441,13 +30508,13 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30441
30508
|
// warnLog('vxe.error.delProp', ['scroll-x', 'virtual-x-config'])
|
|
30442
30509
|
// }
|
|
30443
30510
|
// 检查导入导出类型,如果自定义导入导出方法,则不校验类型
|
|
30444
|
-
if (importConfig && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
30511
|
+
if (hasEnableConf(importConfig, importOpts) && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
30445
30512
|
warnLog$2('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(importOpts._typeMaps), type)).join(',') || XEUtils.keys(importOpts._typeMaps).join(',')]);
|
|
30446
30513
|
}
|
|
30447
|
-
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
30514
|
+
if (hasEnableConf(exportConfig, exportOpts) && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
30448
30515
|
warnLog$2('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)).join(',') || XEUtils.keys(exportOpts._typeMaps).join(',')]);
|
|
30449
30516
|
}
|
|
30450
|
-
if (exportConfig && XEUtils.isBoolean(exportOpts.isAllExpand)) {
|
|
30517
|
+
if (hasEnableConf(exportConfig, exportOpts) && XEUtils.isBoolean(exportOpts.isAllExpand)) {
|
|
30451
30518
|
warnLog$2('vxe.error.delProp', ['isAllExpand', 'isTreeAllExpanded']);
|
|
30452
30519
|
}
|
|
30453
30520
|
if (!props.id) {
|
|
@@ -30461,8 +30528,8 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30461
30528
|
if (rowOpts.height && !props.showOverflow) {
|
|
30462
30529
|
warnLog$2('vxe.error.notProp', ['table.show-overflow']);
|
|
30463
30530
|
}
|
|
30464
|
-
if (!$xeTable.
|
|
30465
|
-
if (
|
|
30531
|
+
if (!$xeTable.triggerClAaMnEvent) {
|
|
30532
|
+
if (hasEnableConf(areaConfig, areaOpts)) {
|
|
30466
30533
|
warnLog$2('vxe.error.notProp', ['area-config']);
|
|
30467
30534
|
}
|
|
30468
30535
|
if (props.clipConfig) {
|
|
@@ -30548,10 +30615,10 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30548
30615
|
if (columnOpts.currentMethod) {
|
|
30549
30616
|
warnLog$2('vxe.error.delProp', ['row-config.currentMethod', 'current-column-config.beforeSelectMethod']);
|
|
30550
30617
|
}
|
|
30551
|
-
// if ((rowOpts.isCurrent || highlightCurrentRow) &&
|
|
30618
|
+
// if ((rowOpts.isCurrent || highlightCurrentRow) && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow && !XEUtils.isBoolean(currentRowOpts.isFollowSelected)) {
|
|
30552
30619
|
// warnLog('vxe.error.notConflictProp', ['row-config.isCurrent & keyboard-config.isArrow', 'current-row-config.isFollowSelected'])
|
|
30553
30620
|
// }
|
|
30554
|
-
// if ((columnOpts.isCurrent || highlightCurrentColumn) &&
|
|
30621
|
+
// if ((columnOpts.isCurrent || highlightCurrentColumn) && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow && !XEUtils.isBoolean(currentColumnOpts.isFollowSelected)) {
|
|
30555
30622
|
// warnLog('vxe.error.notConflictProp', ['column-config.isCurrent & keyboard-config.isArrow', 'current-column-config.isFollowSelected'])
|
|
30556
30623
|
// }
|
|
30557
30624
|
// 如果不支持虚拟滚动
|
|
@@ -30575,12 +30642,18 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30575
30642
|
// if (props.editRules && !$xeTable.validate) {
|
|
30576
30643
|
// errLog('vxe.error.reqModule', ['Validator'])
|
|
30577
30644
|
// }
|
|
30578
|
-
// if ((checkboxOpts.range ||
|
|
30645
|
+
// if ((checkboxOpts.range || hasEnableConf(keyboardConfig, keyboardOpts) || hasEnableConf(mouseConfig, mouseOpts)) && !$xeTable.handleCellMousedownEvent) {
|
|
30579
30646
|
// errLog('vxe.error.reqModule', ['Keyboard'])
|
|
30580
30647
|
// }
|
|
30581
|
-
// if ((
|
|
30648
|
+
// if (hasEnableConf(printConfig, printOpts) || hasEnableConf(importConfig, importOpts) || hasEnableConf(exportConfig, exportOpts)) && !$xeTable.exportData) {
|
|
30582
30649
|
// errLog('vxe.error.reqModule', ['Export'])
|
|
30583
30650
|
// }
|
|
30651
|
+
if (scrollbarOpts.x) {
|
|
30652
|
+
warnLog$2('vxe.error.delProp', ['scrollbar-config.x', 'scrollbar-config.xConfig']);
|
|
30653
|
+
}
|
|
30654
|
+
if (scrollbarOpts.y) {
|
|
30655
|
+
warnLog$2('vxe.error.delProp', ['scrollbar-config.y', 'scrollbar-config.yConfig']);
|
|
30656
|
+
}
|
|
30584
30657
|
Object.assign(scrollYStore, {
|
|
30585
30658
|
startIndex: 0,
|
|
30586
30659
|
endIndex: 0,
|
|
@@ -33023,10 +33096,22 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
33023
33096
|
}
|
|
33024
33097
|
return 0;
|
|
33025
33098
|
},
|
|
33099
|
+
getParentElem() {
|
|
33100
|
+
const el = refElem.value;
|
|
33101
|
+
if (!el) {
|
|
33102
|
+
return null;
|
|
33103
|
+
}
|
|
33104
|
+
let parentEl = el.parentElement;
|
|
33105
|
+
// 如果是虚拟滚动条
|
|
33106
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
33107
|
+
parentEl = parentEl.parentElement;
|
|
33108
|
+
}
|
|
33109
|
+
return parentEl;
|
|
33110
|
+
},
|
|
33026
33111
|
getParentHeight() {
|
|
33027
33112
|
const el = refElem.value;
|
|
33028
33113
|
if (el) {
|
|
33029
|
-
const parentEl =
|
|
33114
|
+
const parentEl = $xeGrid.getParentElem();
|
|
33030
33115
|
return (reactData.isZMax ? getDomNode().visibleHeight : (parentEl ? XEUtils.toNumber(getComputedStyle(parentEl).height) : 0)) - gridPrivateMethods.getExcludeHeight();
|
|
33031
33116
|
}
|
|
33032
33117
|
return 0;
|