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
|
@@ -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,
|