vxe-table 3.17.10 → 3.18.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 +4 -3
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +3 -1
- package/es/locale/lang/de-DE.js +3 -1
- package/es/locale/lang/en-US.js +3 -1
- package/es/locale/lang/es-ES.js +3 -1
- package/es/locale/lang/fr-FR.js +3 -1
- package/es/locale/lang/hu-HU.js +3 -1
- package/es/locale/lang/hy-AM.js +3 -1
- package/es/locale/lang/id-ID.js +3 -1
- package/es/locale/lang/it-IT.js +3 -1
- package/es/locale/lang/ja-JP.js +3 -1
- package/es/locale/lang/ko-KR.js +3 -1
- package/es/locale/lang/ms-MY.js +3 -1
- package/es/locale/lang/nb-NO.js +3 -1
- package/es/locale/lang/pt-BR.js +3 -1
- package/es/locale/lang/ru-RU.js +3 -1
- package/es/locale/lang/th-TH.js +3 -1
- package/es/locale/lang/ug-CN.js +3 -1
- package/es/locale/lang/uk-UA.js +3 -1
- package/es/locale/lang/uz-UZ.js +3 -1
- package/es/locale/lang/vi-VN.js +3 -1
- package/es/locale/lang/zh-CHT.js +3 -1
- package/es/locale/lang/zh-CN.js +3 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +4 -2
- package/es/table/module/custom/panel.js +4 -0
- package/es/table/module/export/export-panel.js +3 -0
- package/es/table/module/export/import-panel.js +3 -0
- package/es/table/module/export/mixin.js +41 -22
- package/es/table/module/menu/mixin.js +5 -3
- package/es/table/src/body.js +6 -1
- package/es/table/src/column.js +2 -1
- package/es/table/src/columnInfo.js +6 -2
- package/es/table/src/footer.js +2 -0
- package/es/table/src/group.js +2 -1
- package/es/table/src/header.js +2 -0
- package/es/table/src/methods.js +84 -37
- package/es/table/src/table.js +10 -5
- package/es/table/style.css +3 -3
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +3 -3
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +4 -3
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +213 -93
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +3 -1
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +3 -1
- package/lib/locale/lang/de-DE.js +3 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +3 -1
- package/lib/locale/lang/en-US.js +3 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +3 -1
- package/lib/locale/lang/es-ES.js +3 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +3 -1
- package/lib/locale/lang/fr-FR.js +3 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +3 -1
- package/lib/locale/lang/hu-HU.js +3 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +3 -1
- package/lib/locale/lang/hy-AM.js +3 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +3 -1
- package/lib/locale/lang/id-ID.js +3 -1
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +3 -1
- package/lib/locale/lang/it-IT.js +3 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +3 -1
- package/lib/locale/lang/ja-JP.js +3 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +3 -1
- package/lib/locale/lang/ko-KR.js +3 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +3 -1
- package/lib/locale/lang/ms-MY.js +3 -1
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +3 -1
- package/lib/locale/lang/nb-NO.js +3 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +3 -1
- package/lib/locale/lang/pt-BR.js +3 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +3 -1
- package/lib/locale/lang/ru-RU.js +3 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +3 -1
- package/lib/locale/lang/th-TH.js +3 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +3 -1
- package/lib/locale/lang/ug-CN.js +3 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +3 -1
- package/lib/locale/lang/uk-UA.js +3 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +3 -1
- package/lib/locale/lang/uz-UZ.js +3 -1
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +3 -1
- package/lib/locale/lang/vi-VN.js +3 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +3 -1
- package/lib/locale/lang/zh-CHT.js +3 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +3 -1
- package/lib/locale/lang/zh-CN.js +3 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +3 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +4 -2
- package/lib/table/module/custom/mixin.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/export/export-panel.js +3 -0
- package/lib/table/module/export/export-panel.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/export/mixin.js +49 -18
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +8 -3
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/src/body.js +7 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/column.js +2 -1
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +11 -5
- 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 +2 -1
- 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/methods.js +89 -47
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +12 -3
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +3 -3
- package/lib/table/style/style.min.css +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/vxe-table/style/style.css +3 -3
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +4 -3
- package/packages/locale/lang/ar-EG.ts +3 -1
- package/packages/locale/lang/de-DE.ts +3 -1
- package/packages/locale/lang/en-US.ts +3 -1
- package/packages/locale/lang/es-ES.ts +3 -1
- package/packages/locale/lang/fr-FR.ts +3 -1
- package/packages/locale/lang/hu-HU.ts +3 -1
- package/packages/locale/lang/hy-AM.ts +3 -1
- package/packages/locale/lang/id-ID.ts +3 -1
- package/packages/locale/lang/it-IT.ts +3 -1
- package/packages/locale/lang/ja-JP.ts +3 -1
- package/packages/locale/lang/ko-KR.ts +3 -1
- package/packages/locale/lang/ms-MY.ts +3 -1
- package/packages/locale/lang/nb-NO.ts +3 -1
- package/packages/locale/lang/pt-BR.ts +3 -1
- package/packages/locale/lang/ru-RU.ts +3 -1
- package/packages/locale/lang/th-TH.ts +3 -1
- package/packages/locale/lang/ug-CN.ts +3 -1
- package/packages/locale/lang/uk-UA.ts +3 -1
- package/packages/locale/lang/uz-UZ.ts +3 -1
- package/packages/locale/lang/vi-VN.ts +3 -1
- package/packages/locale/lang/zh-CHT.ts +3 -1
- package/packages/locale/lang/zh-CN.ts +3 -1
- package/packages/table/module/custom/mixin.ts +7 -5
- package/packages/table/module/custom/panel.ts +4 -0
- package/packages/table/module/export/export-panel.ts +3 -0
- package/packages/table/module/export/import-panel.ts +3 -0
- package/packages/table/module/export/mixin.ts +43 -22
- package/packages/table/module/menu/mixin.ts +8 -6
- package/packages/table/src/body.ts +6 -1
- package/packages/table/src/column.ts +2 -1
- package/packages/table/src/columnInfo.ts +8 -4
- package/packages/table/src/footer.ts +2 -0
- package/packages/table/src/group.ts +2 -1
- package/packages/table/src/header.ts +5 -1
- package/packages/table/src/methods.ts +99 -48
- package/packages/table/src/table.ts +10 -5
- package/styles/components/table.scss +7 -3
- /package/es/{iconfont.1755133667514.ttf → iconfont.1755232583063.ttf} +0 -0
- /package/es/{iconfont.1755133667514.woff → iconfont.1755232583063.woff} +0 -0
- /package/es/{iconfont.1755133667514.woff2 → iconfont.1755232583063.woff2} +0 -0
- /package/lib/{iconfont.1755133667514.ttf → iconfont.1755232583063.ttf} +0 -0
- /package/lib/{iconfont.1755133667514.woff → iconfont.1755232583063.woff} +0 -0
- /package/lib/{iconfont.1755133667514.woff2 → iconfont.1755232583063.woff2} +0 -0
|
@@ -110,6 +110,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
110
110
|
const tableProps = $xeTable;
|
|
111
111
|
const tableReactData = $xeTable;
|
|
112
112
|
const $xeGrid = $xeTable.$xeGrid;
|
|
113
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
113
114
|
const { customStore } = props;
|
|
114
115
|
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
|
|
115
116
|
const { isCustomStatus, customColumnList } = tableReactData;
|
|
@@ -138,6 +139,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
138
139
|
const params = {
|
|
139
140
|
$table: $xeTable,
|
|
140
141
|
$grid: $xeGrid,
|
|
142
|
+
$gantt: $xeGantt,
|
|
141
143
|
columns: customColumnList,
|
|
142
144
|
isAllChecked,
|
|
143
145
|
isAllIndeterminate,
|
|
@@ -430,6 +432,7 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
430
432
|
const tableProps = $xeTable;
|
|
431
433
|
const tableReactData = $xeTable;
|
|
432
434
|
const $xeGrid = $xeTable.$xeGrid;
|
|
435
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
433
436
|
const { customStore } = props;
|
|
434
437
|
const { treeConfig, rowGroupConfig, aggregateConfig, resizable: allResizable } = tableProps;
|
|
435
438
|
const { isCustomStatus, customColumnList } = tableReactData;
|
|
@@ -457,6 +460,7 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
457
460
|
const params = {
|
|
458
461
|
$table: $xeTable,
|
|
459
462
|
$grid: $xeGrid,
|
|
463
|
+
$gantt: $xeGantt,
|
|
460
464
|
columns: customColumnList,
|
|
461
465
|
isAllChecked,
|
|
462
466
|
isAllIndeterminate,
|
|
@@ -79,6 +79,7 @@ export default {
|
|
|
79
79
|
render(h) {
|
|
80
80
|
const $xeTable = this.$xeTable;
|
|
81
81
|
const $xeGrid = $xeTable.$xeGrid;
|
|
82
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
82
83
|
const { _e, checkedAll, isAll: isAllChecked, isIndeterminate: isAllIndeterminate, showSheet, supportMerge, supportStyle, defaultOptions, storeData } = this;
|
|
83
84
|
const { hasTree, hasMerge, isPrint, hasColgroup, columns } = storeData;
|
|
84
85
|
const { isHeader } = defaultOptions;
|
|
@@ -160,6 +161,7 @@ export default {
|
|
|
160
161
|
const params = {
|
|
161
162
|
$table: $xeTable,
|
|
162
163
|
$grid: $xeGrid,
|
|
164
|
+
$gantt: $xeGantt,
|
|
163
165
|
options: defaultOptions,
|
|
164
166
|
columns,
|
|
165
167
|
params: defaultOptions.params
|
|
@@ -443,6 +445,7 @@ export default {
|
|
|
443
445
|
const params = {
|
|
444
446
|
$table: $xeTable,
|
|
445
447
|
$grid: $xeGrid,
|
|
448
|
+
$gantt: $xeGantt,
|
|
446
449
|
options: defaultOptions,
|
|
447
450
|
columns,
|
|
448
451
|
params: defaultOptions.params
|
|
@@ -63,6 +63,7 @@ export default {
|
|
|
63
63
|
render(h) {
|
|
64
64
|
const $xeTable = this.$parent;
|
|
65
65
|
const $xeGrid = $xeTable.$xeGrid;
|
|
66
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
66
67
|
const { hasFile, loading, parseTypeLabel, defaultOptions, storeData, selectName } = this;
|
|
67
68
|
const slots = defaultOptions.slots || {};
|
|
68
69
|
const topSlot = slots.top;
|
|
@@ -98,6 +99,7 @@ export default {
|
|
|
98
99
|
const params = {
|
|
99
100
|
$table: $xeTable,
|
|
100
101
|
$grid: $xeGrid,
|
|
102
|
+
$gantt: $xeGantt,
|
|
101
103
|
options: defaultOptions,
|
|
102
104
|
params: defaultOptions.params
|
|
103
105
|
};
|
|
@@ -187,6 +189,7 @@ export default {
|
|
|
187
189
|
const params = {
|
|
188
190
|
$table: $xeTable,
|
|
189
191
|
$grid: $xeGrid,
|
|
192
|
+
$gantt: $xeGantt,
|
|
190
193
|
options: defaultOptions,
|
|
191
194
|
params: defaultOptions.params
|
|
192
195
|
};
|
|
@@ -204,10 +204,12 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
206
|
function getExportData($xeTable, opts) {
|
|
207
|
+
const $xeGrid = $xeTable.$xeGrid;
|
|
208
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
207
209
|
const { columns, dataFilterMethod } = opts;
|
|
208
210
|
let datas = opts.data;
|
|
209
211
|
if (dataFilterMethod) {
|
|
210
|
-
datas = datas.filter((row, index) => dataFilterMethod({ $table: $xeTable, row, $rowIndex: index }));
|
|
212
|
+
datas = datas.filter((row, index) => dataFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, row, $rowIndex: index }));
|
|
211
213
|
}
|
|
212
214
|
return getBodyLabelData($xeTable, opts, columns, datas);
|
|
213
215
|
}
|
|
@@ -243,8 +245,10 @@ function getFooterCellValue($xeTable, opts, row, column) {
|
|
|
243
245
|
return XEUtils.get(row, column.field);
|
|
244
246
|
}
|
|
245
247
|
function getFooterData($xeTable, opts, footerTableData) {
|
|
248
|
+
const $xeGrid = $xeTable.$xeGrid;
|
|
249
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
246
250
|
const { footerFilterMethod } = opts;
|
|
247
|
-
return footerFilterMethod ? footerTableData.filter((items, index) => footerFilterMethod({ $table: $xeTable, items, $rowIndex: index })) : footerTableData;
|
|
251
|
+
return footerFilterMethod ? footerTableData.filter((items, index) => footerFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, items, $rowIndex: index })) : footerTableData;
|
|
248
252
|
}
|
|
249
253
|
function getCsvCellTypeLabel(column, cellValue) {
|
|
250
254
|
if (cellValue) {
|
|
@@ -566,10 +570,11 @@ function clearColumnConvert(columns) {
|
|
|
566
570
|
}
|
|
567
571
|
function handleExport($xeTable, opts) {
|
|
568
572
|
const $xeGrid = $xeTable.$xeGrid;
|
|
573
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
569
574
|
const { remote, columns, colgroups, exportMethod, afterExportMethod } = opts;
|
|
570
575
|
return new Promise(resolve => {
|
|
571
576
|
if (remote) {
|
|
572
|
-
const params = { options: opts, $table: $xeTable, $grid: $xeGrid };
|
|
577
|
+
const params = { options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt };
|
|
573
578
|
resolve(exportMethod ? exportMethod(params) : params);
|
|
574
579
|
}
|
|
575
580
|
else {
|
|
@@ -582,7 +587,7 @@ function handleExport($xeTable, opts) {
|
|
|
582
587
|
clearColumnConvert(columns);
|
|
583
588
|
if (!opts.print) {
|
|
584
589
|
if (afterExportMethod) {
|
|
585
|
-
afterExportMethod({ status: true, options: opts, $table: $xeTable, $grid: $xeGrid });
|
|
590
|
+
afterExportMethod({ status: true, options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
586
591
|
}
|
|
587
592
|
}
|
|
588
593
|
return Object.assign({ status: true }, params);
|
|
@@ -590,7 +595,7 @@ function handleExport($xeTable, opts) {
|
|
|
590
595
|
clearColumnConvert(columns);
|
|
591
596
|
if (!opts.print) {
|
|
592
597
|
if (afterExportMethod) {
|
|
593
|
-
afterExportMethod({ status: false, options: opts, $table: $xeTable, $grid: $xeGrid });
|
|
598
|
+
afterExportMethod({ status: false, options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
594
599
|
}
|
|
595
600
|
}
|
|
596
601
|
const params = { status: false };
|
|
@@ -930,6 +935,8 @@ function handleExportAndPrint($xeTable, options, isPrint) {
|
|
|
930
935
|
const reactData = $xeTable;
|
|
931
936
|
const internalData = $xeTable;
|
|
932
937
|
const $xeGrid = $xeTable.$xeGrid;
|
|
938
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
939
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
933
940
|
const { treeConfig, showHeader, showFooter } = props;
|
|
934
941
|
const { initStore, isGroup, footerTableData, exportStore, exportParams } = reactData;
|
|
935
942
|
const { collectColumn, mergeBodyList, mergeFooterList } = internalData;
|
|
@@ -937,7 +944,7 @@ function handleExportAndPrint($xeTable, options, isPrint) {
|
|
|
937
944
|
const hasTree = treeConfig;
|
|
938
945
|
const customOpts = $xeTable.computeCustomOpts;
|
|
939
946
|
const selectRecords = $xeTable.getCheckboxRecords();
|
|
940
|
-
const proxyOpts = $
|
|
947
|
+
const proxyOpts = $xeGGWrapper ? $xeGGWrapper.computeProxyOpts : {};
|
|
941
948
|
const hasFooter = !!footerTableData.length;
|
|
942
949
|
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length);
|
|
943
950
|
const defOpts = Object.assign({
|
|
@@ -1014,7 +1021,8 @@ function handleExportAndPrint($xeTable, options, isPrint) {
|
|
|
1014
1021
|
exportParams.filename = filename({
|
|
1015
1022
|
options: defOpts,
|
|
1016
1023
|
$table: $xeTable,
|
|
1017
|
-
$grid: $xeGrid
|
|
1024
|
+
$grid: $xeGrid,
|
|
1025
|
+
$gantt: $xeGantt
|
|
1018
1026
|
});
|
|
1019
1027
|
}
|
|
1020
1028
|
else {
|
|
@@ -1026,7 +1034,8 @@ function handleExportAndPrint($xeTable, options, isPrint) {
|
|
|
1026
1034
|
exportParams.sheetName = sheetName({
|
|
1027
1035
|
options: defOpts,
|
|
1028
1036
|
$table: $xeTable,
|
|
1029
|
-
$grid: $xeGrid
|
|
1037
|
+
$grid: $xeGrid,
|
|
1038
|
+
$gantt: $xeGantt
|
|
1030
1039
|
});
|
|
1031
1040
|
}
|
|
1032
1041
|
else {
|
|
@@ -1111,12 +1120,13 @@ export default {
|
|
|
1111
1120
|
const internalData = $xeTable;
|
|
1112
1121
|
const $xeGrid = $xeTable.$xeGrid;
|
|
1113
1122
|
const $xeGantt = $xeTable.$xeGantt;
|
|
1123
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
1114
1124
|
const { treeConfig, showHeader, showFooter } = props;
|
|
1115
1125
|
const { isGroup } = reactData;
|
|
1116
1126
|
const { tableFullColumn, afterFullData, afterTreeFullData, collectColumn, mergeBodyList, mergeFooterList } = internalData;
|
|
1117
1127
|
const exportOpts = $xeTable.computeExportOpts;
|
|
1118
1128
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
1119
|
-
const proxyOpts = $
|
|
1129
|
+
const proxyOpts = $xeGGWrapper ? $xeGGWrapper.computeProxyOpts : {};
|
|
1120
1130
|
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length);
|
|
1121
1131
|
const opts = Object.assign({
|
|
1122
1132
|
message: true,
|
|
@@ -1223,14 +1233,14 @@ export default {
|
|
|
1223
1233
|
}, {
|
|
1224
1234
|
children: 'childNodes',
|
|
1225
1235
|
mapChildren: '_children'
|
|
1226
|
-
}), (column, index) => isColumnInfo(column) && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, column: column, $columnIndex: index })), {
|
|
1236
|
+
}), (column, index) => isColumnInfo(column) && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column: column, $columnIndex: index })), {
|
|
1227
1237
|
children: '_children',
|
|
1228
1238
|
mapChildren: 'childNodes',
|
|
1229
1239
|
original: true
|
|
1230
1240
|
});
|
|
1231
1241
|
}
|
|
1232
1242
|
else {
|
|
1233
|
-
groups = XEUtils.searchTree(isGroup ? collectColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, column, $columnIndex: index })), { children: 'children', mapChildren: 'childNodes', original: true });
|
|
1243
|
+
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 });
|
|
1234
1244
|
}
|
|
1235
1245
|
// 获取所有列
|
|
1236
1246
|
const cols = [];
|
|
@@ -1248,7 +1258,8 @@ export default {
|
|
|
1248
1258
|
handleOptions.filename = filename({
|
|
1249
1259
|
options: opts,
|
|
1250
1260
|
$table: $xeTable,
|
|
1251
|
-
$grid: $xeGrid
|
|
1261
|
+
$grid: $xeGrid,
|
|
1262
|
+
$gantt: $xeGantt
|
|
1252
1263
|
});
|
|
1253
1264
|
}
|
|
1254
1265
|
else {
|
|
@@ -1263,7 +1274,8 @@ export default {
|
|
|
1263
1274
|
handleOptions.sheetName = sheetName({
|
|
1264
1275
|
options: opts,
|
|
1265
1276
|
$table: $xeTable,
|
|
1266
|
-
$grid: $xeGrid
|
|
1277
|
+
$grid: $xeGrid,
|
|
1278
|
+
$gantt: $xeGantt
|
|
1267
1279
|
});
|
|
1268
1280
|
}
|
|
1269
1281
|
else {
|
|
@@ -1284,7 +1296,7 @@ export default {
|
|
|
1284
1296
|
}
|
|
1285
1297
|
if (!handleOptions.print) {
|
|
1286
1298
|
if (beforeExportMethod) {
|
|
1287
|
-
beforeExportMethod({ options: handleOptions, $table: $xeTable, $grid: $xeGrid });
|
|
1299
|
+
beforeExportMethod({ options: handleOptions, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
1288
1300
|
}
|
|
1289
1301
|
}
|
|
1290
1302
|
if (!handleOptions.data) {
|
|
@@ -1298,12 +1310,12 @@ export default {
|
|
|
1298
1310
|
}
|
|
1299
1311
|
}
|
|
1300
1312
|
else if (mode === 'all') {
|
|
1301
|
-
if (!$
|
|
1313
|
+
if (!$xeGGWrapper) {
|
|
1302
1314
|
errLog('vxe.error.errProp', ['all', 'mode=current,selected']);
|
|
1303
1315
|
}
|
|
1304
|
-
if ($
|
|
1305
|
-
const gridReactData = $
|
|
1306
|
-
const proxyOpts = $
|
|
1316
|
+
if ($xeGGWrapper && !handleOptions.remote) {
|
|
1317
|
+
const gridReactData = $xeGGWrapper;
|
|
1318
|
+
const proxyOpts = $xeGGWrapper.computeProxyOpts;
|
|
1307
1319
|
const { sortData } = gridReactData;
|
|
1308
1320
|
const { beforeQueryAll, afterQueryAll, ajax = {} } = proxyOpts;
|
|
1309
1321
|
const resConfigs = proxyOpts.response || proxyOpts.props || {};
|
|
@@ -1393,10 +1405,12 @@ export default {
|
|
|
1393
1405
|
_print(options) {
|
|
1394
1406
|
const $xeTable = this;
|
|
1395
1407
|
const $xeGrid = $xeTable.$xeGrid;
|
|
1408
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
1409
|
+
const printOpts = $xeTable.computePrintOpts;
|
|
1396
1410
|
const opts = Object.assign({
|
|
1397
1411
|
original: false
|
|
1398
1412
|
// beforePrintMethod
|
|
1399
|
-
},
|
|
1413
|
+
}, printOpts, options, {
|
|
1400
1414
|
type: 'html',
|
|
1401
1415
|
download: false,
|
|
1402
1416
|
remote: false,
|
|
@@ -1409,7 +1423,8 @@ export default {
|
|
|
1409
1423
|
printTitle = sheetName({
|
|
1410
1424
|
options: opts,
|
|
1411
1425
|
$table: $xeTable,
|
|
1412
|
-
$grid: $xeGrid
|
|
1426
|
+
$grid: $xeGrid,
|
|
1427
|
+
$gantt: $xeGantt
|
|
1413
1428
|
});
|
|
1414
1429
|
}
|
|
1415
1430
|
else {
|
|
@@ -1434,7 +1449,9 @@ export default {
|
|
|
1434
1449
|
html,
|
|
1435
1450
|
content: html,
|
|
1436
1451
|
options: opts,
|
|
1437
|
-
$table: $xeTable
|
|
1452
|
+
$table: $xeTable,
|
|
1453
|
+
$grid: $xeGrid,
|
|
1454
|
+
$gantt: $xeGantt
|
|
1438
1455
|
});
|
|
1439
1456
|
}
|
|
1440
1457
|
: undefined
|
|
@@ -1452,7 +1469,9 @@ export default {
|
|
|
1452
1469
|
html,
|
|
1453
1470
|
content: html,
|
|
1454
1471
|
options: opts,
|
|
1455
|
-
$table: $xeTable
|
|
1472
|
+
$table: $xeTable,
|
|
1473
|
+
$grid: $xeGrid,
|
|
1474
|
+
$gantt: $xeGantt
|
|
1456
1475
|
});
|
|
1457
1476
|
}
|
|
1458
1477
|
: undefined
|
|
@@ -60,6 +60,7 @@ export default {
|
|
|
60
60
|
handleGlobalContextmenuEvent(evnt) {
|
|
61
61
|
const $xeTable = this;
|
|
62
62
|
const $xeGrid = $xeTable.$xeGrid;
|
|
63
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
63
64
|
const internalData = $xeTable;
|
|
64
65
|
const { $refs, tId, editStore, menuConfig, contextMenu, ctxMenuStore, ctxMenuOpts, mouseConfig, mouseOpts } = this;
|
|
65
66
|
const { selected } = editStore;
|
|
@@ -72,7 +73,7 @@ export default {
|
|
|
72
73
|
}
|
|
73
74
|
if (internalData._keyCtx) {
|
|
74
75
|
const type = 'body';
|
|
75
|
-
const params = { type, $grid: $xeGrid, $
|
|
76
|
+
const params = { type, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, keyboard: true, columns: this.visibleColumn.slice(0), $event: evnt };
|
|
76
77
|
// 如果开启单元格区域
|
|
77
78
|
if (mouseConfig && mouseOpts.area) {
|
|
78
79
|
const activeArea = this.getActiveCellArea();
|
|
@@ -100,7 +101,7 @@ export default {
|
|
|
100
101
|
// target=td|th,直接向上找 table 去匹配即可
|
|
101
102
|
return target.parentNode.parentNode.parentNode.getAttribute('xid') === tId;
|
|
102
103
|
});
|
|
103
|
-
const params = { type: layout, $grid: $xeGrid, $
|
|
104
|
+
const params = { type: layout, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, columns: this.visibleColumn.slice(0), $event: evnt };
|
|
104
105
|
if (columnTargetNode.flag) {
|
|
105
106
|
const cell = columnTargetNode.targetElem;
|
|
106
107
|
const column = this.getColumnNode(cell).item;
|
|
@@ -263,10 +264,11 @@ export default {
|
|
|
263
264
|
ctxMenuLinkEvent(evnt, menu) {
|
|
264
265
|
const $xeTable = this;
|
|
265
266
|
const $xeGrid = $xeTable.$xeGrid;
|
|
267
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
266
268
|
// 如果一级菜单有配置 code 则允许点击,否则不能点击
|
|
267
269
|
if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
268
270
|
const gMenuOpts = menus.get(menu.code);
|
|
269
|
-
const params = Object.assign({ menu, $grid: $xeGrid, $
|
|
271
|
+
const params = Object.assign({ menu, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt }, this.ctxMenuStore.args);
|
|
270
272
|
if (gMenuOpts && gMenuOpts.menuMethod) {
|
|
271
273
|
gMenuOpts.menuMethod(params, evnt);
|
|
272
274
|
}
|
package/es/table/src/body.js
CHANGED
|
@@ -60,6 +60,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
|
|
|
60
60
|
const tableReactData = $xeTable;
|
|
61
61
|
const tableInternalData = $xeTable;
|
|
62
62
|
const $xeGrid = $xeTable.$xeGrid;
|
|
63
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
63
64
|
const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, treeConfig, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps;
|
|
64
65
|
const { tableData, tableColumn, dragRow, overflowX, overflowY, currentColumn, scrollXLoad, scrollYLoad, mergeBodyFlag, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, editStore, isAllOverflow, validErrorMaps } = tableReactData;
|
|
65
66
|
const { fullAllDataRowIdData, fullColumnIdData, mergeBodyCellMaps, visibleColumn, afterFullData, mergeBodyList, scrollXStore, scrollYStore } = tableInternalData;
|
|
@@ -116,6 +117,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
|
|
|
116
117
|
const cellParams = {
|
|
117
118
|
$table: $xeTable,
|
|
118
119
|
$grid: $xeGrid,
|
|
120
|
+
$gantt: $xeGantt,
|
|
119
121
|
isEdit: false,
|
|
120
122
|
seq,
|
|
121
123
|
rowid,
|
|
@@ -417,6 +419,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
417
419
|
const tableReactData = $xeTable;
|
|
418
420
|
const tableInternalData = $xeTable;
|
|
419
421
|
const $xeGrid = $xeTable.$xeGrid;
|
|
422
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
420
423
|
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps;
|
|
421
424
|
const { hasFixedColumn, treeExpandedFlag, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData;
|
|
422
425
|
const { fullAllDataRowIdData, fullColumnIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps } = tableInternalData;
|
|
@@ -562,6 +565,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
562
565
|
const expandParams = {
|
|
563
566
|
$grid: $xeGrid,
|
|
564
567
|
$table: $xeTable,
|
|
568
|
+
$gantt: $xeGantt,
|
|
565
569
|
seq,
|
|
566
570
|
column: expandColumn,
|
|
567
571
|
columnIndex,
|
|
@@ -666,6 +670,7 @@ export default {
|
|
|
666
670
|
const tableReactData = $xeTable;
|
|
667
671
|
const tableInternalData = $xeTable;
|
|
668
672
|
const $xeGrid = $xeTable.$xeGrid;
|
|
673
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
669
674
|
const slots = $xeTable.$scopedSlots;
|
|
670
675
|
const { xID } = $xeTable;
|
|
671
676
|
const { fixedColumn, fixedType, tableColumn } = props;
|
|
@@ -745,7 +750,7 @@ export default {
|
|
|
745
750
|
}
|
|
746
751
|
let emptyContent;
|
|
747
752
|
const emptySlot = slots ? slots.empty : null;
|
|
748
|
-
const emptyParams = { $table: $xeTable, $grid: $xeGrid };
|
|
753
|
+
const emptyParams = { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt };
|
|
749
754
|
if (emptySlot) {
|
|
750
755
|
emptyContent = emptySlot.call($xeTable, emptyParams);
|
|
751
756
|
}
|
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;
|
|
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 proxyOpts = $xeGrid ? $xeGrid.computeProxyOpts : null;
|
|
14
16
|
const formatter = _vm.formatter;
|
|
@@ -158,8 +160,10 @@ export class ColumnInfo {
|
|
|
158
160
|
// 单元格插槽,只对 grid 有效
|
|
159
161
|
slots: _vm.slots
|
|
160
162
|
});
|
|
161
|
-
if (
|
|
162
|
-
proxyOpts.beforeColumn
|
|
163
|
+
if ($xeGGWrapper) {
|
|
164
|
+
if (proxyOpts && proxyOpts.beforeColumn) {
|
|
165
|
+
proxyOpts.beforeColumn({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column: this });
|
|
166
|
+
}
|
|
163
167
|
}
|
|
164
168
|
}
|
|
165
169
|
getTitle() {
|
package/es/table/src/footer.js
CHANGED
|
@@ -12,6 +12,7 @@ function renderRows(h, _vm, isOptimizeMode, tableColumn, footerTableData, row, $
|
|
|
12
12
|
const tableReactData = $xeTable;
|
|
13
13
|
const tableInternalData = $xeTable;
|
|
14
14
|
const $xeGrid = $xeTable.$xeGrid;
|
|
15
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
15
16
|
const { fixedType } = props;
|
|
16
17
|
const { resizable: allResizable, border, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps;
|
|
17
18
|
const { scrollXLoad, scrollYLoad, overflowX, currentColumn, mergeFootFlag } = tableReactData;
|
|
@@ -49,6 +50,7 @@ function renderRows(h, _vm, isOptimizeMode, tableColumn, footerTableData, row, $
|
|
|
49
50
|
const cellParams = {
|
|
50
51
|
$table: $xeTable,
|
|
51
52
|
$grid: $xeGrid,
|
|
53
|
+
$gantt: $xeGantt,
|
|
52
54
|
row,
|
|
53
55
|
rowIndex: _rowIndex,
|
|
54
56
|
_rowIndex,
|
package/es/table/src/group.js
CHANGED
package/es/table/src/header.js
CHANGED
|
@@ -8,6 +8,7 @@ const renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) => {
|
|
|
8
8
|
const props = _vm;
|
|
9
9
|
const $xeTable = _vm.$parent;
|
|
10
10
|
const $xeGrid = $xeTable.$xeGrid;
|
|
11
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
11
12
|
const tableProps = $xeTable;
|
|
12
13
|
const tableReactData = $xeTable;
|
|
13
14
|
const tableInternalData = $xeTable;
|
|
@@ -50,6 +51,7 @@ const renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) => {
|
|
|
50
51
|
const cellParams = {
|
|
51
52
|
$table: $xeTable,
|
|
52
53
|
$grid: $xeGrid,
|
|
54
|
+
$gantt: $xeGantt,
|
|
53
55
|
$rowIndex,
|
|
54
56
|
column,
|
|
55
57
|
columnIndex,
|