vxe-table 4.22.3 → 4.23.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/dist/all.esm.js +219 -154
- package/dist/style.css +1 -1
- package/es/grid/src/grid.js +24 -7
- 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/table.js +91 -64
- package/es/table/src/util.js +7 -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 +26 -6
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +214 -156
- package/lib/index.umd.min.js +1 -1
- 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/table.js +39 -37
- 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 +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 +25 -7
- 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/table.ts +88 -62
- package/packages/table/src/util.ts +7 -3
- package/packages/ui/src/utils.ts +10 -0
- /package/es/{iconfont.1790757600308.ttf → iconfont.1791880428511.ttf} +0 -0
- /package/es/{iconfont.1790757600308.woff → iconfont.1791880428511.woff} +0 -0
- /package/es/{iconfont.1790757600308.woff2 → iconfont.1791880428511.woff2} +0 -0
- /package/lib/{iconfont.1790757600308.ttf → iconfont.1791880428511.ttf} +0 -0
- /package/lib/{iconfont.1790757600308.woff → iconfont.1791880428511.woff} +0 -0
- /package/lib/{iconfont.1790757600308.woff2 → iconfont.1791880428511.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.0";
|
|
51
60
|
VxeUI.version = version;
|
|
52
61
|
VxeUI.tableVersion = version;
|
|
53
62
|
VxeUI.setConfig({
|
|
@@ -931,7 +940,7 @@ function getPopupWrapperElement(panelElem) {
|
|
|
931
940
|
}
|
|
932
941
|
|
|
933
942
|
const { log } = VxeUI;
|
|
934
|
-
const tableVersion = `table v${"4.
|
|
943
|
+
const tableVersion = `table v${"4.23.0-beta.0"}`;
|
|
935
944
|
function createComponentLog(name) {
|
|
936
945
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
937
946
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -2033,6 +2042,10 @@ function getLastChildColumn(column) {
|
|
|
2033
2042
|
}
|
|
2034
2043
|
function clearTableDefaultStatus($xeTable) {
|
|
2035
2044
|
const { props, internalData } = $xeTable;
|
|
2045
|
+
const { keyboardConfig, mouseConfig } = props;
|
|
2046
|
+
const { computeMouseOpts, computeKeyboardOpts } = $xeTable.getComputeMaps();
|
|
2047
|
+
const mouseOpts = computeMouseOpts.value;
|
|
2048
|
+
const keyboardOpts = computeKeyboardOpts.value;
|
|
2036
2049
|
internalData.initStatus = false;
|
|
2037
2050
|
const actionList = [
|
|
2038
2051
|
$xeTable.clearSort(),
|
|
@@ -2050,10 +2063,10 @@ function clearTableDefaultStatus($xeTable) {
|
|
|
2050
2063
|
if ($xeTable.clearFilter) {
|
|
2051
2064
|
actionList.push($xeTable.clearFilter());
|
|
2052
2065
|
}
|
|
2053
|
-
if ($xeTable.clearSelected && (
|
|
2066
|
+
if ($xeTable.clearSelected && (hasEnableConf(keyboardConfig, keyboardOpts) || hasEnableConf(mouseConfig, mouseOpts))) {
|
|
2054
2067
|
actionList.push($xeTable.clearSelected());
|
|
2055
2068
|
}
|
|
2056
|
-
if ($xeTable.clearCellAreas &&
|
|
2069
|
+
if ($xeTable.clearCellAreas && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
2057
2070
|
actionList.push($xeTable.clearCellAreas(), $xeTable.clearCopyCellArea());
|
|
2058
2071
|
}
|
|
2059
2072
|
return Promise.all(actionList).then(() => {
|
|
@@ -4490,7 +4503,7 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
4490
4503
|
};
|
|
4491
4504
|
}
|
|
4492
4505
|
// 按下事件处理
|
|
4493
|
-
if (isRowDragCell || checkboxOpts.range || mouseConfig) {
|
|
4506
|
+
if (isRowDragCell || checkboxOpts.range || hasEnableConf(mouseConfig, mouseOpts)) {
|
|
4494
4507
|
tdOns.onMousedown = (evnt) => {
|
|
4495
4508
|
$xeTable.triggerCellMousedownEvent(evnt, cellParams);
|
|
4496
4509
|
};
|
|
@@ -4669,7 +4682,7 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
4669
4682
|
}
|
|
4670
4683
|
}
|
|
4671
4684
|
let showAreaRowStatus = false;
|
|
4672
|
-
if (mouseConfig && mouseOpts.area && !_columnIndex && selectCellToRow) {
|
|
4685
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && !_columnIndex && selectCellToRow) {
|
|
4673
4686
|
showAreaRowStatus = true;
|
|
4674
4687
|
}
|
|
4675
4688
|
if (!fixedHiddenColumn && showResizable && isAllColumnDrag) {
|
|
@@ -5103,7 +5116,7 @@ var TableBodyComponent = defineVxeComponent({
|
|
|
5103
5116
|
h('div', {
|
|
5104
5117
|
class: 'vxe-table--checkbox-range'
|
|
5105
5118
|
}),
|
|
5106
|
-
mouseConfig && mouseOpts.area
|
|
5119
|
+
hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area
|
|
5107
5120
|
? h('div', {
|
|
5108
5121
|
class: 'vxe-table--cell-area',
|
|
5109
5122
|
xid: xID
|
|
@@ -5214,6 +5227,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5214
5227
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
5215
5228
|
const headerCellOpts = computeHeaderCellOpts.value;
|
|
5216
5229
|
const rendererOpts = computeRendererOpts.value;
|
|
5230
|
+
const mouseOpts = computeMouseOpts.value;
|
|
5217
5231
|
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
5218
5232
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
5219
5233
|
const isLastRow = _rowIndex === headerGroups.length - 1;
|
|
@@ -5299,7 +5313,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5299
5313
|
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(cellParams));
|
|
5300
5314
|
}
|
|
5301
5315
|
// 按下事件处理
|
|
5302
|
-
if (mouseConfig || isColDragCell) {
|
|
5316
|
+
if (hasEnableConf(mouseConfig, mouseOpts) || isColDragCell) {
|
|
5303
5317
|
thOns.onMousedown = (evnt) => $xeTable.triggerHeaderCellMousedownEvent(evnt, cellParams);
|
|
5304
5318
|
}
|
|
5305
5319
|
// 拖拽列事件
|
|
@@ -5616,7 +5630,7 @@ var TableHeaderComponent = defineVxeComponent({
|
|
|
5616
5630
|
ref: refHeaderTHead
|
|
5617
5631
|
}, renderHeads(isGroup, isOptimizeMode, renderHeaderList, renderColumnList))
|
|
5618
5632
|
]),
|
|
5619
|
-
mouseConfig && mouseOpts.area
|
|
5633
|
+
hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area
|
|
5620
5634
|
? h('div', {
|
|
5621
5635
|
class: 'vxe-table--cell-area',
|
|
5622
5636
|
xid: xID
|
|
@@ -6051,7 +6065,7 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6051
6065
|
const VxeUIRadioGroupComponent = VxeUI.getComponent('VxeRadioGroup');
|
|
6052
6066
|
const $xeTable = inject('$xeTable', {});
|
|
6053
6067
|
const { props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
6054
|
-
const { computeSize, computeCustomOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts, computeAggregateOpts } = $xeTable.getComputeMaps();
|
|
6068
|
+
const { computeSize, computeCustomOpts, computeMouseOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts, computeAggregateOpts } = $xeTable.getComputeMaps();
|
|
6055
6069
|
const refElem = ref();
|
|
6056
6070
|
const refBodyWrapperElem = ref();
|
|
6057
6071
|
const refCustomBodyElem = ref();
|
|
@@ -6357,6 +6371,7 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6357
6371
|
const { customColumnList } = tableReactData;
|
|
6358
6372
|
const { collectColumn } = tableInternalData;
|
|
6359
6373
|
const customOpts = computeCustomOpts.value;
|
|
6374
|
+
const mouseOpts = computeMouseOpts.value;
|
|
6360
6375
|
const { immediate } = customOpts;
|
|
6361
6376
|
const trEl = evnt.currentTarget;
|
|
6362
6377
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
@@ -6498,7 +6513,7 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6498
6513
|
nafIndex = XEUtils.findIndexOf(customColumnList, item => item.id === newColumn.id);
|
|
6499
6514
|
customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
|
|
6500
6515
|
}
|
|
6501
|
-
if (mouseConfig) {
|
|
6516
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
6502
6517
|
if ($xeTable.clearSelected) {
|
|
6503
6518
|
$xeTable.clearSelected();
|
|
6504
6519
|
}
|
|
@@ -9097,7 +9112,7 @@ hooks$7.add('tableFilterModule', {
|
|
|
9097
9112
|
$xeTable.handleTableData(true);
|
|
9098
9113
|
$xeTable.checkSelectionStatus();
|
|
9099
9114
|
}
|
|
9100
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleFilterEvent) {
|
|
9115
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleFilterEvent) {
|
|
9101
9116
|
$xeTable.handleFilterEvent(evnt, params);
|
|
9102
9117
|
}
|
|
9103
9118
|
if (evnt) {
|
|
@@ -9573,7 +9588,7 @@ hooks$6.add('tableMenuModule', {
|
|
|
9573
9588
|
const type = 'body';
|
|
9574
9589
|
const params = { source: 'table', type, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, keyboard: true, columns: visibleColumn.slice(0), $event: evnt };
|
|
9575
9590
|
// 如果开启单元格区域
|
|
9576
|
-
if (mouseConfig && mouseOpts.area) {
|
|
9591
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area) {
|
|
9577
9592
|
const activeArea = $xeTable.getActiveCellArea();
|
|
9578
9593
|
if (activeArea && activeArea.row && activeArea.column) {
|
|
9579
9594
|
params.row = activeArea.row;
|
|
@@ -9582,7 +9597,7 @@ hooks$6.add('tableMenuModule', {
|
|
|
9582
9597
|
return;
|
|
9583
9598
|
}
|
|
9584
9599
|
}
|
|
9585
|
-
else if (mouseConfig && mouseOpts.selected) {
|
|
9600
|
+
else if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
|
|
9586
9601
|
// 如果启用键盘导航且已选中单元格
|
|
9587
9602
|
if (selected.row && selected.column) {
|
|
9588
9603
|
params.row = selected.row;
|
|
@@ -10099,6 +10114,7 @@ hooks$5.add('tableEditModule', {
|
|
|
10099
10114
|
const { editConfig, mouseConfig } = props;
|
|
10100
10115
|
const { editStore, tableColumn } = reactData;
|
|
10101
10116
|
const editOpts = computeEditOpts.value;
|
|
10117
|
+
const mouseOpts = computeMouseOpts.value;
|
|
10102
10118
|
const { mode } = editOpts;
|
|
10103
10119
|
const { actived, focused } = editStore;
|
|
10104
10120
|
const { row, column } = params;
|
|
@@ -10114,7 +10130,7 @@ hooks$5.add('tableEditModule', {
|
|
|
10114
10130
|
// 判断是否禁用编辑
|
|
10115
10131
|
let type = 'edit-disabled';
|
|
10116
10132
|
if (!beforeEditMethod || beforeEditMethod(Object.assign(Object.assign({}, editParams), { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }))) {
|
|
10117
|
-
if (mouseConfig) {
|
|
10133
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
10118
10134
|
$xeTable.clearSelected();
|
|
10119
10135
|
if ($xeTable.clearCellAreas) {
|
|
10120
10136
|
$xeTable.clearCellAreas();
|
|
@@ -10172,7 +10188,7 @@ hooks$5.add('tableEditModule', {
|
|
|
10172
10188
|
}
|
|
10173
10189
|
else {
|
|
10174
10190
|
const { column: oldColumn } = actived;
|
|
10175
|
-
if (mouseConfig) {
|
|
10191
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
10176
10192
|
$xeTable.clearSelected();
|
|
10177
10193
|
if ($xeTable.clearCellAreas) {
|
|
10178
10194
|
$xeTable.clearCellAreas();
|
|
@@ -10755,7 +10771,7 @@ hooks$5.add('tableEditModule', {
|
|
|
10755
10771
|
const editOpts = computeEditOpts.value;
|
|
10756
10772
|
const { actived, selected } = editStore;
|
|
10757
10773
|
const { row, column } = params;
|
|
10758
|
-
const isMouseSelected = mouseConfig && mouseOpts.selected;
|
|
10774
|
+
const isMouseSelected = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected;
|
|
10759
10775
|
const selectMethod = () => {
|
|
10760
10776
|
if (isMouseSelected && (selected.row !== row || selected.column !== column)) {
|
|
10761
10777
|
if (actived.row !== row || (editOpts.mode === 'cell' ? actived.column !== column : false)) {
|
|
@@ -12752,7 +12768,7 @@ hooks$4.add('tableExportModule', {
|
|
|
12752
12768
|
}
|
|
12753
12769
|
return;
|
|
12754
12770
|
}
|
|
12755
|
-
if (!importConfig) {
|
|
12771
|
+
if (!hasEnableConf(importConfig, importOpts)) {
|
|
12756
12772
|
errLog$5('vxe.error.reqProp', ['import-config']);
|
|
12757
12773
|
}
|
|
12758
12774
|
// 处理类型
|
|
@@ -12790,23 +12806,25 @@ hooks$4.add('tableExportModule', {
|
|
|
12790
12806
|
},
|
|
12791
12807
|
closeExport: handleCloseExport,
|
|
12792
12808
|
openExport(options) {
|
|
12809
|
+
const { exportConfig } = props;
|
|
12793
12810
|
const exportOpts = computeExportOpts.value;
|
|
12794
12811
|
const defOpts = Object.assign({
|
|
12795
12812
|
message: true,
|
|
12796
12813
|
types: XEUtils.keys(exportOpts._typeMaps)
|
|
12797
12814
|
}, exportOpts, options);
|
|
12798
|
-
if (!
|
|
12815
|
+
if (!hasEnableConf(exportConfig, exportOpts)) {
|
|
12799
12816
|
errLog$5('vxe.error.reqProp', ['export-config']);
|
|
12800
12817
|
}
|
|
12801
12818
|
return handleExportAndPrint(defOpts);
|
|
12802
12819
|
},
|
|
12803
12820
|
closePrint: handleCloseExport,
|
|
12804
12821
|
openPrint(options) {
|
|
12822
|
+
const { printConfig } = props;
|
|
12805
12823
|
const printOpts = computePrintOpts.value;
|
|
12806
12824
|
const defOpts = Object.assign({
|
|
12807
12825
|
message: true
|
|
12808
12826
|
}, printOpts, options);
|
|
12809
|
-
if (!
|
|
12827
|
+
if (!hasEnableConf(printConfig, printOpts)) {
|
|
12810
12828
|
errLog$5('vxe.error.reqProp', ['print-config']);
|
|
12811
12829
|
}
|
|
12812
12830
|
return handleExportAndPrint(defOpts, true);
|
|
@@ -13070,14 +13088,14 @@ hooks$3.add('tableKeyboardModule', {
|
|
|
13070
13088
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
13071
13089
|
const mouseOpts = computeMouseOpts.value;
|
|
13072
13090
|
const editOpts = computeEditOpts.value;
|
|
13073
|
-
if (mouseConfig && mouseOpts.area && $xeTable.
|
|
13074
|
-
return $xeTable.
|
|
13091
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.triggerClAaMnEvent) {
|
|
13092
|
+
return $xeTable.triggerClAaMnEvent(evnt, params);
|
|
13075
13093
|
}
|
|
13076
13094
|
else {
|
|
13077
13095
|
if (checkboxConfig && checkboxOpts.range) {
|
|
13078
13096
|
handleCheckboxRangeEvent(evnt, params);
|
|
13079
13097
|
}
|
|
13080
|
-
if (mouseConfig && mouseOpts.selected) {
|
|
13098
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
|
|
13081
13099
|
if (!editConfig || editOpts.mode === 'cell') {
|
|
13082
13100
|
$xeTable.handleSelected(params, evnt);
|
|
13083
13101
|
}
|
|
@@ -15188,9 +15206,11 @@ function getNativeInputRenderCellVNs(cellValue, labelVNs, renderOpts, renderPara
|
|
|
15188
15206
|
const { name } = renderOpts;
|
|
15189
15207
|
const tableProps = $table.props;
|
|
15190
15208
|
const { editConfig, mouseConfig } = tableProps;
|
|
15209
|
+
const { computeMouseOpts } = $table.getComputeMaps();
|
|
15210
|
+
const mouseOpts = computeMouseOpts.value;
|
|
15191
15211
|
let isColSelected = false;
|
|
15192
15212
|
let isActiveCellArea = false;
|
|
15193
|
-
if (editConfig && mouseConfig) {
|
|
15213
|
+
if (editConfig && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
15194
15214
|
const tableReactData = $table.reactData;
|
|
15195
15215
|
const { editStore } = tableReactData;
|
|
15196
15216
|
const { selected } = editStore;
|
|
@@ -15212,12 +15232,13 @@ function getInputRenderCellVNs(cellValue, labelVNs, renderOpts, renderParams) {
|
|
|
15212
15232
|
const { $table, row, column } = renderParams;
|
|
15213
15233
|
const tableProps = $table.props;
|
|
15214
15234
|
const { editConfig, mouseConfig } = tableProps;
|
|
15235
|
+
const { computeEditOpts, computeMouseOpts } = $table.getComputeMaps();
|
|
15236
|
+
const mouseOpts = computeMouseOpts.value;
|
|
15215
15237
|
let isColSelected = false;
|
|
15216
15238
|
let isActiveCellArea = false;
|
|
15217
|
-
if (editConfig && mouseConfig) {
|
|
15239
|
+
if (editConfig && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
15218
15240
|
const tableReactData = $table.reactData;
|
|
15219
15241
|
const { editStore } = tableReactData;
|
|
15220
|
-
const { computeEditOpts } = $table.getComputeMaps();
|
|
15221
15242
|
const editOpts = computeEditOpts.value;
|
|
15222
15243
|
if (editOpts.isReuseKeep) {
|
|
15223
15244
|
const { selected } = editStore;
|
|
@@ -18629,7 +18650,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
18629
18650
|
if (currentRow) {
|
|
18630
18651
|
$xeTable.setCurrentRow(currentRow);
|
|
18631
18652
|
}
|
|
18632
|
-
if (mouseConfig && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
18653
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
18633
18654
|
$xeTable.addCellSelectedClass();
|
|
18634
18655
|
}
|
|
18635
18656
|
if ($xeGanttView && $xeGanttView.handleUpdateStyle) {
|
|
@@ -19633,12 +19654,13 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
19633
19654
|
* @param {Array} datas 数据
|
|
19634
19655
|
*/
|
|
19635
19656
|
const loadTableData = (datas, isReload, isReset) => {
|
|
19636
|
-
const { keepSource, treeConfig, rowGroupConfig, aggregateConfig } = props;
|
|
19657
|
+
const { keepSource, treeConfig, rowGroupConfig, aggregateConfig, mouseConfig } = props;
|
|
19637
19658
|
const { rowGroupList, scrollYLoad: oldScrollYLoad } = reactData;
|
|
19638
19659
|
const { initStatus, scrollYStore, scrollXStore, lastScrollLeft, lastScrollTop } = internalData;
|
|
19639
19660
|
const rowOpts = computeRowOpts.value;
|
|
19640
19661
|
const treeOpts = computeTreeOpts.value;
|
|
19641
19662
|
const expandOpts = computeExpandOpts.value;
|
|
19663
|
+
const mouseOpts = computeMouseOpts.value;
|
|
19642
19664
|
const { transform } = treeOpts;
|
|
19643
19665
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
19644
19666
|
let treeData = [];
|
|
@@ -19728,7 +19750,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
19728
19750
|
if (keepSource) {
|
|
19729
19751
|
$xeTable.cacheSourceMap(fullData);
|
|
19730
19752
|
}
|
|
19731
|
-
if ($xeTable.clearCellAreas &&
|
|
19753
|
+
if ($xeTable.clearCellAreas && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
19732
19754
|
$xeTable.clearCellAreas();
|
|
19733
19755
|
$xeTable.clearCopyCellArea();
|
|
19734
19756
|
}
|
|
@@ -22681,7 +22703,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
22681
22703
|
setCurrentColumn(fieldOrColumn) {
|
|
22682
22704
|
const { mouseConfig } = props;
|
|
22683
22705
|
const mouseOpts = computeMouseOpts.value;
|
|
22684
|
-
const isMouseSelected = mouseConfig && mouseOpts.selected;
|
|
22706
|
+
const isMouseSelected = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected;
|
|
22685
22707
|
const column = handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
22686
22708
|
if (column) {
|
|
22687
22709
|
$xeTable.clearCurrentColumn();
|
|
@@ -23928,7 +23950,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
23928
23950
|
updateCellAreas() {
|
|
23929
23951
|
const { mouseConfig } = props;
|
|
23930
23952
|
const mouseOpts = computeMouseOpts.value;
|
|
23931
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
23953
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
23932
23954
|
return $xeTable.handleRecalculateCellAreaEvent();
|
|
23933
23955
|
}
|
|
23934
23956
|
return nextTick();
|
|
@@ -24187,6 +24209,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24187
24209
|
const editOpts = computeEditOpts.value;
|
|
24188
24210
|
const validOpts = computeValidOpts.value;
|
|
24189
24211
|
const areaOpts = computeAreaOpts.value;
|
|
24212
|
+
const mouseOpts = computeMouseOpts.value;
|
|
24190
24213
|
const { actived } = editStore;
|
|
24191
24214
|
const $validTooltip = refValidTooltip.value;
|
|
24192
24215
|
const tableFilter = refTableFilter.value;
|
|
@@ -24273,7 +24296,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24273
24296
|
}
|
|
24274
24297
|
}
|
|
24275
24298
|
}
|
|
24276
|
-
else if (mouseConfig) {
|
|
24299
|
+
else if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
24277
24300
|
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
24301
|
if ($xeTable.clearSelected) {
|
|
24279
24302
|
$xeTable.clearSelected();
|
|
@@ -24360,7 +24383,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24360
24383
|
if (isEsc) {
|
|
24361
24384
|
$xeTable.preventEvent(evnt, 'event.keydown', null, () => {
|
|
24362
24385
|
dispatchEvent('keydown-start', {}, evnt);
|
|
24363
|
-
if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
24386
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
24364
24387
|
$xeTable.handleKdClAreaEvent(evnt);
|
|
24365
24388
|
}
|
|
24366
24389
|
else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
|
|
@@ -24370,7 +24393,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24370
24393
|
$xeTable.closeMenu();
|
|
24371
24394
|
}
|
|
24372
24395
|
$xeTable.closeFilter();
|
|
24373
|
-
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
24396
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEsc) {
|
|
24374
24397
|
// 如果是激活编辑状态,则取消编辑
|
|
24375
24398
|
if (actived.row) {
|
|
24376
24399
|
const params = actived.args;
|
|
@@ -24447,7 +24470,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24447
24470
|
$xeTable.moveCtxMenu(evnt, ctxMenuStore, 'selected', isRightArrow, true, menuList);
|
|
24448
24471
|
}
|
|
24449
24472
|
}
|
|
24450
|
-
else if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
24473
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
24451
24474
|
$xeTable.handleKdClAreaEvent(evnt);
|
|
24452
24475
|
}
|
|
24453
24476
|
else if (isEsc) {
|
|
@@ -24456,7 +24479,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24456
24479
|
$xeTable.closeMenu();
|
|
24457
24480
|
}
|
|
24458
24481
|
$xeTable.closeFilter();
|
|
24459
|
-
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
24482
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEsc) {
|
|
24460
24483
|
// 如果是激活编辑状态,则取消编辑
|
|
24461
24484
|
if (actived.row) {
|
|
24462
24485
|
const params = actived.args;
|
|
@@ -24468,7 +24491,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24468
24491
|
}
|
|
24469
24492
|
}
|
|
24470
24493
|
}
|
|
24471
|
-
else if (isSpacebar && keyboardConfig && keyboardOpts.isChecked && selectRow && selectColumn && (selectColumn.type === 'checkbox' || selectColumn.type === 'radio')) {
|
|
24494
|
+
else if (isSpacebar && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isChecked && selectRow && selectColumn && (selectColumn.type === 'checkbox' || selectColumn.type === 'radio')) {
|
|
24472
24495
|
// 空格键支持选中复选框
|
|
24473
24496
|
evnt.preventDefault();
|
|
24474
24497
|
if (selectColumn.type === 'checkbox') {
|
|
@@ -24495,7 +24518,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24495
24518
|
internalData._keyCtx = false;
|
|
24496
24519
|
}, 1000);
|
|
24497
24520
|
}
|
|
24498
|
-
else if (isEnter && !isAltKey && keyboardConfig && keyboardOpts.isEnter && (selectRow || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
24521
|
+
else if (isEnter && !isAltKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEnter && (selectRow || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
24499
24522
|
// 退出选中
|
|
24500
24523
|
if (isControlKey) {
|
|
24501
24524
|
// 如果是激活编辑状态,则取消编辑
|
|
@@ -24623,7 +24646,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24623
24646
|
}
|
|
24624
24647
|
}
|
|
24625
24648
|
}
|
|
24626
|
-
else if (operArrow && keyboardConfig && keyboardOpts.isArrow) {
|
|
24649
|
+
else if (operArrow && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow) {
|
|
24627
24650
|
if (!isEditStatus) {
|
|
24628
24651
|
// 如果按下了方向键
|
|
24629
24652
|
if (mouseOpts.selected && selectRow && selectColumn) {
|
|
@@ -24641,7 +24664,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24641
24664
|
}
|
|
24642
24665
|
}
|
|
24643
24666
|
}
|
|
24644
|
-
else if (isTab && keyboardConfig && keyboardOpts.isTab) {
|
|
24667
|
+
else if (isTab && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isTab) {
|
|
24645
24668
|
// 如果按下了 Tab 键切换
|
|
24646
24669
|
if (selectRow || actived.row) {
|
|
24647
24670
|
const activeRow = selectRow || actived.row;
|
|
@@ -24691,7 +24714,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24691
24714
|
}
|
|
24692
24715
|
}
|
|
24693
24716
|
}
|
|
24694
|
-
else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
24717
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
24695
24718
|
// 如果是删除键
|
|
24696
24719
|
if (!isEditStatus) {
|
|
24697
24720
|
const { delMethod } = keyboardOpts;
|
|
@@ -24722,7 +24745,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24722
24745
|
}
|
|
24723
24746
|
}
|
|
24724
24747
|
}
|
|
24725
|
-
else if (hasBackspaceKey && keyboardConfig && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
24748
|
+
else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
24726
24749
|
if (!isEditStatus) {
|
|
24727
24750
|
const { backMethod } = keyboardOpts;
|
|
24728
24751
|
// 如果是删除键
|
|
@@ -24755,7 +24778,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24755
24778
|
}
|
|
24756
24779
|
}
|
|
24757
24780
|
}
|
|
24758
|
-
else if (hasBackspaceKey && keyboardConfig && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
24781
|
+
else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
24759
24782
|
// 如果树形表格回退键关闭当前行返回父节点
|
|
24760
24783
|
const { parent: parentRow } = XEUtils.findTree(internalData.afterTreeFullData, item => item === currentRow, { children: childrenField });
|
|
24761
24784
|
if (parentRow) {
|
|
@@ -24773,7 +24796,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24773
24796
|
.then(() => $xeTable.triggerCurrentRowEvent(evnt, params));
|
|
24774
24797
|
}
|
|
24775
24798
|
}
|
|
24776
|
-
else if (keyboardConfig && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasAxternalInputTarget(evnt.target)) {
|
|
24799
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasAxternalInputTarget(evnt.target)) {
|
|
24777
24800
|
if (evnt.target) {
|
|
24778
24801
|
if (isY || (hasShiftKey && isZ)) {
|
|
24779
24802
|
// 恢复被撤销的操作:Ctrl + Y 或 Ctrl + Shift + Z
|
|
@@ -24787,7 +24810,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24787
24810
|
}
|
|
24788
24811
|
}
|
|
24789
24812
|
}
|
|
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))) {
|
|
24813
|
+
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
24814
|
const { editMode, editMethod } = keyboardOpts;
|
|
24792
24815
|
// 启用编辑后,空格键功能将失效
|
|
24793
24816
|
// if (isSpacebar) {
|
|
@@ -24839,7 +24862,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24839
24862
|
const { actived } = editStore;
|
|
24840
24863
|
if (isActivated && !filterStore.visible) {
|
|
24841
24864
|
if (!(actived.row || actived.column)) {
|
|
24842
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handlePeClAreaEvent) {
|
|
24865
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handlePeClAreaEvent) {
|
|
24843
24866
|
$xeTable.handlePeClAreaEvent(evnt);
|
|
24844
24867
|
}
|
|
24845
24868
|
}
|
|
@@ -24855,7 +24878,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24855
24878
|
const { actived } = editStore;
|
|
24856
24879
|
if (isActivated && !filterStore.visible) {
|
|
24857
24880
|
if (!(actived.row || actived.column)) {
|
|
24858
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handleCyClAreaEvent) {
|
|
24881
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleCyClAreaEvent) {
|
|
24859
24882
|
$xeTable.handleCyClAreaEvent(evnt);
|
|
24860
24883
|
}
|
|
24861
24884
|
}
|
|
@@ -24871,7 +24894,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24871
24894
|
const { actived } = editStore;
|
|
24872
24895
|
if (isActivated && !filterStore.visible) {
|
|
24873
24896
|
if (!(actived.row || actived.column)) {
|
|
24874
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handleCutCellAreaEvent) {
|
|
24897
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleCutCellAreaEvent) {
|
|
24875
24898
|
$xeTable.handleCutCellAreaEvent(evnt);
|
|
24876
24899
|
}
|
|
24877
24900
|
}
|
|
@@ -25378,11 +25401,24 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
25378
25401
|
*/
|
|
25379
25402
|
getParentElem() {
|
|
25380
25403
|
const el = refElem.value;
|
|
25381
|
-
if (
|
|
25382
|
-
|
|
25383
|
-
return gridEl ? gridEl.parentNode : null;
|
|
25404
|
+
if (!el) {
|
|
25405
|
+
return null;
|
|
25384
25406
|
}
|
|
25385
|
-
|
|
25407
|
+
const parentEl = el.parentElement;
|
|
25408
|
+
if (!parentEl) {
|
|
25409
|
+
return null;
|
|
25410
|
+
}
|
|
25411
|
+
if ($xeGantt && hasClass(parentEl, 'vxe-gantt--table-wrapper')) {
|
|
25412
|
+
return $xeGantt.getParentElem();
|
|
25413
|
+
}
|
|
25414
|
+
else if ($xeGrid && hasClass(parentEl, 'vxe-grid--table-wrapper')) {
|
|
25415
|
+
return $xeGrid.getParentElem();
|
|
25416
|
+
}
|
|
25417
|
+
// 如果是虚拟滚动条
|
|
25418
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
25419
|
+
return parentEl.parentElement;
|
|
25420
|
+
}
|
|
25421
|
+
return parentEl;
|
|
25386
25422
|
},
|
|
25387
25423
|
/**
|
|
25388
25424
|
* 获取父容器的高度
|
|
@@ -25390,25 +25426,32 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
25390
25426
|
getParentHeight() {
|
|
25391
25427
|
const { height } = props;
|
|
25392
25428
|
const el = refElem.value;
|
|
25393
|
-
if (el) {
|
|
25394
|
-
|
|
25395
|
-
|
|
25396
|
-
|
|
25397
|
-
|
|
25398
|
-
|
|
25399
|
-
|
|
25400
|
-
|
|
25401
|
-
|
|
25402
|
-
|
|
25403
|
-
|
|
25404
|
-
|
|
25405
|
-
|
|
25406
|
-
|
|
25407
|
-
|
|
25429
|
+
if (!el) {
|
|
25430
|
+
return 0;
|
|
25431
|
+
}
|
|
25432
|
+
let parentEl = el.parentElement;
|
|
25433
|
+
let parentPaddingSize = 0;
|
|
25434
|
+
let parentWrapperHeight = 0;
|
|
25435
|
+
if (!parentEl) {
|
|
25436
|
+
return 0;
|
|
25437
|
+
}
|
|
25438
|
+
if ($xeGantt && hasClass(parentEl, 'vxe-gantt--table-wrapper')) {
|
|
25439
|
+
parentWrapperHeight = $xeGantt.getParentHeight();
|
|
25440
|
+
}
|
|
25441
|
+
else if ($xeGrid && hasClass(parentEl, 'vxe-grid--table-wrapper')) {
|
|
25442
|
+
parentWrapperHeight = $xeGrid.getParentHeight();
|
|
25443
|
+
}
|
|
25444
|
+
else {
|
|
25445
|
+
// 如果是虚拟滚动条
|
|
25446
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
25447
|
+
parentEl = parentEl.parentElement;
|
|
25448
|
+
}
|
|
25449
|
+
if (parentEl) {
|
|
25450
|
+
parentWrapperHeight = parentEl.clientHeight;
|
|
25451
|
+
parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentEl) : 0;
|
|
25408
25452
|
}
|
|
25409
|
-
return Math.floor(parentWrapperHeight - parentPaddingSize);
|
|
25410
25453
|
}
|
|
25411
|
-
return
|
|
25454
|
+
return Math.floor(parentWrapperHeight - parentPaddingSize);
|
|
25412
25455
|
},
|
|
25413
25456
|
/**
|
|
25414
25457
|
* 获取需要排除的高度
|
|
@@ -26075,7 +26118,8 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
26075
26118
|
*/
|
|
26076
26119
|
handleCustom() {
|
|
26077
26120
|
const { mouseConfig } = props;
|
|
26078
|
-
|
|
26121
|
+
const mouseOpts = computeMouseOpts.value;
|
|
26122
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
26079
26123
|
if ($xeTable.clearSelected) {
|
|
26080
26124
|
$xeTable.clearSelected();
|
|
26081
26125
|
}
|
|
@@ -27233,7 +27277,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
27233
27277
|
const { field, sortable, order } = column;
|
|
27234
27278
|
if (sortable) {
|
|
27235
27279
|
const params = { $table: $xeTable, $event: evnt, column, field, property: field, order, sortList: $xeTable.getSortColumns(), sortTime: column.sortTime };
|
|
27236
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleSortEvent) {
|
|
27280
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleSortEvent) {
|
|
27237
27281
|
$xeTable.handleSortEvent(evnt, params);
|
|
27238
27282
|
}
|
|
27239
27283
|
if (!order) {
|
|
@@ -27310,7 +27354,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
27310
27354
|
$xeTable.handleHeaderCellDragMousedownEvent(evnt, params);
|
|
27311
27355
|
}
|
|
27312
27356
|
}
|
|
27313
|
-
if (!triggerDrag && mouseConfig && mouseOpts.area && $xeTable.handleHeaderCellAreaMouseDnEvent) {
|
|
27357
|
+
if (!triggerDrag && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleHeaderCellAreaMouseDnEvent) {
|
|
27314
27358
|
$xeTable.handleHeaderCellAreaMouseDnEvent(evnt, Object.assign({ cell, triggerSort, triggerFilter }, params));
|
|
27315
27359
|
}
|
|
27316
27360
|
$xeTable.focus();
|
|
@@ -28049,6 +28093,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
28049
28093
|
handleColDragSwapEvent(evnt, isSyncColumn, dragCol, prevDragCol, prevDragPos, prevDragToChild) {
|
|
28050
28094
|
const { mouseConfig } = props;
|
|
28051
28095
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
28096
|
+
const mouseOpts = computeMouseOpts.value;
|
|
28052
28097
|
const { animation, isPeerDrag, isCrossDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod, dragToChildMethod } = columnDragOpts;
|
|
28053
28098
|
const { collectColumn, fullColumnIdData } = internalData;
|
|
28054
28099
|
const el = refElem.value;
|
|
@@ -28209,7 +28254,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
28209
28254
|
}
|
|
28210
28255
|
});
|
|
28211
28256
|
$xeTable.handleClearStack();
|
|
28212
|
-
if (mouseConfig) {
|
|
28257
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
28213
28258
|
if ($xeTable.clearSelected) {
|
|
28214
28259
|
$xeTable.clearSelected();
|
|
28215
28260
|
}
|
|
@@ -29719,7 +29764,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29719
29764
|
]);
|
|
29720
29765
|
};
|
|
29721
29766
|
const renderVN = () => {
|
|
29722
|
-
const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props;
|
|
29767
|
+
const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules, importConfig, exportConfig, printConfig } = props;
|
|
29723
29768
|
const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore, tooltipStore } = reactData;
|
|
29724
29769
|
const { teleportToWrapperElem, popupToWrapperElem, customPopupToElem } = internalData;
|
|
29725
29770
|
const { leftList, rightList } = columnStore;
|
|
@@ -29747,10 +29792,13 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29747
29792
|
const isContentMenu = computeIsContentMenu.value;
|
|
29748
29793
|
const currLoading = reactData.isColLoading || reactData.isRowLoading || loading;
|
|
29749
29794
|
const resizableOpts = computeResizableOpts.value;
|
|
29750
|
-
const isArea = mouseConfig && mouseOpts.area;
|
|
29795
|
+
const isArea = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area;
|
|
29751
29796
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
29752
29797
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
29753
29798
|
const scrollbarYToLeft = computeScrollbarYToLeft.value;
|
|
29799
|
+
const exportOpts = computeExportOpts.value;
|
|
29800
|
+
const importOpts = computeImportOpts.value;
|
|
29801
|
+
const printOpts = computePrintOpts.value;
|
|
29754
29802
|
const { isCrossTableDrag } = rowDragOpts;
|
|
29755
29803
|
const tbOns = {
|
|
29756
29804
|
onKeydown: keydownEvent,
|
|
@@ -29765,7 +29813,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29765
29813
|
'vxe-editable': !!editConfig,
|
|
29766
29814
|
'old-cell-valid': editRules && getConfig$2().cellVaildMode === 'obsolete',
|
|
29767
29815
|
'cell--highlight': highlightCell,
|
|
29768
|
-
'cell--selected': mouseConfig && mouseOpts.selected,
|
|
29816
|
+
'cell--selected': hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected,
|
|
29769
29817
|
'cell--area': isArea,
|
|
29770
29818
|
'header-cell--area': isArea && areaOpts.selectCellByHeader,
|
|
29771
29819
|
'body-cell--area': isArea && areaOpts.selectCellByBody,
|
|
@@ -29975,7 +30023,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29975
30023
|
/**
|
|
29976
30024
|
* 导入
|
|
29977
30025
|
*/
|
|
29978
|
-
initStore.import &&
|
|
30026
|
+
initStore.import && hasEnableConf(importConfig, importOpts)
|
|
29979
30027
|
? h(TableImportPanelComponent, {
|
|
29980
30028
|
key: 'it',
|
|
29981
30029
|
defaultOptions: reactData.importParams,
|
|
@@ -29985,7 +30033,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
29985
30033
|
/**
|
|
29986
30034
|
* 导出
|
|
29987
30035
|
*/
|
|
29988
|
-
initStore.export && (
|
|
30036
|
+
initStore.export && (hasEnableConf(exportConfig, exportOpts) || hasEnableConf(printConfig, printOpts))
|
|
29989
30037
|
? h(TableExportPanelComponent, {
|
|
29990
30038
|
key: 'et',
|
|
29991
30039
|
defaultOptions: reactData.exportParams,
|
|
@@ -30327,7 +30375,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30327
30375
|
$xeTable.preventEvent(null, 'deactivated', { $table: $xeTable });
|
|
30328
30376
|
});
|
|
30329
30377
|
onMounted(() => {
|
|
30330
|
-
const { editConfig, exportConfig, importConfig, treeConfig, minHeight, keepSource } = props;
|
|
30378
|
+
const { editConfig, exportConfig, importConfig, treeConfig, minHeight, keepSource, areaConfig } = props;
|
|
30331
30379
|
const { scrollXStore, scrollYStore } = internalData;
|
|
30332
30380
|
const columnOpts = computeColumnOpts.value;
|
|
30333
30381
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
@@ -30441,13 +30489,13 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30441
30489
|
// warnLog('vxe.error.delProp', ['scroll-x', 'virtual-x-config'])
|
|
30442
30490
|
// }
|
|
30443
30491
|
// 检查导入导出类型,如果自定义导入导出方法,则不校验类型
|
|
30444
|
-
if (importConfig && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
30492
|
+
if (hasEnableConf(importConfig, importOpts) && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
30445
30493
|
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
30494
|
}
|
|
30447
|
-
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
30495
|
+
if (hasEnableConf(exportConfig, exportOpts) && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
30448
30496
|
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
30497
|
}
|
|
30450
|
-
if (exportConfig && XEUtils.isBoolean(exportOpts.isAllExpand)) {
|
|
30498
|
+
if (hasEnableConf(exportConfig, exportOpts) && XEUtils.isBoolean(exportOpts.isAllExpand)) {
|
|
30451
30499
|
warnLog$2('vxe.error.delProp', ['isAllExpand', 'isTreeAllExpanded']);
|
|
30452
30500
|
}
|
|
30453
30501
|
if (!props.id) {
|
|
@@ -30461,8 +30509,8 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30461
30509
|
if (rowOpts.height && !props.showOverflow) {
|
|
30462
30510
|
warnLog$2('vxe.error.notProp', ['table.show-overflow']);
|
|
30463
30511
|
}
|
|
30464
|
-
if (!$xeTable.
|
|
30465
|
-
if (
|
|
30512
|
+
if (!$xeTable.triggerClAaMnEvent) {
|
|
30513
|
+
if (hasEnableConf(areaConfig, areaOpts)) {
|
|
30466
30514
|
warnLog$2('vxe.error.notProp', ['area-config']);
|
|
30467
30515
|
}
|
|
30468
30516
|
if (props.clipConfig) {
|
|
@@ -30548,10 +30596,10 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30548
30596
|
if (columnOpts.currentMethod) {
|
|
30549
30597
|
warnLog$2('vxe.error.delProp', ['row-config.currentMethod', 'current-column-config.beforeSelectMethod']);
|
|
30550
30598
|
}
|
|
30551
|
-
// if ((rowOpts.isCurrent || highlightCurrentRow) &&
|
|
30599
|
+
// if ((rowOpts.isCurrent || highlightCurrentRow) && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow && !XEUtils.isBoolean(currentRowOpts.isFollowSelected)) {
|
|
30552
30600
|
// warnLog('vxe.error.notConflictProp', ['row-config.isCurrent & keyboard-config.isArrow', 'current-row-config.isFollowSelected'])
|
|
30553
30601
|
// }
|
|
30554
|
-
// if ((columnOpts.isCurrent || highlightCurrentColumn) &&
|
|
30602
|
+
// if ((columnOpts.isCurrent || highlightCurrentColumn) && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow && !XEUtils.isBoolean(currentColumnOpts.isFollowSelected)) {
|
|
30555
30603
|
// warnLog('vxe.error.notConflictProp', ['column-config.isCurrent & keyboard-config.isArrow', 'current-column-config.isFollowSelected'])
|
|
30556
30604
|
// }
|
|
30557
30605
|
// 如果不支持虚拟滚动
|
|
@@ -30575,10 +30623,10 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30575
30623
|
// if (props.editRules && !$xeTable.validate) {
|
|
30576
30624
|
// errLog('vxe.error.reqModule', ['Validator'])
|
|
30577
30625
|
// }
|
|
30578
|
-
// if ((checkboxOpts.range ||
|
|
30626
|
+
// if ((checkboxOpts.range || hasEnableConf(keyboardConfig, keyboardOpts) || hasEnableConf(mouseConfig, mouseOpts)) && !$xeTable.handleCellMousedownEvent) {
|
|
30579
30627
|
// errLog('vxe.error.reqModule', ['Keyboard'])
|
|
30580
30628
|
// }
|
|
30581
|
-
// if ((
|
|
30629
|
+
// if (hasEnableConf(printConfig, printOpts) || hasEnableConf(importConfig, importOpts) || hasEnableConf(exportConfig, exportOpts)) && !$xeTable.exportData) {
|
|
30582
30630
|
// errLog('vxe.error.reqModule', ['Export'])
|
|
30583
30631
|
// }
|
|
30584
30632
|
Object.assign(scrollYStore, {
|
|
@@ -30599,7 +30647,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30599
30647
|
const parentEl = $xeTable.getParentElem();
|
|
30600
30648
|
resizeObserver = globalResize.create(() => {
|
|
30601
30649
|
if (props.autoResize) {
|
|
30602
|
-
|
|
30650
|
+
layoutReFlag.value++;
|
|
30603
30651
|
}
|
|
30604
30652
|
});
|
|
30605
30653
|
if (el) {
|
|
@@ -30717,6 +30765,54 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
30717
30765
|
}
|
|
30718
30766
|
});
|
|
30719
30767
|
|
|
30768
|
+
function useCellView(props) {
|
|
30769
|
+
const currColumn = computed(() => {
|
|
30770
|
+
const { renderParams } = props;
|
|
30771
|
+
return renderParams.column;
|
|
30772
|
+
});
|
|
30773
|
+
const currRow = computed(() => {
|
|
30774
|
+
const { renderParams } = props;
|
|
30775
|
+
return renderParams.row;
|
|
30776
|
+
});
|
|
30777
|
+
const cellOptions = computed(() => {
|
|
30778
|
+
const { renderOpts } = props;
|
|
30779
|
+
return renderOpts.props || {};
|
|
30780
|
+
});
|
|
30781
|
+
const cellModel = computed({
|
|
30782
|
+
get() {
|
|
30783
|
+
const { renderParams } = props;
|
|
30784
|
+
const { row, column } = renderParams;
|
|
30785
|
+
return XEUtils.get(row, column.field);
|
|
30786
|
+
},
|
|
30787
|
+
set(value) {
|
|
30788
|
+
const { renderParams } = props;
|
|
30789
|
+
const { row, column } = renderParams;
|
|
30790
|
+
return XEUtils.set(row, column.field, value);
|
|
30791
|
+
}
|
|
30792
|
+
});
|
|
30793
|
+
return {
|
|
30794
|
+
currColumn,
|
|
30795
|
+
currRow,
|
|
30796
|
+
cellModel,
|
|
30797
|
+
cellOptions
|
|
30798
|
+
};
|
|
30799
|
+
}
|
|
30800
|
+
|
|
30801
|
+
const VxeTable = Object.assign({}, VxeTableComponent, {
|
|
30802
|
+
install(app) {
|
|
30803
|
+
app.component(VxeTableComponent.name, VxeTableComponent);
|
|
30804
|
+
}
|
|
30805
|
+
});
|
|
30806
|
+
const tableHandle = {
|
|
30807
|
+
useCellView
|
|
30808
|
+
};
|
|
30809
|
+
if (VxeUI.dynamicApp) {
|
|
30810
|
+
VxeUI.dynamicApp.component(VxeTableComponent.name, VxeTableComponent);
|
|
30811
|
+
}
|
|
30812
|
+
VxeUI.component(VxeTableComponent);
|
|
30813
|
+
VxeUI.tableHandle = tableHandle;
|
|
30814
|
+
const Table = VxeTable;
|
|
30815
|
+
|
|
30720
30816
|
const { warnLog: warnLog$1, errLog: errLog$1 } = createComponentLog('toolbar');
|
|
30721
30817
|
const { getConfig: getConfig$1, getIcon, getI18n: getI18n$1, renderer, commands: commands$1, createEvent: createEvent$1, useFns: useFns$1 } = VxeUI;
|
|
30722
30818
|
function createReactData$1() {
|
|
@@ -31335,6 +31431,17 @@ var VxeToolbarComponent = defineVxeComponent({
|
|
|
31335
31431
|
}
|
|
31336
31432
|
});
|
|
31337
31433
|
|
|
31434
|
+
const VxeToolbar = Object.assign({}, VxeToolbarComponent, {
|
|
31435
|
+
install(app) {
|
|
31436
|
+
app.component(VxeToolbarComponent.name, VxeToolbarComponent);
|
|
31437
|
+
}
|
|
31438
|
+
});
|
|
31439
|
+
if (VxeUI.dynamicApp) {
|
|
31440
|
+
VxeUI.dynamicApp.component(VxeToolbarComponent.name, VxeToolbarComponent);
|
|
31441
|
+
}
|
|
31442
|
+
VxeUI.component(VxeToolbarComponent);
|
|
31443
|
+
const Toolbar = VxeToolbar;
|
|
31444
|
+
|
|
31338
31445
|
const { warnLog, errLog } = createComponentLog('grid');
|
|
31339
31446
|
const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = VxeUI;
|
|
31340
31447
|
const tableComponentPropKeys = Object.keys(tableProps);
|
|
@@ -31423,6 +31530,10 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
31423
31530
|
const computePagerOpts = computed(() => {
|
|
31424
31531
|
return Object.assign({}, getConfig().grid.pagerConfig, props.pagerConfig);
|
|
31425
31532
|
});
|
|
31533
|
+
const computePagerProps = computed(() => {
|
|
31534
|
+
const pagerOpts = computePagerOpts.value;
|
|
31535
|
+
return Object.assign({}, pagerOpts, { enabled: undefined, slots: undefined });
|
|
31536
|
+
});
|
|
31426
31537
|
const computeFormOpts = computed(() => {
|
|
31427
31538
|
return Object.assign({}, getConfig().grid.formConfig, props.formConfig);
|
|
31428
31539
|
});
|
|
@@ -31931,7 +32042,7 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
31931
32042
|
toolbarSlots.toolSuffix = toolSuffixSlot;
|
|
31932
32043
|
}
|
|
31933
32044
|
}
|
|
31934
|
-
slotVNs.push(h(
|
|
32045
|
+
slotVNs.push(h(VxeToolbar, Object.assign(Object.assign({ ref: refToolbar }, toolbarOpts), { slots: undefined }), toolbarSlots));
|
|
31935
32046
|
}
|
|
31936
32047
|
return h('div', {
|
|
31937
32048
|
ref: refToolbarWrapper,
|
|
@@ -32023,7 +32134,7 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
32023
32134
|
return h('div', {
|
|
32024
32135
|
class: 'vxe-grid--table-wrapper'
|
|
32025
32136
|
}, [
|
|
32026
|
-
h(
|
|
32137
|
+
h(VxeTable, Object.assign(Object.assign({ ref: refTable }, tableProps), tableOns), slotObj)
|
|
32027
32138
|
]);
|
|
32028
32139
|
};
|
|
32029
32140
|
/**
|
|
@@ -32046,6 +32157,7 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
32046
32157
|
const { proxyConfig, pagerConfig } = props;
|
|
32047
32158
|
const proxyOpts = computeProxyOpts.value;
|
|
32048
32159
|
const pagerOpts = computePagerOpts.value;
|
|
32160
|
+
const pagerProps = computePagerProps.value;
|
|
32049
32161
|
const pagerSlot = slots.pager;
|
|
32050
32162
|
if ((pagerConfig && isEnableConf(pagerOpts)) || slots.pager) {
|
|
32051
32163
|
return h('div', {
|
|
@@ -32056,7 +32168,7 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
32056
32168
|
? pagerSlot({ $grid: $xeGrid, $gantt: null })
|
|
32057
32169
|
: [
|
|
32058
32170
|
VxeUIPagerComponent
|
|
32059
|
-
? h(VxeUIPagerComponent, Object.assign(Object.assign(Object.assign({ ref: refPager },
|
|
32171
|
+
? h(VxeUIPagerComponent, Object.assign(Object.assign(Object.assign({ ref: refPager }, pagerProps), (proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {})), { onPageChange: pageChangeEvent }), getConfigSlot(pagerOpts.slots))
|
|
32060
32172
|
: renderEmptyElement($xeGrid)
|
|
32061
32173
|
]);
|
|
32062
32174
|
}
|
|
@@ -32808,14 +32920,14 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
32808
32920
|
if ($form) {
|
|
32809
32921
|
return $form.validate();
|
|
32810
32922
|
}
|
|
32811
|
-
return
|
|
32923
|
+
return Promise.resolve();
|
|
32812
32924
|
},
|
|
32813
32925
|
validateFormField(field) {
|
|
32814
32926
|
const $form = refForm.value;
|
|
32815
32927
|
if ($form) {
|
|
32816
32928
|
return $form.validateField(field);
|
|
32817
32929
|
}
|
|
32818
|
-
return
|
|
32930
|
+
return Promise.resolve();
|
|
32819
32931
|
},
|
|
32820
32932
|
clearFormValidate(field) {
|
|
32821
32933
|
const $form = refForm.value;
|
|
@@ -32959,10 +33071,22 @@ var VxeGridComponent = defineVxeComponent({
|
|
|
32959
33071
|
}
|
|
32960
33072
|
return 0;
|
|
32961
33073
|
},
|
|
33074
|
+
getParentElem() {
|
|
33075
|
+
const el = refElem.value;
|
|
33076
|
+
if (!el) {
|
|
33077
|
+
return null;
|
|
33078
|
+
}
|
|
33079
|
+
let parentEl = el.parentElement;
|
|
33080
|
+
// 如果是虚拟滚动条
|
|
33081
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
33082
|
+
parentEl = parentEl.parentElement;
|
|
33083
|
+
}
|
|
33084
|
+
return parentEl;
|
|
33085
|
+
},
|
|
32962
33086
|
getParentHeight() {
|
|
32963
33087
|
const el = refElem.value;
|
|
32964
33088
|
if (el) {
|
|
32965
|
-
const parentEl =
|
|
33089
|
+
const parentEl = $xeGrid.getParentElem();
|
|
32966
33090
|
return (reactData.isZMax ? getDomNode().visibleHeight : (parentEl ? XEUtils.toNumber(getComputedStyle(parentEl).height) : 0)) - gridPrivateMethods.getExcludeHeight();
|
|
32967
33091
|
}
|
|
32968
33092
|
return 0;
|
|
@@ -33132,65 +33256,6 @@ if (VxeUI.dynamicApp) {
|
|
|
33132
33256
|
VxeUI.component(VxeGridComponent);
|
|
33133
33257
|
const Grid = VxeGrid;
|
|
33134
33258
|
|
|
33135
|
-
function useCellView(props) {
|
|
33136
|
-
const currColumn = computed(() => {
|
|
33137
|
-
const { renderParams } = props;
|
|
33138
|
-
return renderParams.column;
|
|
33139
|
-
});
|
|
33140
|
-
const currRow = computed(() => {
|
|
33141
|
-
const { renderParams } = props;
|
|
33142
|
-
return renderParams.row;
|
|
33143
|
-
});
|
|
33144
|
-
const cellOptions = computed(() => {
|
|
33145
|
-
const { renderOpts } = props;
|
|
33146
|
-
return renderOpts.props || {};
|
|
33147
|
-
});
|
|
33148
|
-
const cellModel = computed({
|
|
33149
|
-
get() {
|
|
33150
|
-
const { renderParams } = props;
|
|
33151
|
-
const { row, column } = renderParams;
|
|
33152
|
-
return XEUtils.get(row, column.field);
|
|
33153
|
-
},
|
|
33154
|
-
set(value) {
|
|
33155
|
-
const { renderParams } = props;
|
|
33156
|
-
const { row, column } = renderParams;
|
|
33157
|
-
return XEUtils.set(row, column.field, value);
|
|
33158
|
-
}
|
|
33159
|
-
});
|
|
33160
|
-
return {
|
|
33161
|
-
currColumn,
|
|
33162
|
-
currRow,
|
|
33163
|
-
cellModel,
|
|
33164
|
-
cellOptions
|
|
33165
|
-
};
|
|
33166
|
-
}
|
|
33167
|
-
|
|
33168
|
-
const VxeTable = Object.assign({}, VxeTableComponent, {
|
|
33169
|
-
install(app) {
|
|
33170
|
-
app.component(VxeTableComponent.name, VxeTableComponent);
|
|
33171
|
-
}
|
|
33172
|
-
});
|
|
33173
|
-
const tableHandle = {
|
|
33174
|
-
useCellView
|
|
33175
|
-
};
|
|
33176
|
-
if (VxeUI.dynamicApp) {
|
|
33177
|
-
VxeUI.dynamicApp.component(VxeTableComponent.name, VxeTableComponent);
|
|
33178
|
-
}
|
|
33179
|
-
VxeUI.component(VxeTableComponent);
|
|
33180
|
-
VxeUI.tableHandle = tableHandle;
|
|
33181
|
-
const Table = VxeTable;
|
|
33182
|
-
|
|
33183
|
-
const VxeToolbar = Object.assign({}, VxeToolbarComponent, {
|
|
33184
|
-
install(app) {
|
|
33185
|
-
app.component(VxeToolbarComponent.name, VxeToolbarComponent);
|
|
33186
|
-
}
|
|
33187
|
-
});
|
|
33188
|
-
if (VxeUI.dynamicApp) {
|
|
33189
|
-
VxeUI.dynamicApp.component(VxeToolbarComponent.name, VxeToolbarComponent);
|
|
33190
|
-
}
|
|
33191
|
-
VxeUI.component(VxeToolbarComponent);
|
|
33192
|
-
const Toolbar = VxeToolbar;
|
|
33193
|
-
|
|
33194
33259
|
var zhCN = {
|
|
33195
33260
|
vxe: {
|
|
33196
33261
|
base: {
|