vxe-table 4.16.0-beta.0 → 4.16.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/grid/src/grid.js +1 -0
- package/es/style.css +1 -1
- package/es/table/module/custom/hook.js +2 -1
- package/es/table/module/custom/panel.js +4 -0
- package/es/table/module/edit/hook.js +3 -2
- package/es/table/module/export/export-panel.js +3 -0
- package/es/table/module/export/hook.js +45 -24
- package/es/table/module/export/import-panel.js +3 -0
- package/es/table/module/menu/hook.js +2 -1
- package/es/table/module/validator/hook.js +3 -1
- package/es/table/src/body.js +7 -2
- package/es/table/src/column.js +1 -0
- package/es/table/src/columnInfo.js +5 -3
- package/es/table/src/footer.js +2 -0
- package/es/table/src/group.js +1 -0
- package/es/table/src/header.js +2 -0
- package/es/table/src/table.js +28 -22
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +1 -0
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +113 -45
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/hook.js +2 -1
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +4 -0
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +5 -2
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/export-panel.js +3 -0
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/hook.js +52 -19
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/export/import-panel.js +3 -0
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/menu/hook.js +2 -0
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/module/validator/hook.js +3 -1
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/src/body.js +8 -2
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/column.js +1 -0
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +6 -2
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +2 -0
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/group.js +1 -0
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/header.js +2 -0
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +16 -16
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +1 -0
- package/packages/table/module/custom/hook.ts +2 -1
- package/packages/table/module/custom/panel.ts +4 -0
- package/packages/table/module/edit/hook.ts +3 -2
- package/packages/table/module/export/export-panel.ts +3 -0
- package/packages/table/module/export/hook.ts +52 -26
- package/packages/table/module/export/import-panel.ts +3 -0
- package/packages/table/module/menu/hook.ts +2 -1
- package/packages/table/module/validator/hook.ts +3 -1
- package/packages/table/src/body.ts +7 -2
- package/packages/table/src/column.ts +1 -0
- package/packages/table/src/columnInfo.ts +5 -3
- package/packages/table/src/footer.ts +2 -0
- package/packages/table/src/group.ts +1 -0
- package/packages/table/src/header.ts +2 -0
- package/packages/table/src/table.ts +29 -22
- /package/es/{iconfont.1755178488627.ttf → iconfont.1755232625112.ttf} +0 -0
- /package/es/{iconfont.1755178488627.woff → iconfont.1755232625112.woff} +0 -0
- /package/es/{iconfont.1755178488627.woff2 → iconfont.1755232625112.woff2} +0 -0
- /package/lib/{iconfont.1755178488627.ttf → iconfont.1755232625112.ttf} +0 -0
- /package/lib/{iconfont.1755178488627.woff → iconfont.1755232625112.woff} +0 -0
- /package/lib/{iconfont.1755178488627.woff2 → iconfont.1755232625112.woff2} +0 -0
|
@@ -9,6 +9,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
9
9
|
const { computeCustomOpts, computeRowGroupFields } = $xeTable.getComputeMaps();
|
|
10
10
|
const { refElem } = $xeTable.getRefMaps();
|
|
11
11
|
const $xeGrid = $xeTable.xeGrid;
|
|
12
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
12
13
|
const calcMaxHeight = () => {
|
|
13
14
|
const { customStore } = reactData;
|
|
14
15
|
const el = refElem.value;
|
|
@@ -271,7 +272,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
271
272
|
customStore.isIndeterminate = !customStore.isAll && collectColumn.some((column) => (!checkMethod || checkMethod({ $table: $xeTable, column })) && (column.renderVisible || column.halfVisible));
|
|
272
273
|
};
|
|
273
274
|
const emitCustomEvent = (type, evnt) => {
|
|
274
|
-
const comp = $xeGrid || $xeTable;
|
|
275
|
+
const comp = $xeGrid || $xeGantt || $xeTable;
|
|
275
276
|
comp.dispatchEvent('custom', { type }, evnt);
|
|
276
277
|
};
|
|
277
278
|
const customPrivateMethods = {
|
|
@@ -556,6 +556,7 @@ export default defineVxeComponent({
|
|
|
556
556
|
};
|
|
557
557
|
const renderSimplePanel = () => {
|
|
558
558
|
const $xeGrid = $xeTable.xeGrid;
|
|
559
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
559
560
|
const tableProps = $xeTable.props;
|
|
560
561
|
const { customStore } = props;
|
|
561
562
|
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
|
|
@@ -585,6 +586,7 @@ export default defineVxeComponent({
|
|
|
585
586
|
const params = {
|
|
586
587
|
$table: $xeTable,
|
|
587
588
|
$grid: $xeGrid,
|
|
589
|
+
$gantt: $xeGantt,
|
|
588
590
|
columns: customColumnList,
|
|
589
591
|
isAllChecked,
|
|
590
592
|
isAllIndeterminate,
|
|
@@ -827,6 +829,7 @@ export default defineVxeComponent({
|
|
|
827
829
|
};
|
|
828
830
|
const renderPopupPanel = () => {
|
|
829
831
|
const $xeGrid = $xeTable.xeGrid;
|
|
832
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
830
833
|
const { customStore } = props;
|
|
831
834
|
const { treeConfig, rowGroupConfig, aggregateConfig, resizable: allResizable } = tableProps;
|
|
832
835
|
const { isCustomStatus, customColumnList } = tableReactData;
|
|
@@ -854,6 +857,7 @@ export default defineVxeComponent({
|
|
|
854
857
|
const params = {
|
|
855
858
|
$table: $xeTable,
|
|
856
859
|
$grid: $xeGrid,
|
|
860
|
+
$gantt: $xeGantt,
|
|
857
861
|
columns: customColumnList,
|
|
858
862
|
isAllChecked,
|
|
859
863
|
isAllIndeterminate,
|
|
@@ -335,6 +335,7 @@ hooks.add('tableEditModule', {
|
|
|
335
335
|
};
|
|
336
336
|
const handleEditActive = (params, evnt, isFocus, isPos) => {
|
|
337
337
|
const $xeGrid = $xeTable.xeGrid;
|
|
338
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
338
339
|
const { editConfig, mouseConfig } = props;
|
|
339
340
|
const { editStore, tableColumn } = reactData;
|
|
340
341
|
const editOpts = computeEditOpts.value;
|
|
@@ -351,7 +352,7 @@ hooks.add('tableEditModule', {
|
|
|
351
352
|
if (actived.row !== row || (mode === 'cell' ? actived.column !== column : false)) {
|
|
352
353
|
// 判断是否禁用编辑
|
|
353
354
|
let type = 'edit-disabled';
|
|
354
|
-
if (!beforeEditMethod || beforeEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeGrid }))) {
|
|
355
|
+
if (!beforeEditMethod || beforeEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }))) {
|
|
355
356
|
if (mouseConfig) {
|
|
356
357
|
$xeTable.clearSelected();
|
|
357
358
|
if ($xeTable.clearCellAreas) {
|
|
@@ -380,7 +381,7 @@ hooks.add('tableEditModule', {
|
|
|
380
381
|
$xeTable.handleFocus(params, evnt);
|
|
381
382
|
}
|
|
382
383
|
if (afterEditMethod) {
|
|
383
|
-
afterEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeGrid }));
|
|
384
|
+
afterEditMethod(Object.assign(Object.assign({}, params), { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }));
|
|
384
385
|
}
|
|
385
386
|
});
|
|
386
387
|
}
|
|
@@ -141,6 +141,7 @@ export default defineVxeComponent({
|
|
|
141
141
|
};
|
|
142
142
|
const renderVN = () => {
|
|
143
143
|
const $xeGrid = $xeTable.xeGrid;
|
|
144
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
144
145
|
const { defaultOptions, storeData } = props;
|
|
145
146
|
const { isAll: isAllChecked, isIndeterminate: isAllIndeterminate } = reactData;
|
|
146
147
|
const { hasTree, hasMerge, isPrint, hasColgroup, columns } = storeData;
|
|
@@ -219,6 +220,7 @@ export default defineVxeComponent({
|
|
|
219
220
|
const params = {
|
|
220
221
|
$table: $xeTable,
|
|
221
222
|
$grid: $xeGrid,
|
|
223
|
+
$gantt: $xeGantt,
|
|
222
224
|
options: defaultOptions,
|
|
223
225
|
columns,
|
|
224
226
|
params: defaultOptions.params
|
|
@@ -475,6 +477,7 @@ export default defineVxeComponent({
|
|
|
475
477
|
const params = {
|
|
476
478
|
$table: $xeTable,
|
|
477
479
|
$grid: $xeGrid,
|
|
480
|
+
$gantt: $xeGantt,
|
|
478
481
|
options: defaultOptions,
|
|
479
482
|
columns,
|
|
480
483
|
params: defaultOptions.params
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { nextTick } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { VxeUI } from '../../../ui';
|
|
4
4
|
import { isColumnInfo, getCellValue, createHandleGetRowId } from '../../src/util';
|
|
@@ -80,8 +80,10 @@ function getBooleanValue(cellValue) {
|
|
|
80
80
|
return cellValue === 'TRUE' || cellValue === 'true' || cellValue === true;
|
|
81
81
|
}
|
|
82
82
|
function getFooterData($xeTable, opts, footerTableData) {
|
|
83
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
84
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
83
85
|
const { footerFilterMethod } = opts;
|
|
84
|
-
return footerFilterMethod ? footerTableData.filter((items, index) => footerFilterMethod({ $table: $xeTable, items, $rowIndex: index })) : footerTableData;
|
|
86
|
+
return footerFilterMethod ? footerTableData.filter((items, index) => footerFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, items, $rowIndex: index })) : footerTableData;
|
|
85
87
|
}
|
|
86
88
|
function getCsvCellTypeLabel(column, cellValue) {
|
|
87
89
|
if (cellValue) {
|
|
@@ -255,8 +257,6 @@ hooks.add('tableExportModule', {
|
|
|
255
257
|
setupTable($xeTable) {
|
|
256
258
|
const { props, reactData, internalData } = $xeTable;
|
|
257
259
|
const { computeTreeOpts, computePrintOpts, computeExportOpts, computeImportOpts, computeCustomOpts, computeSeqOpts, computeRadioOpts, computeCheckboxOpts, computeColumnOpts } = $xeTable.getComputeMaps();
|
|
258
|
-
const $xeGrid = inject('$xeGrid', null);
|
|
259
|
-
const $xeGantt = inject('$xeGantt', null);
|
|
260
260
|
const hasTreeChildren = (row) => {
|
|
261
261
|
const treeOpts = computeTreeOpts.value;
|
|
262
262
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
@@ -444,10 +444,12 @@ hooks.add('tableExportModule', {
|
|
|
444
444
|
});
|
|
445
445
|
};
|
|
446
446
|
const getExportData = (opts) => {
|
|
447
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
448
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
447
449
|
const { columns, dataFilterMethod } = opts;
|
|
448
450
|
let datas = opts.data;
|
|
449
451
|
if (dataFilterMethod) {
|
|
450
|
-
datas = datas.filter((row, index) => dataFilterMethod({ $table: $xeTable, row, $rowIndex: index }));
|
|
452
|
+
datas = datas.filter((row, index) => dataFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, row, $rowIndex: index }));
|
|
451
453
|
}
|
|
452
454
|
return getBodyLabelData(opts, columns, datas);
|
|
453
455
|
};
|
|
@@ -749,10 +751,12 @@ hooks.add('tableExportModule', {
|
|
|
749
751
|
}
|
|
750
752
|
};
|
|
751
753
|
const handleExport = (opts) => {
|
|
754
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
755
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
752
756
|
const { remote, columns, colgroups, exportMethod, afterExportMethod } = opts;
|
|
753
757
|
return new Promise(resolve => {
|
|
754
758
|
if (remote) {
|
|
755
|
-
const params = { options: opts, $table: $xeTable, $grid: $xeGrid };
|
|
759
|
+
const params = { options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt };
|
|
756
760
|
resolve(exportMethod ? exportMethod(params) : params);
|
|
757
761
|
}
|
|
758
762
|
else {
|
|
@@ -765,7 +769,7 @@ hooks.add('tableExportModule', {
|
|
|
765
769
|
clearColumnConvert(columns);
|
|
766
770
|
if (!opts.print) {
|
|
767
771
|
if (afterExportMethod) {
|
|
768
|
-
afterExportMethod({ status: true, options: opts, $table: $xeTable, $grid: $xeGrid });
|
|
772
|
+
afterExportMethod({ status: true, options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
769
773
|
}
|
|
770
774
|
}
|
|
771
775
|
return Object.assign({ status: true }, params);
|
|
@@ -773,7 +777,7 @@ hooks.add('tableExportModule', {
|
|
|
773
777
|
clearColumnConvert(columns);
|
|
774
778
|
if (!opts.print) {
|
|
775
779
|
if (afterExportMethod) {
|
|
776
|
-
afterExportMethod({ status: false, options: opts, $table: $xeTable, $grid: $xeGrid });
|
|
780
|
+
afterExportMethod({ status: false, options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
777
781
|
}
|
|
778
782
|
}
|
|
779
783
|
const params = { status: false };
|
|
@@ -965,6 +969,9 @@ hooks.add('tableExportModule', {
|
|
|
965
969
|
return exportOpts.original ? !!column.field : defaultFilterExportColumn(column);
|
|
966
970
|
};
|
|
967
971
|
const handleExportAndPrint = (options, isPrint) => {
|
|
972
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
973
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
974
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
968
975
|
const { treeConfig, showHeader, showFooter } = props;
|
|
969
976
|
const { initStore, isGroup, footerTableData, exportStore, exportParams } = reactData;
|
|
970
977
|
const { collectColumn, mergeBodyList, mergeFooterList } = internalData;
|
|
@@ -972,7 +979,7 @@ hooks.add('tableExportModule', {
|
|
|
972
979
|
const hasTree = treeConfig;
|
|
973
980
|
const customOpts = computeCustomOpts.value;
|
|
974
981
|
const selectRecords = $xeTable.getCheckboxRecords();
|
|
975
|
-
const proxyOpts = $
|
|
982
|
+
const proxyOpts = $xeGGWrapper ? $xeGGWrapper.getComputeMaps().computeProxyOpts.value : {};
|
|
976
983
|
const hasFooter = !!footerTableData.length;
|
|
977
984
|
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length);
|
|
978
985
|
const defOpts = Object.assign({
|
|
@@ -1049,7 +1056,8 @@ hooks.add('tableExportModule', {
|
|
|
1049
1056
|
exportParams.filename = filename({
|
|
1050
1057
|
options: defOpts,
|
|
1051
1058
|
$table: $xeTable,
|
|
1052
|
-
$grid: $xeGrid
|
|
1059
|
+
$grid: $xeGrid,
|
|
1060
|
+
$gantt: $xeGantt
|
|
1053
1061
|
});
|
|
1054
1062
|
}
|
|
1055
1063
|
else {
|
|
@@ -1061,7 +1069,8 @@ hooks.add('tableExportModule', {
|
|
|
1061
1069
|
exportParams.sheetName = sheetName({
|
|
1062
1070
|
options: defOpts,
|
|
1063
1071
|
$table: $xeTable,
|
|
1064
|
-
$grid: $xeGrid
|
|
1072
|
+
$grid: $xeGrid,
|
|
1073
|
+
$gantt: $xeGantt
|
|
1065
1074
|
});
|
|
1066
1075
|
}
|
|
1067
1076
|
else {
|
|
@@ -1091,12 +1100,15 @@ hooks.add('tableExportModule', {
|
|
|
1091
1100
|
* @param {Object} options 参数
|
|
1092
1101
|
*/
|
|
1093
1102
|
exportData(options) {
|
|
1103
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
1104
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
1105
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
1094
1106
|
const { treeConfig, showHeader, showFooter } = props;
|
|
1095
1107
|
const { isGroup } = reactData;
|
|
1096
1108
|
const { tableFullColumn, afterFullData, afterTreeFullData, collectColumn, mergeBodyList, mergeFooterList } = internalData;
|
|
1097
1109
|
const exportOpts = computeExportOpts.value;
|
|
1098
1110
|
const treeOpts = computeTreeOpts.value;
|
|
1099
|
-
const proxyOpts = $
|
|
1111
|
+
const proxyOpts = $xeGGWrapper ? $xeGGWrapper.getComputeMaps().computeProxyOpts.value : {};
|
|
1100
1112
|
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length);
|
|
1101
1113
|
const opts = Object.assign({
|
|
1102
1114
|
message: true,
|
|
@@ -1203,14 +1215,14 @@ hooks.add('tableExportModule', {
|
|
|
1203
1215
|
}, {
|
|
1204
1216
|
children: 'childNodes',
|
|
1205
1217
|
mapChildren: '_children'
|
|
1206
|
-
}), (column, index) => isColumnInfo(column) && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, column: column, $columnIndex: index })), {
|
|
1218
|
+
}), (column, index) => isColumnInfo(column) && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column: column, $columnIndex: index })), {
|
|
1207
1219
|
children: '_children',
|
|
1208
1220
|
mapChildren: 'childNodes',
|
|
1209
1221
|
original: true
|
|
1210
1222
|
});
|
|
1211
1223
|
}
|
|
1212
1224
|
else {
|
|
1213
|
-
groups = XEUtils.searchTree(isGroup ? collectColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, column, $columnIndex: index })), { children: 'children', mapChildren: 'childNodes', original: true });
|
|
1225
|
+
groups = XEUtils.searchTree(isGroup ? collectColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column, $columnIndex: index })), { children: 'children', mapChildren: 'childNodes', original: true });
|
|
1214
1226
|
}
|
|
1215
1227
|
// 获取所有列
|
|
1216
1228
|
const cols = [];
|
|
@@ -1228,7 +1240,8 @@ hooks.add('tableExportModule', {
|
|
|
1228
1240
|
handleOptions.filename = filename({
|
|
1229
1241
|
options: opts,
|
|
1230
1242
|
$table: $xeTable,
|
|
1231
|
-
$grid: $xeGrid
|
|
1243
|
+
$grid: $xeGrid,
|
|
1244
|
+
$gantt: $xeGantt
|
|
1232
1245
|
});
|
|
1233
1246
|
}
|
|
1234
1247
|
else {
|
|
@@ -1243,7 +1256,8 @@ hooks.add('tableExportModule', {
|
|
|
1243
1256
|
handleOptions.sheetName = sheetName({
|
|
1244
1257
|
options: opts,
|
|
1245
1258
|
$table: $xeTable,
|
|
1246
|
-
$grid: $xeGrid
|
|
1259
|
+
$grid: $xeGrid,
|
|
1260
|
+
$gantt: $xeGantt
|
|
1247
1261
|
});
|
|
1248
1262
|
}
|
|
1249
1263
|
else {
|
|
@@ -1264,7 +1278,7 @@ hooks.add('tableExportModule', {
|
|
|
1264
1278
|
}
|
|
1265
1279
|
if (!handleOptions.print) {
|
|
1266
1280
|
if (beforeExportMethod) {
|
|
1267
|
-
beforeExportMethod({ options: handleOptions, $table: $xeTable, $grid: $xeGrid });
|
|
1281
|
+
beforeExportMethod({ options: handleOptions, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
1268
1282
|
}
|
|
1269
1283
|
}
|
|
1270
1284
|
if (!handleOptions.data) {
|
|
@@ -1278,12 +1292,12 @@ hooks.add('tableExportModule', {
|
|
|
1278
1292
|
}
|
|
1279
1293
|
}
|
|
1280
1294
|
else if (mode === 'all') {
|
|
1281
|
-
if (!$
|
|
1295
|
+
if (!$xeGGWrapper) {
|
|
1282
1296
|
errLog('vxe.error.errProp', ['all', 'mode=current,selected']);
|
|
1283
1297
|
}
|
|
1284
|
-
if ($
|
|
1285
|
-
const gridReactData = $
|
|
1286
|
-
const { computeProxyOpts } = $
|
|
1298
|
+
if ($xeGGWrapper && !handleOptions.remote) {
|
|
1299
|
+
const gridReactData = $xeGGWrapper.reactData;
|
|
1300
|
+
const { computeProxyOpts } = $xeGGWrapper.getComputeMaps();
|
|
1287
1301
|
const proxyOpts = computeProxyOpts.value;
|
|
1288
1302
|
const { sortData } = gridReactData;
|
|
1289
1303
|
const { beforeQueryAll, afterQueryAll, ajax = {} } = proxyOpts;
|
|
@@ -1370,6 +1384,8 @@ hooks.add('tableExportModule', {
|
|
|
1370
1384
|
return VxeUI.readFile(options);
|
|
1371
1385
|
},
|
|
1372
1386
|
print(options) {
|
|
1387
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
1388
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
1373
1389
|
const printOpts = computePrintOpts.value;
|
|
1374
1390
|
const opts = Object.assign({
|
|
1375
1391
|
original: false
|
|
@@ -1387,7 +1403,8 @@ hooks.add('tableExportModule', {
|
|
|
1387
1403
|
printTitle = sheetName({
|
|
1388
1404
|
options: opts,
|
|
1389
1405
|
$table: $xeTable,
|
|
1390
|
-
$grid: $xeGrid
|
|
1406
|
+
$grid: $xeGrid,
|
|
1407
|
+
$gantt: $xeGantt
|
|
1391
1408
|
});
|
|
1392
1409
|
}
|
|
1393
1410
|
else {
|
|
@@ -1412,7 +1429,9 @@ hooks.add('tableExportModule', {
|
|
|
1412
1429
|
html,
|
|
1413
1430
|
content: html,
|
|
1414
1431
|
options: opts,
|
|
1415
|
-
$table: $xeTable
|
|
1432
|
+
$table: $xeTable,
|
|
1433
|
+
$grid: $xeGrid,
|
|
1434
|
+
$gantt: $xeGantt
|
|
1416
1435
|
});
|
|
1417
1436
|
}
|
|
1418
1437
|
: undefined
|
|
@@ -1430,7 +1449,9 @@ hooks.add('tableExportModule', {
|
|
|
1430
1449
|
html,
|
|
1431
1450
|
content: html,
|
|
1432
1451
|
options: opts,
|
|
1433
|
-
$table: $xeTable
|
|
1452
|
+
$table: $xeTable,
|
|
1453
|
+
$grid: $xeGrid,
|
|
1454
|
+
$gantt: $xeGantt
|
|
1434
1455
|
});
|
|
1435
1456
|
}
|
|
1436
1457
|
: undefined
|
|
@@ -78,6 +78,7 @@ export default defineVxeComponent({
|
|
|
78
78
|
};
|
|
79
79
|
const renderVN = () => {
|
|
80
80
|
const $xeGrid = $xeTable.xeGrid;
|
|
81
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
81
82
|
const { defaultOptions, storeData } = props;
|
|
82
83
|
const selectName = computeSelectName.value;
|
|
83
84
|
const hasFile = computeHasFile.value;
|
|
@@ -113,6 +114,7 @@ export default defineVxeComponent({
|
|
|
113
114
|
const params = {
|
|
114
115
|
$table: $xeTable,
|
|
115
116
|
$grid: $xeGrid,
|
|
117
|
+
$gantt: $xeGantt,
|
|
116
118
|
options: defaultOptions,
|
|
117
119
|
params: defaultOptions.params
|
|
118
120
|
};
|
|
@@ -189,6 +191,7 @@ export default defineVxeComponent({
|
|
|
189
191
|
const params = {
|
|
190
192
|
$table: $xeTable,
|
|
191
193
|
$grid: $xeGrid,
|
|
194
|
+
$gantt: $xeGantt,
|
|
192
195
|
options: defaultOptions,
|
|
193
196
|
params: defaultOptions.params
|
|
194
197
|
};
|
|
@@ -281,10 +281,11 @@ hooks.add('tableMenuModule', {
|
|
|
281
281
|
*/
|
|
282
282
|
ctxMenuLinkEvent(evnt, menu) {
|
|
283
283
|
const $xeGrid = $xeTable.xeGrid;
|
|
284
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
284
285
|
// 如果一级菜单有配置 code 则允许点击,否则不能点击
|
|
285
286
|
if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
286
287
|
const gMenuOpts = menus.get(menu.code);
|
|
287
|
-
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid, $event: evnt });
|
|
288
|
+
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt });
|
|
288
289
|
const tmMethod = gMenuOpts ? (gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod) : null;
|
|
289
290
|
if (tmMethod) {
|
|
290
291
|
tmMethod(params, evnt);
|
|
@@ -434,6 +434,7 @@ hooks.add('tableValidatorModule', {
|
|
|
434
434
|
*/
|
|
435
435
|
validCellRules(validType, row, column, val) {
|
|
436
436
|
const $xeGrid = $xeTable.xeGrid;
|
|
437
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
437
438
|
const { editRules } = props;
|
|
438
439
|
const { field } = column;
|
|
439
440
|
const errorRules = [];
|
|
@@ -456,7 +457,8 @@ hooks.add('tableValidatorModule', {
|
|
|
456
457
|
columnIndex: $xeTable.getColumnIndex(column),
|
|
457
458
|
field: column.field,
|
|
458
459
|
$table: $xeTable,
|
|
459
|
-
$grid: $xeGrid
|
|
460
|
+
$grid: $xeGrid,
|
|
461
|
+
$gantt: $xeGantt
|
|
460
462
|
};
|
|
461
463
|
let customValid;
|
|
462
464
|
if (XEUtils.isString(validator)) {
|
package/es/table/src/body.js
CHANGED
|
@@ -78,6 +78,7 @@ export default defineVxeComponent({
|
|
|
78
78
|
*/
|
|
79
79
|
const renderTdColumn = (seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) => {
|
|
80
80
|
const $xeGrid = $xeTable.xeGrid;
|
|
81
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
81
82
|
const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, treeConfig, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps;
|
|
82
83
|
const { tableData, tableColumn, dragRow, overflowX, overflowY, currentColumn, scrollXLoad, scrollYLoad, mergeBodyFlag, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, editStore, isAllOverflow, validErrorMaps } = tableReactData;
|
|
83
84
|
const { fullAllDataRowIdData, fullColumnIdData, mergeBodyCellMaps, visibleColumn, afterFullData, mergeBodyList, scrollXStore, scrollYStore } = tableInternalData;
|
|
@@ -135,6 +136,7 @@ export default defineVxeComponent({
|
|
|
135
136
|
const cellParams = {
|
|
136
137
|
$table: $xeTable,
|
|
137
138
|
$grid: $xeGrid,
|
|
139
|
+
$gantt: $xeGantt,
|
|
138
140
|
isEdit: false,
|
|
139
141
|
seq,
|
|
140
142
|
rowid,
|
|
@@ -419,6 +421,7 @@ export default defineVxeComponent({
|
|
|
419
421
|
};
|
|
420
422
|
const renderRows = (fixedType, isOptimizeMode, tableData, tableColumn) => {
|
|
421
423
|
const $xeGrid = $xeTable.xeGrid;
|
|
424
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
422
425
|
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps;
|
|
423
426
|
const { hasFixedColumn, treeExpandedFlag, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData;
|
|
424
427
|
const { fullAllDataRowIdData, fullColumnIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps } = tableInternalData;
|
|
@@ -549,8 +552,9 @@ export default defineVxeComponent({
|
|
|
549
552
|
_columnIndex = colRest._index;
|
|
550
553
|
}
|
|
551
554
|
const expandParams = {
|
|
552
|
-
$grid: $xeGrid,
|
|
553
555
|
$table: $xeTable,
|
|
556
|
+
$grid: $xeGrid,
|
|
557
|
+
$gantt: $xeGantt,
|
|
554
558
|
seq,
|
|
555
559
|
column: expandColumn,
|
|
556
560
|
columnIndex,
|
|
@@ -633,6 +637,7 @@ export default defineVxeComponent({
|
|
|
633
637
|
const renderVN = () => {
|
|
634
638
|
const { slots } = tableContext;
|
|
635
639
|
const $xeGrid = $xeTable.xeGrid;
|
|
640
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
636
641
|
const { fixedColumn, fixedType, tableColumn } = props;
|
|
637
642
|
const { spanMethod, footerSpanMethod, mouseConfig } = tableProps;
|
|
638
643
|
const { isGroup, tableData, isColLoading, overflowX, scrollXLoad, scrollYLoad, isAllOverflow, expandColumn, dragRow, dragCol } = tableReactData;
|
|
@@ -710,7 +715,7 @@ export default defineVxeComponent({
|
|
|
710
715
|
}
|
|
711
716
|
let emptyContent;
|
|
712
717
|
const emptySlot = slots ? slots.empty : null;
|
|
713
|
-
const emptyParams = { $table: $xeTable, $grid: $xeGrid };
|
|
718
|
+
const emptyParams = { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt };
|
|
714
719
|
if (emptySlot) {
|
|
715
720
|
emptyContent = $xeTable.callSlot(emptySlot, emptyParams);
|
|
716
721
|
}
|
package/es/table/src/column.js
CHANGED
|
@@ -9,6 +9,8 @@ export class ColumnInfo {
|
|
|
9
9
|
constructor($xeTable, _vm, { renderHeader, renderCell, renderFooter, renderData } = {}) {
|
|
10
10
|
const tableProps = $xeTable.props;
|
|
11
11
|
const $xeGrid = $xeTable.xeGrid;
|
|
12
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
13
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
12
14
|
const { field, editRender } = _vm;
|
|
13
15
|
const formatter = _vm.formatter;
|
|
14
16
|
const visible = XEUtils.isBoolean(_vm.visible) ? _vm.visible : true;
|
|
@@ -151,11 +153,11 @@ export class ColumnInfo {
|
|
|
151
153
|
// 单元格插槽,只对 grid 有效
|
|
152
154
|
slots: _vm.slots
|
|
153
155
|
});
|
|
154
|
-
if ($
|
|
155
|
-
const { computeProxyOpts } = $
|
|
156
|
+
if ($xeGGWrapper) {
|
|
157
|
+
const { computeProxyOpts } = $xeGGWrapper.getComputeMaps();
|
|
156
158
|
const proxyOpts = computeProxyOpts.value;
|
|
157
159
|
if (proxyOpts.beforeColumn) {
|
|
158
|
-
proxyOpts.beforeColumn({ $grid: $xeGrid, column: this });
|
|
160
|
+
proxyOpts.beforeColumn({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column: this });
|
|
159
161
|
}
|
|
160
162
|
}
|
|
161
163
|
}
|
package/es/table/src/footer.js
CHANGED
|
@@ -38,6 +38,7 @@ export default defineVxeComponent({
|
|
|
38
38
|
const refFooterXSpace = ref();
|
|
39
39
|
const renderRows = (isOptimizeMode, tableColumn, footerTableData, row, $rowIndex, _rowIndex) => {
|
|
40
40
|
const $xeGrid = $xeTable.xeGrid;
|
|
41
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
41
42
|
const { fixedType } = props;
|
|
42
43
|
const { resizable: allResizable, border, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps;
|
|
43
44
|
const { scrollXLoad, scrollYLoad, overflowX, currentColumn, mergeFootFlag } = tableReactData;
|
|
@@ -75,6 +76,7 @@ export default defineVxeComponent({
|
|
|
75
76
|
const cellParams = {
|
|
76
77
|
$table: $xeTable,
|
|
77
78
|
$grid: $xeGrid,
|
|
79
|
+
$gantt: $xeGantt,
|
|
78
80
|
row,
|
|
79
81
|
rowIndex: _rowIndex,
|
|
80
82
|
_rowIndex,
|
package/es/table/src/group.js
CHANGED
package/es/table/src/header.js
CHANGED
|
@@ -35,6 +35,7 @@ export default defineVxeComponent({
|
|
|
35
35
|
};
|
|
36
36
|
const renderRows = (isGroup, isOptimizeMode, cols, $rowIndex) => {
|
|
37
37
|
const $xeGrid = $xeTable.xeGrid;
|
|
38
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
38
39
|
const { fixedType } = props;
|
|
39
40
|
const { resizable: allResizable, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, mouseConfig } = tableProps;
|
|
40
41
|
const { currentColumn, dragCol, scrollXLoad, scrollYLoad, overflowX, tableColumn } = tableReactData;
|
|
@@ -73,6 +74,7 @@ export default defineVxeComponent({
|
|
|
73
74
|
const cellParams = {
|
|
74
75
|
$table: $xeTable,
|
|
75
76
|
$grid: $xeGrid,
|
|
77
|
+
$gantt: $xeGantt,
|
|
76
78
|
$rowIndex,
|
|
77
79
|
column,
|
|
78
80
|
columnIndex,
|