vxe-table 3.18.0-beta.0 → 3.18.0-beta.2
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 +3 -1
- package/es/style.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 +39 -20
- package/es/table/src/table.js +13 -5
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +3 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +161 -58
- package/lib/index.umd.min.js +1 -1
- package/lib/style.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 +44 -21
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +15 -3
- 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 +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 +50 -31
- package/packages/table/src/table.ts +13 -5
- /package/es/{iconfont.1755178463571.ttf → iconfont.1755245623987.ttf} +0 -0
- /package/es/{iconfont.1755178463571.woff → iconfont.1755245623987.woff} +0 -0
- /package/es/{iconfont.1755178463571.woff2 → iconfont.1755245623987.woff2} +0 -0
- /package/lib/{iconfont.1755178463571.ttf → iconfont.1755245623987.ttf} +0 -0
- /package/lib/{iconfont.1755178463571.woff → iconfont.1755245623987.woff} +0 -0
- /package/lib/{iconfont.1755178463571.woff2 → iconfont.1755245623987.woff2} +0 -0
|
@@ -212,10 +212,13 @@ function getBodyLabelData ($xeTable: VxeTableConstructor, opts: VxeTablePropType
|
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
function getExportData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, opts: VxeTablePropTypes.ExportHandleOptions) {
|
|
215
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
216
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
217
|
+
|
|
215
218
|
const { columns, dataFilterMethod } = opts
|
|
216
219
|
let datas = opts.data
|
|
217
220
|
if (dataFilterMethod) {
|
|
218
|
-
datas = datas.filter((row, index) => dataFilterMethod({ $table: $xeTable, row, $rowIndex: index }))
|
|
221
|
+
datas = datas.filter((row, index) => dataFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, row, $rowIndex: index }))
|
|
219
222
|
}
|
|
220
223
|
return getBodyLabelData($xeTable, opts, columns, datas)
|
|
221
224
|
}
|
|
@@ -255,8 +258,11 @@ function getFooterCellValue ($xeTable: any, opts: VxeTablePropTypes.ExportHandle
|
|
|
255
258
|
}
|
|
256
259
|
|
|
257
260
|
function getFooterData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, opts: VxeTablePropTypes.ExportHandleOptions, footerTableData: any[]) {
|
|
261
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
262
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
263
|
+
|
|
258
264
|
const { footerFilterMethod } = opts
|
|
259
|
-
return footerFilterMethod ? footerTableData.filter((items: any, index: any) => footerFilterMethod({ $table: $xeTable, items, $rowIndex: index })) : footerTableData
|
|
265
|
+
return footerFilterMethod ? footerTableData.filter((items: any, index: any) => footerFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, items, $rowIndex: index })) : footerTableData
|
|
260
266
|
}
|
|
261
267
|
|
|
262
268
|
function getCsvCellTypeLabel (column: any, cellValue: any) {
|
|
@@ -599,11 +605,12 @@ function clearColumnConvert (columns: any) {
|
|
|
599
605
|
|
|
600
606
|
function handleExport ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, opts: VxeTablePropTypes.ExportHandleOptions) {
|
|
601
607
|
const $xeGrid = $xeTable.$xeGrid
|
|
608
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
602
609
|
|
|
603
610
|
const { remote, columns, colgroups, exportMethod, afterExportMethod } = opts
|
|
604
611
|
return new Promise(resolve => {
|
|
605
612
|
if (remote) {
|
|
606
|
-
const params = { options: opts, $table: $xeTable, $grid: $xeGrid }
|
|
613
|
+
const params = { options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }
|
|
607
614
|
resolve(exportMethod ? exportMethod(params) : params)
|
|
608
615
|
} else {
|
|
609
616
|
const datas = getExportData($xeTable, opts)
|
|
@@ -617,7 +624,7 @@ function handleExport ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, o
|
|
|
617
624
|
clearColumnConvert(columns)
|
|
618
625
|
if (!opts.print) {
|
|
619
626
|
if (afterExportMethod) {
|
|
620
|
-
afterExportMethod({ status: true, options: opts, $table: $xeTable, $grid: $xeGrid })
|
|
627
|
+
afterExportMethod({ status: true, options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt })
|
|
621
628
|
}
|
|
622
629
|
}
|
|
623
630
|
return Object.assign({ status: true }, params)
|
|
@@ -625,7 +632,7 @@ function handleExport ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, o
|
|
|
625
632
|
clearColumnConvert(columns)
|
|
626
633
|
if (!opts.print) {
|
|
627
634
|
if (afterExportMethod) {
|
|
628
|
-
afterExportMethod({ status: false, options: opts, $table: $xeTable, $grid: $xeGrid })
|
|
635
|
+
afterExportMethod({ status: false, options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt })
|
|
629
636
|
}
|
|
630
637
|
}
|
|
631
638
|
const params = { status: false }
|
|
@@ -995,6 +1002,8 @@ function handleExportAndPrint ($xeTable: VxeTableConstructor, options: VxeTableP
|
|
|
995
1002
|
const reactData = $xeTable as unknown as TableReactData
|
|
996
1003
|
const internalData = $xeTable as unknown as TableInternalData
|
|
997
1004
|
const $xeGrid = $xeTable.$xeGrid
|
|
1005
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
1006
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
998
1007
|
|
|
999
1008
|
const { treeConfig, showHeader, showFooter } = props
|
|
1000
1009
|
const { initStore, isGroup, footerTableData, exportStore, exportParams } = reactData
|
|
@@ -1003,7 +1012,7 @@ function handleExportAndPrint ($xeTable: VxeTableConstructor, options: VxeTableP
|
|
|
1003
1012
|
const hasTree = treeConfig
|
|
1004
1013
|
const customOpts = $xeTable.computeCustomOpts
|
|
1005
1014
|
const selectRecords = $xeTable.getCheckboxRecords()
|
|
1006
|
-
const proxyOpts = $
|
|
1015
|
+
const proxyOpts = $xeGGWrapper ? $xeGGWrapper.computeProxyOpts : {}
|
|
1007
1016
|
const hasFooter = !!footerTableData.length
|
|
1008
1017
|
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length)
|
|
1009
1018
|
const defOpts = Object.assign({
|
|
@@ -1078,7 +1087,8 @@ function handleExportAndPrint ($xeTable: VxeTableConstructor, options: VxeTableP
|
|
|
1078
1087
|
exportParams.filename = filename({
|
|
1079
1088
|
options: defOpts,
|
|
1080
1089
|
$table: $xeTable,
|
|
1081
|
-
$grid: $xeGrid
|
|
1090
|
+
$grid: $xeGrid,
|
|
1091
|
+
$gantt: $xeGantt
|
|
1082
1092
|
})
|
|
1083
1093
|
} else {
|
|
1084
1094
|
exportParams.filename = `${filename}`
|
|
@@ -1089,7 +1099,8 @@ function handleExportAndPrint ($xeTable: VxeTableConstructor, options: VxeTableP
|
|
|
1089
1099
|
exportParams.sheetName = sheetName({
|
|
1090
1100
|
options: defOpts,
|
|
1091
1101
|
$table: $xeTable,
|
|
1092
|
-
$grid: $xeGrid
|
|
1102
|
+
$grid: $xeGrid,
|
|
1103
|
+
$gantt: $xeGantt
|
|
1093
1104
|
})
|
|
1094
1105
|
} else {
|
|
1095
1106
|
exportParams.sheetName = `${sheetName}`
|
|
@@ -1178,13 +1189,14 @@ export default {
|
|
|
1178
1189
|
const internalData = $xeTable as unknown as TableInternalData
|
|
1179
1190
|
const $xeGrid = $xeTable.$xeGrid
|
|
1180
1191
|
const $xeGantt = $xeTable.$xeGantt
|
|
1192
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
1181
1193
|
|
|
1182
1194
|
const { treeConfig, showHeader, showFooter } = props
|
|
1183
1195
|
const { isGroup } = reactData
|
|
1184
1196
|
const { tableFullColumn, afterFullData, afterTreeFullData, collectColumn, mergeBodyList, mergeFooterList } = internalData
|
|
1185
1197
|
const exportOpts = $xeTable.computeExportOpts
|
|
1186
1198
|
const treeOpts = $xeTable.computeTreeOpts
|
|
1187
|
-
const proxyOpts = $
|
|
1199
|
+
const proxyOpts = $xeGGWrapper ? $xeGGWrapper.computeProxyOpts : {}
|
|
1188
1200
|
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length)
|
|
1189
1201
|
const opts = Object.assign({
|
|
1190
1202
|
message: true,
|
|
@@ -1285,7 +1297,7 @@ export default {
|
|
|
1285
1297
|
children: 'childNodes',
|
|
1286
1298
|
mapChildren: '_children'
|
|
1287
1299
|
}),
|
|
1288
|
-
(column, index) => isColumnInfo(column) && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, column: column as any, $columnIndex: index })),
|
|
1300
|
+
(column, index) => isColumnInfo(column) && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column: column as any, $columnIndex: index })),
|
|
1289
1301
|
{
|
|
1290
1302
|
children: '_children',
|
|
1291
1303
|
mapChildren: 'childNodes',
|
|
@@ -1293,7 +1305,7 @@ export default {
|
|
|
1293
1305
|
}
|
|
1294
1306
|
)
|
|
1295
1307
|
} else {
|
|
1296
|
-
groups = XEUtils.searchTree(isGroup ? collectColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, column, $columnIndex: index })), { children: 'children', mapChildren: 'childNodes', original: true })
|
|
1308
|
+
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 })
|
|
1297
1309
|
}
|
|
1298
1310
|
// 获取所有列
|
|
1299
1311
|
const cols: VxeTableDefines.ColumnInfo[] = []
|
|
@@ -1311,7 +1323,8 @@ export default {
|
|
|
1311
1323
|
handleOptions.filename = filename({
|
|
1312
1324
|
options: opts,
|
|
1313
1325
|
$table: $xeTable,
|
|
1314
|
-
$grid: $xeGrid
|
|
1326
|
+
$grid: $xeGrid,
|
|
1327
|
+
$gantt: $xeGantt
|
|
1315
1328
|
})
|
|
1316
1329
|
} else {
|
|
1317
1330
|
handleOptions.filename = `${filename}`
|
|
@@ -1326,7 +1339,8 @@ export default {
|
|
|
1326
1339
|
handleOptions.sheetName = sheetName({
|
|
1327
1340
|
options: opts,
|
|
1328
1341
|
$table: $xeTable,
|
|
1329
|
-
$grid: $xeGrid
|
|
1342
|
+
$grid: $xeGrid,
|
|
1343
|
+
$gantt: $xeGantt
|
|
1330
1344
|
})
|
|
1331
1345
|
} else {
|
|
1332
1346
|
handleOptions.sheetName = `${sheetName}`
|
|
@@ -1348,7 +1362,7 @@ export default {
|
|
|
1348
1362
|
|
|
1349
1363
|
if (!handleOptions.print) {
|
|
1350
1364
|
if (beforeExportMethod) {
|
|
1351
|
-
beforeExportMethod({ options: handleOptions, $table: $xeTable, $grid: $xeGrid })
|
|
1365
|
+
beforeExportMethod({ options: handleOptions, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt })
|
|
1352
1366
|
}
|
|
1353
1367
|
}
|
|
1354
1368
|
|
|
@@ -1361,13 +1375,13 @@ export default {
|
|
|
1361
1375
|
handleOptions.data = selectRecords
|
|
1362
1376
|
}
|
|
1363
1377
|
} else if (mode === 'all') {
|
|
1364
|
-
if (!$
|
|
1378
|
+
if (!$xeGGWrapper) {
|
|
1365
1379
|
errLog('vxe.error.errProp', ['all', 'mode=current,selected'])
|
|
1366
1380
|
}
|
|
1367
1381
|
|
|
1368
|
-
if ($
|
|
1369
|
-
const gridReactData = $
|
|
1370
|
-
const proxyOpts = $
|
|
1382
|
+
if ($xeGGWrapper && !handleOptions.remote) {
|
|
1383
|
+
const gridReactData = $xeGGWrapper as unknown as GridReactData
|
|
1384
|
+
const proxyOpts = $xeGGWrapper.computeProxyOpts
|
|
1371
1385
|
const { sortData } = gridReactData
|
|
1372
1386
|
const { beforeQueryAll, afterQueryAll, ajax = {} } = proxyOpts
|
|
1373
1387
|
const resConfigs = proxyOpts.response || proxyOpts.props || {}
|
|
@@ -1467,11 +1481,13 @@ export default {
|
|
|
1467
1481
|
_print (options?: VxeTablePropTypes.PrintConfig) {
|
|
1468
1482
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
1469
1483
|
const $xeGrid = $xeTable.$xeGrid
|
|
1484
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
1470
1485
|
|
|
1486
|
+
const printOpts = $xeTable.computePrintOpts
|
|
1471
1487
|
const opts = Object.assign({
|
|
1472
1488
|
original: false
|
|
1473
1489
|
// beforePrintMethod
|
|
1474
|
-
},
|
|
1490
|
+
}, printOpts, options, {
|
|
1475
1491
|
type: 'html',
|
|
1476
1492
|
download: false,
|
|
1477
1493
|
remote: false,
|
|
@@ -1485,7 +1501,8 @@ export default {
|
|
|
1485
1501
|
printTitle = sheetName({
|
|
1486
1502
|
options: opts,
|
|
1487
1503
|
$table: $xeTable,
|
|
1488
|
-
$grid: $xeGrid
|
|
1504
|
+
$grid: $xeGrid,
|
|
1505
|
+
$gantt: $xeGantt
|
|
1489
1506
|
})
|
|
1490
1507
|
} else {
|
|
1491
1508
|
printTitle = `${sheetName}`
|
|
@@ -1511,7 +1528,9 @@ export default {
|
|
|
1511
1528
|
html,
|
|
1512
1529
|
content: html,
|
|
1513
1530
|
options: opts,
|
|
1514
|
-
$table: $xeTable
|
|
1531
|
+
$table: $xeTable,
|
|
1532
|
+
$grid: $xeGrid,
|
|
1533
|
+
$gantt: $xeGantt
|
|
1515
1534
|
})
|
|
1516
1535
|
}
|
|
1517
1536
|
: undefined
|
|
@@ -1530,7 +1549,9 @@ export default {
|
|
|
1530
1549
|
html,
|
|
1531
1550
|
content: html,
|
|
1532
1551
|
options: opts,
|
|
1533
|
-
$table: $xeTable
|
|
1552
|
+
$table: $xeTable,
|
|
1553
|
+
$grid: $xeGrid,
|
|
1554
|
+
$gantt: $xeGantt
|
|
1534
1555
|
})
|
|
1535
1556
|
}
|
|
1536
1557
|
: undefined
|
|
@@ -4,7 +4,7 @@ import { getDomNode, getAbsolutePos, getEventTargetNode } from '../../../ui/src/
|
|
|
4
4
|
import { isEnableConf, hasChildrenList } from '../../../ui/src/utils'
|
|
5
5
|
import { warnLog } from '../../../ui/src/log'
|
|
6
6
|
|
|
7
|
-
import type { VxeTableConstructor, VxeTablePrivateMethods,
|
|
7
|
+
import type { VxeTableConstructor, VxeTablePrivateMethods, TableInternalData } from '../../../../types'
|
|
8
8
|
|
|
9
9
|
const { menus, globalEvents, GLOBAL_EVENT_KEYS } = VxeUI
|
|
10
10
|
|
|
@@ -60,7 +60,8 @@ export default {
|
|
|
60
60
|
*/
|
|
61
61
|
handleGlobalContextmenuEvent (evnt: any) {
|
|
62
62
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
63
|
-
const $xeGrid = $xeTable.$xeGrid
|
|
63
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
64
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
64
65
|
const internalData = $xeTable as unknown as TableInternalData
|
|
65
66
|
|
|
66
67
|
const { $refs, tId, editStore, menuConfig, contextMenu, ctxMenuStore, ctxMenuOpts, mouseConfig, mouseOpts } = this
|
|
@@ -74,7 +75,7 @@ export default {
|
|
|
74
75
|
}
|
|
75
76
|
if (internalData._keyCtx) {
|
|
76
77
|
const type = 'body'
|
|
77
|
-
const params: any = { type, $grid: $xeGrid, $
|
|
78
|
+
const params: any = { type, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, keyboard: true, columns: this.visibleColumn.slice(0), $event: evnt }
|
|
78
79
|
// 如果开启单元格区域
|
|
79
80
|
if (mouseConfig && mouseOpts.area) {
|
|
80
81
|
const activeArea = this.getActiveCellArea()
|
|
@@ -101,7 +102,7 @@ export default {
|
|
|
101
102
|
// target=td|th,直接向上找 table 去匹配即可
|
|
102
103
|
return target.parentNode.parentNode.parentNode.getAttribute('xid') === tId
|
|
103
104
|
})
|
|
104
|
-
const params: any = { type: layout, $grid: $xeGrid, $
|
|
105
|
+
const params: any = { type: layout, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, columns: this.visibleColumn.slice(0), $event: evnt }
|
|
105
106
|
if (columnTargetNode.flag) {
|
|
106
107
|
const cell = columnTargetNode.targetElem
|
|
107
108
|
const column = this.getColumnNode(cell).item
|
|
@@ -257,12 +258,13 @@ export default {
|
|
|
257
258
|
*/
|
|
258
259
|
ctxMenuLinkEvent (evnt: any, menu: any) {
|
|
259
260
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
260
|
-
const $xeGrid = $xeTable.$xeGrid
|
|
261
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
262
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
261
263
|
|
|
262
264
|
// 如果一级菜单有配置 code 则允许点击,否则不能点击
|
|
263
265
|
if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
264
266
|
const gMenuOpts = menus.get(menu.code)
|
|
265
|
-
const params = Object.assign({ menu, $grid: $xeGrid, $
|
|
267
|
+
const params = Object.assign({ menu, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt }, this.ctxMenuStore.args)
|
|
266
268
|
if (gMenuOpts && gMenuOpts.menuMethod) {
|
|
267
269
|
gMenuOpts.menuMethod(params, evnt)
|
|
268
270
|
}
|
|
@@ -86,6 +86,7 @@ function renderTdColumn (
|
|
|
86
86
|
const tableReactData = $xeTable as unknown as TableReactData
|
|
87
87
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
88
88
|
const $xeGrid = $xeTable.$xeGrid
|
|
89
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
89
90
|
|
|
90
91
|
const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, treeConfig, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps
|
|
91
92
|
const { tableData, tableColumn, dragRow, overflowX, overflowY, currentColumn, scrollXLoad, scrollYLoad, mergeBodyFlag, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, editStore, isAllOverflow, validErrorMaps } = tableReactData
|
|
@@ -145,6 +146,7 @@ function renderTdColumn (
|
|
|
145
146
|
} = {
|
|
146
147
|
$table: $xeTable,
|
|
147
148
|
$grid: $xeGrid,
|
|
149
|
+
$gantt: $xeGantt,
|
|
148
150
|
isEdit: false,
|
|
149
151
|
seq,
|
|
150
152
|
rowid,
|
|
@@ -462,6 +464,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
462
464
|
const tableReactData = $xeTable as unknown as TableReactData
|
|
463
465
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
464
466
|
const $xeGrid = $xeTable.$xeGrid
|
|
467
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
465
468
|
|
|
466
469
|
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps
|
|
467
470
|
const { hasFixedColumn, treeExpandedFlag, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData
|
|
@@ -610,6 +613,7 @@ function renderRows (h: CreateElement, _vm: any, fixedType: 'left' | 'right' | '
|
|
|
610
613
|
const expandParams: VxeTableDefines.CellRenderDataParams = {
|
|
611
614
|
$grid: $xeGrid,
|
|
612
615
|
$table: $xeTable,
|
|
616
|
+
$gantt: $xeGantt,
|
|
613
617
|
seq,
|
|
614
618
|
column: expandColumn as VxeTableDefines.ColumnInfo,
|
|
615
619
|
columnIndex,
|
|
@@ -719,6 +723,7 @@ export default {
|
|
|
719
723
|
const tableReactData = $xeTable as unknown as TableReactData
|
|
720
724
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
721
725
|
const $xeGrid = $xeTable.$xeGrid
|
|
726
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
722
727
|
const slots = $xeTable.$scopedSlots
|
|
723
728
|
|
|
724
729
|
const { xID } = $xeTable
|
|
@@ -803,7 +808,7 @@ export default {
|
|
|
803
808
|
|
|
804
809
|
let emptyContent
|
|
805
810
|
const emptySlot = slots ? slots.empty : null
|
|
806
|
-
const emptyParams = { $table: $xeTable, $grid: $xeGrid }
|
|
811
|
+
const emptyParams = { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }
|
|
807
812
|
if (emptySlot) {
|
|
808
813
|
emptyContent = emptySlot.call($xeTable, emptyParams)
|
|
809
814
|
} else {
|
|
@@ -4,7 +4,7 @@ import { toFilters } from './util'
|
|
|
4
4
|
import { getFuncText } from '../../ui/src/utils'
|
|
5
5
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
6
6
|
|
|
7
|
-
import type { VxeTableConstructor, VxeTablePrivateMethods
|
|
7
|
+
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types'
|
|
8
8
|
|
|
9
9
|
const { getI18n, formats } = VxeUI
|
|
10
10
|
|
|
@@ -12,7 +12,9 @@ export class ColumnInfo {
|
|
|
12
12
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
13
13
|
constructor ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, _vm: any, { renderHeader, renderCell, renderFooter, renderData }: any = {}) {
|
|
14
14
|
const tableProps = $xeTable
|
|
15
|
-
const $xeGrid = $xeTable.$xeGrid
|
|
15
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
16
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
17
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
16
18
|
|
|
17
19
|
const { field, editRender } = _vm
|
|
18
20
|
|
|
@@ -174,8 +176,10 @@ export class ColumnInfo {
|
|
|
174
176
|
// 单元格插槽,只对 grid 有效
|
|
175
177
|
slots: _vm.slots
|
|
176
178
|
})
|
|
177
|
-
if (
|
|
178
|
-
proxyOpts.beforeColumn
|
|
179
|
+
if ($xeGGWrapper) {
|
|
180
|
+
if (proxyOpts && proxyOpts.beforeColumn) {
|
|
181
|
+
proxyOpts.beforeColumn({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column: this })
|
|
182
|
+
}
|
|
179
183
|
}
|
|
180
184
|
}
|
|
181
185
|
|
|
@@ -18,6 +18,7 @@ function renderRows (h: CreateElement, _vm: any, isOptimizeMode: boolean, tableC
|
|
|
18
18
|
const tableReactData = $xeTable as unknown as TableReactData
|
|
19
19
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
20
20
|
const $xeGrid = $xeTable.$xeGrid
|
|
21
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
21
22
|
|
|
22
23
|
const { fixedType } = props
|
|
23
24
|
const { resizable: allResizable, border, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps
|
|
@@ -59,6 +60,7 @@ function renderRows (h: CreateElement, _vm: any, isOptimizeMode: boolean, tableC
|
|
|
59
60
|
} = {
|
|
60
61
|
$table: $xeTable,
|
|
61
62
|
$grid: $xeGrid,
|
|
63
|
+
$gantt: $xeGantt,
|
|
62
64
|
row,
|
|
63
65
|
rowIndex: _rowIndex,
|
|
64
66
|
_rowIndex,
|
|
@@ -14,6 +14,7 @@ const renderRows = (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode
|
|
|
14
14
|
const props = _vm
|
|
15
15
|
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
16
16
|
const $xeGrid = $xeTable.$xeGrid
|
|
17
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
17
18
|
const tableProps = $xeTable
|
|
18
19
|
const tableReactData = $xeTable as unknown as TableReactData
|
|
19
20
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
@@ -54,9 +55,12 @@ const renderRows = (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode
|
|
|
54
55
|
}
|
|
55
56
|
const columnIndex = colRest.index
|
|
56
57
|
const _columnIndex = colRest._index
|
|
57
|
-
const cellParams
|
|
58
|
+
const cellParams: VxeTableDefines.CellRenderHeaderParams & {
|
|
59
|
+
$table: VxeTableConstructor & VxeTablePrivateMethods
|
|
60
|
+
} = {
|
|
58
61
|
$table: $xeTable,
|
|
59
62
|
$grid: $xeGrid,
|
|
63
|
+
$gantt: $xeGantt,
|
|
60
64
|
$rowIndex,
|
|
61
65
|
column,
|
|
62
66
|
columnIndex,
|
|
@@ -8,7 +8,7 @@ import { getSlotVNs } from '../../ui/src/vn'
|
|
|
8
8
|
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from './anime'
|
|
9
9
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
10
10
|
|
|
11
|
-
import type { VxeTableDefines, VxeColumnPropTypes, VxeTableEmits, ValueOf, TableReactData, VxeTableConstructor, VxeToolbarConstructor, VxeToolbarInstance, TableInternalData, VxeGridConstructor,
|
|
11
|
+
import type { VxeTableDefines, VxeColumnPropTypes, VxeTableEmits, ValueOf, TableReactData, VxeTableConstructor, VxeToolbarConstructor, VxeToolbarInstance, TableInternalData, VxeGridConstructor, VxeTablePrivateMethods, VxeTooltipInstance, VxeTablePropTypes, VxeGridPrivateMethods } from '../../../types'
|
|
12
12
|
|
|
13
13
|
const { getConfig, getI18n, renderer, formats, interceptor, createEvent } = VxeUI
|
|
14
14
|
|
|
@@ -414,6 +414,7 @@ function updateScrollYStatus ($xeTable: VxeTableConstructor & VxeTablePrivateMet
|
|
|
414
414
|
const internalData = $xeTable as unknown as TableInternalData
|
|
415
415
|
|
|
416
416
|
const { treeConfig } = props
|
|
417
|
+
const $xeGanttView = internalData.xeGanttView
|
|
417
418
|
const virtualYOpts = $xeTable.computeVirtualYOpts
|
|
418
419
|
const treeOpts = $xeTable.computeTreeOpts
|
|
419
420
|
const { transform } = treeOpts
|
|
@@ -421,6 +422,9 @@ function updateScrollYStatus ($xeTable: VxeTableConstructor & VxeTablePrivateMet
|
|
|
421
422
|
// 如果gt为0,则总是启用
|
|
422
423
|
const scrollYLoad = (transform || !treeConfig) && !!virtualYOpts.enabled && virtualYOpts.gt > -1 && (virtualYOpts.gt === 0 || virtualYOpts.gt < allList.length)
|
|
423
424
|
reactData.scrollYLoad = scrollYLoad
|
|
425
|
+
if ($xeGanttView) {
|
|
426
|
+
$xeGanttView.updateScrollYStatus(scrollYLoad)
|
|
427
|
+
}
|
|
424
428
|
return scrollYLoad
|
|
425
429
|
}
|
|
426
430
|
|
|
@@ -3910,11 +3914,13 @@ const Methods = {
|
|
|
3910
3914
|
callSlot (slotFunc: any, params: any, h: any, vNodes: any) {
|
|
3911
3915
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
3912
3916
|
// const slots = $xeTable.$scopedSlots
|
|
3913
|
-
const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor &
|
|
3917
|
+
const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & VxeGridPrivateMethods
|
|
3918
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
3919
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
3914
3920
|
|
|
3915
3921
|
if (slotFunc) {
|
|
3916
|
-
if ($
|
|
3917
|
-
return $
|
|
3922
|
+
if ($xeGGWrapper) {
|
|
3923
|
+
return $xeGGWrapper.callSlot(slotFunc, params, h, vNodes)
|
|
3918
3924
|
}
|
|
3919
3925
|
// if (XEUtils.isString(slotFunc)) {
|
|
3920
3926
|
// slotFunc = slots[slotFunc] || null
|
|
@@ -3935,17 +3941,21 @@ const Methods = {
|
|
|
3935
3941
|
*/
|
|
3936
3942
|
getParentElem () {
|
|
3937
3943
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
3938
|
-
const $xeGrid = $xeTable.$xeGrid
|
|
3944
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
3945
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
3946
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
3939
3947
|
|
|
3940
3948
|
const { $el } = this
|
|
3941
|
-
return $
|
|
3949
|
+
return $xeGGWrapper ? $xeGGWrapper.$el.parentNode : $el.parentNode
|
|
3942
3950
|
},
|
|
3943
3951
|
/**
|
|
3944
3952
|
* 获取父容器的高度
|
|
3945
3953
|
*/
|
|
3946
3954
|
getParentHeight () {
|
|
3947
3955
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
3948
|
-
const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor &
|
|
3956
|
+
const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & VxeGridPrivateMethods
|
|
3957
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
3958
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
3949
3959
|
const props = $xeTable
|
|
3950
3960
|
|
|
3951
3961
|
const { height } = props
|
|
@@ -3955,8 +3965,8 @@ const Methods = {
|
|
|
3955
3965
|
const parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentElem) : 0
|
|
3956
3966
|
let parentWrapperHeight = 0
|
|
3957
3967
|
if (parentElem) {
|
|
3958
|
-
if ($
|
|
3959
|
-
parentWrapperHeight = $
|
|
3968
|
+
if ($xeGGWrapper && hasClass(parentElem, 'vxe-grid--table-wrapper')) {
|
|
3969
|
+
parentWrapperHeight = $xeGGWrapper.getParentHeight()
|
|
3960
3970
|
} else {
|
|
3961
3971
|
parentWrapperHeight = parentElem.clientHeight
|
|
3962
3972
|
}
|
|
@@ -3972,9 +3982,11 @@ const Methods = {
|
|
|
3972
3982
|
*/
|
|
3973
3983
|
getExcludeHeight () {
|
|
3974
3984
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
3975
|
-
const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor &
|
|
3985
|
+
const $xeGrid = $xeTable.$xeGrid as VxeGridConstructor & VxeGridPrivateMethods
|
|
3986
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
3987
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
3976
3988
|
|
|
3977
|
-
return $
|
|
3989
|
+
return $xeGGWrapper ? $xeGGWrapper.getExcludeHeight() : 0
|
|
3978
3990
|
},
|
|
3979
3991
|
/**
|
|
3980
3992
|
* 重置表格的一切数据状态
|
|
@@ -6221,7 +6233,8 @@ const Methods = {
|
|
|
6221
6233
|
},
|
|
6222
6234
|
preventEvent (evnt: any, type: any, args: any, next: any, end: any) {
|
|
6223
6235
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
6224
|
-
const $xeGrid = $xeTable.$xeGrid
|
|
6236
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
6237
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
6225
6238
|
|
|
6226
6239
|
let evntList = interceptor.get(type)
|
|
6227
6240
|
|
|
@@ -6238,7 +6251,7 @@ const Methods = {
|
|
|
6238
6251
|
let isStop = false
|
|
6239
6252
|
for (let i = 0; i < evntList.length; i++) {
|
|
6240
6253
|
const func = evntList[i]
|
|
6241
|
-
const fnRest = func(Object.assign({ $grid: $xeGrid, $
|
|
6254
|
+
const fnRest = func(Object.assign({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt }, args))
|
|
6242
6255
|
if (fnRest === false) {
|
|
6243
6256
|
isStop = true
|
|
6244
6257
|
break
|
|
@@ -6263,7 +6276,9 @@ const Methods = {
|
|
|
6263
6276
|
*/
|
|
6264
6277
|
handleGlobalMousedownEvent (evnt: any) {
|
|
6265
6278
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
6266
|
-
const $xeGrid = $xeTable.$xeGrid
|
|
6279
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
6280
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
6281
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
6267
6282
|
|
|
6268
6283
|
const { $el, $refs, $toolbar, mouseConfig, editStore, ctxMenuStore, editRules, editOpts, validOpts, areaOpts, filterStore, customStore, getRowNode } = this
|
|
6269
6284
|
const { actived } = editStore
|
|
@@ -6352,7 +6367,7 @@ const Methods = {
|
|
|
6352
6367
|
}
|
|
6353
6368
|
}
|
|
6354
6369
|
} else if (mouseConfig) {
|
|
6355
|
-
if (!getEventTargetNode(evnt, $el).flag && !($
|
|
6370
|
+
if (!getEventTargetNode(evnt, $el).flag && !($xeGGWrapper && getEventTargetNode(evnt, $xeGGWrapper.$el).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.$el).flag) && !($toolbar && getEventTargetNode(evnt, $toolbar.$el).flag)) {
|
|
6356
6371
|
if (this.clearSelected) {
|
|
6357
6372
|
this.clearSelected()
|
|
6358
6373
|
}
|
|
@@ -6374,7 +6389,7 @@ const Methods = {
|
|
|
6374
6389
|
if (ctxMenuStore.visible && tableMenu && !getEventTargetNode(evnt, tableMenu.$el).flag) {
|
|
6375
6390
|
this.closeMenu()
|
|
6376
6391
|
}
|
|
6377
|
-
const isActivated = getEventTargetNode(evnt, ($
|
|
6392
|
+
const isActivated = getEventTargetNode(evnt, ($xeGGWrapper || $xeTable).$el).flag
|
|
6378
6393
|
// 如果存在校验,点击了表格之外则清除
|
|
6379
6394
|
if (!isActivated && editRules && validOpts.autoClear) {
|
|
6380
6395
|
this.validErrorMaps = {}
|
|
@@ -6439,7 +6454,8 @@ const Methods = {
|
|
|
6439
6454
|
const props = $xeTable
|
|
6440
6455
|
const internalData = $xeTable as unknown as TableInternalData
|
|
6441
6456
|
const reactData = $xeTable as unknown as TableReactData
|
|
6442
|
-
const $xeGrid = $xeTable.$xeGrid
|
|
6457
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
6458
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
6443
6459
|
|
|
6444
6460
|
// 该行为只对当前激活的表格有效
|
|
6445
6461
|
if (internalData.isActivated) {
|
|
@@ -6640,7 +6656,8 @@ const Methods = {
|
|
|
6640
6656
|
column: selected.column,
|
|
6641
6657
|
columnIndex: $xeTable.getColumnIndex(selected.column),
|
|
6642
6658
|
$table: $xeTable,
|
|
6643
|
-
$grid: $xeGrid
|
|
6659
|
+
$grid: $xeGrid,
|
|
6660
|
+
$gantt: $xeGantt
|
|
6644
6661
|
}
|
|
6645
6662
|
// 是否被禁用
|
|
6646
6663
|
if (!beforeEditMethod || beforeEditMethod(params)) {
|
|
@@ -6665,7 +6682,8 @@ const Methods = {
|
|
|
6665
6682
|
column: selected.column,
|
|
6666
6683
|
columnIndex: $xeTable.getColumnIndex(selected.column),
|
|
6667
6684
|
$table: $xeTable,
|
|
6668
|
-
$grid: $xeGrid
|
|
6685
|
+
$grid: $xeGrid,
|
|
6686
|
+
$gantt: $xeGantt
|
|
6669
6687
|
}
|
|
6670
6688
|
// 是否被禁用
|
|
6671
6689
|
if (!beforeEditMethod || beforeEditMethod(params)) {
|
|
@@ -6692,7 +6710,8 @@ const Methods = {
|
|
|
6692
6710
|
rowIndex: $xeTable.getRowIndex(parentRow),
|
|
6693
6711
|
$rowIndex: $xeTable.getVMRowIndex(parentRow),
|
|
6694
6712
|
$table: $xeTable,
|
|
6695
|
-
$grid: $xeGrid
|
|
6713
|
+
$grid: $xeGrid,
|
|
6714
|
+
$gantt: $xeGantt
|
|
6696
6715
|
}
|
|
6697
6716
|
$xeTable.setTreeExpand(parentRow, false)
|
|
6698
6717
|
.then(() => $xeTable.scrollToRow(parentRow))
|
|
@@ -6713,7 +6732,8 @@ const Methods = {
|
|
|
6713
6732
|
column: selected.column,
|
|
6714
6733
|
columnIndex: $xeTable.getColumnIndex(selected.column),
|
|
6715
6734
|
$table: $xeTable,
|
|
6716
|
-
$grid: $xeGrid
|
|
6735
|
+
$grid: $xeGrid,
|
|
6736
|
+
$gantt: $xeGantt
|
|
6717
6737
|
}
|
|
6718
6738
|
if (!beforeEditMethod || beforeEditMethod(params)) {
|
|
6719
6739
|
if (editMethod) {
|
|
@@ -10715,7 +10735,6 @@ const Methods = {
|
|
|
10715
10735
|
|
|
10716
10736
|
const { scrollXLoad, overflowX, scrollXWidth } = reactData
|
|
10717
10737
|
const { visibleColumn, scrollXStore, elemStore, fullColumnIdData } = internalData
|
|
10718
|
-
const $xeGanttView = internalData.xeGanttView
|
|
10719
10738
|
const mouseOpts = $xeTable.computeMouseOpts
|
|
10720
10739
|
const tableBody = $xeTable.$refs.refTableBody
|
|
10721
10740
|
const tableBodyElem = tableBody ? (tableBody as any).$el as HTMLDivElement : null
|
|
@@ -10787,9 +10806,6 @@ const Methods = {
|
|
|
10787
10806
|
if (isScrollXBig && mouseOpts.area) {
|
|
10788
10807
|
errLog('vxe.error.notProp', ['mouse-config.area'])
|
|
10789
10808
|
}
|
|
10790
|
-
if ($xeGanttView) {
|
|
10791
|
-
$xeGanttView.updateScrollXSpace()
|
|
10792
|
-
}
|
|
10793
10809
|
return $xeTable.$nextTick(() => {
|
|
10794
10810
|
updateStyle($xeTable)
|
|
10795
10811
|
})
|
|
@@ -11097,7 +11113,8 @@ const Methods = {
|
|
|
11097
11113
|
const props = $xeTable
|
|
11098
11114
|
const reactData = $xeTable as unknown as TableReactData
|
|
11099
11115
|
const internalData = $xeTable as unknown as TableInternalData
|
|
11100
|
-
const $xeGrid = $xeTable.$xeGrid
|
|
11116
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
11117
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
11101
11118
|
|
|
11102
11119
|
const { showFooter, footerData, footerMethod } = props
|
|
11103
11120
|
const { visibleColumn, afterFullData } = internalData
|
|
@@ -11105,7 +11122,7 @@ const Methods = {
|
|
|
11105
11122
|
if (showFooter && footerData && footerData.length) {
|
|
11106
11123
|
footData = footerData.slice(0)
|
|
11107
11124
|
} else if (showFooter && footerMethod) {
|
|
11108
|
-
footData = visibleColumn.length ? footerMethod({ columns: visibleColumn, data: afterFullData, $table: $xeTable, $grid: $xeGrid }) : []
|
|
11125
|
+
footData = visibleColumn.length ? footerMethod({ columns: visibleColumn, data: afterFullData, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }) : []
|
|
11109
11126
|
}
|
|
11110
11127
|
reactData.footerTableData = footData
|
|
11111
11128
|
$xeTable.handleUpdateFooterMerge()
|
|
@@ -11274,16 +11291,18 @@ const Methods = {
|
|
|
11274
11291
|
},
|
|
11275
11292
|
dispatchEvent (type: ValueOf<VxeTableEmits>, params: Record<string, any>, evnt: Event | null) {
|
|
11276
11293
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
11277
|
-
const $xeGrid = $xeTable.$xeGrid
|
|
11294
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
11295
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
11278
11296
|
|
|
11279
|
-
$xeTable.$emit(type, createEvent(evnt, { $table: $xeTable, $grid: $xeGrid }, params))
|
|
11297
|
+
$xeTable.$emit(type, createEvent(evnt, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }, params))
|
|
11280
11298
|
},
|
|
11281
11299
|
// 已废弃,使用 dispatchEvent
|
|
11282
11300
|
emitEvent (type: any, params: any, evnt: any) {
|
|
11283
11301
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
11284
|
-
const $xeGrid = $xeTable.$xeGrid
|
|
11302
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
11303
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
11285
11304
|
|
|
11286
|
-
|
|
11305
|
+
$xeTable.$emit(type, createEvent(evnt, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt }))
|
|
11287
11306
|
},
|
|
11288
11307
|
focus () {
|
|
11289
11308
|
this.isActivated = true
|