vxe-table 4.16.0-beta.0 → 4.16.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/grid/src/grid.js +1 -0
- package/es/style.css +1 -1
- package/es/table/module/custom/hook.js +2 -1
- package/es/table/module/custom/panel.js +4 -0
- package/es/table/module/edit/hook.js +3 -2
- package/es/table/module/export/export-panel.js +3 -0
- package/es/table/module/export/hook.js +45 -24
- package/es/table/module/export/import-panel.js +3 -0
- package/es/table/module/menu/hook.js +2 -1
- package/es/table/module/validator/hook.js +3 -1
- package/es/table/src/body.js +7 -2
- package/es/table/src/column.js +1 -0
- package/es/table/src/columnInfo.js +5 -3
- package/es/table/src/footer.js +2 -0
- package/es/table/src/group.js +1 -0
- package/es/table/src/header.js +2 -0
- package/es/table/src/table.js +28 -22
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +1 -0
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +113 -45
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/hook.js +2 -1
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +4 -0
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +5 -2
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/export-panel.js +3 -0
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/hook.js +52 -19
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/export/import-panel.js +3 -0
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/menu/hook.js +2 -0
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/module/validator/hook.js +3 -1
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/src/body.js +8 -2
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/column.js +1 -0
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +6 -2
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +2 -0
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/group.js +1 -0
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/header.js +2 -0
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +16 -16
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +1 -0
- package/packages/table/module/custom/hook.ts +2 -1
- package/packages/table/module/custom/panel.ts +4 -0
- package/packages/table/module/edit/hook.ts +3 -2
- package/packages/table/module/export/export-panel.ts +3 -0
- package/packages/table/module/export/hook.ts +52 -26
- package/packages/table/module/export/import-panel.ts +3 -0
- package/packages/table/module/menu/hook.ts +2 -1
- package/packages/table/module/validator/hook.ts +3 -1
- package/packages/table/src/body.ts +7 -2
- package/packages/table/src/column.ts +1 -0
- package/packages/table/src/columnInfo.ts +5 -3
- package/packages/table/src/footer.ts +2 -0
- package/packages/table/src/group.ts +1 -0
- package/packages/table/src/header.ts +2 -0
- package/packages/table/src/table.ts +29 -22
- /package/es/{iconfont.1755178488627.ttf → iconfont.1755232625112.ttf} +0 -0
- /package/es/{iconfont.1755178488627.woff → iconfont.1755232625112.woff} +0 -0
- /package/es/{iconfont.1755178488627.woff2 → iconfont.1755232625112.woff2} +0 -0
- /package/lib/{iconfont.1755178488627.ttf → iconfont.1755232625112.ttf} +0 -0
- /package/lib/{iconfont.1755178488627.woff → iconfont.1755232625112.woff} +0 -0
- /package/lib/{iconfont.1755178488627.woff2 → iconfont.1755232625112.woff2} +0 -0
package/lib/ui/index.js
CHANGED
|
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "VxeUI", {
|
|
|
13
13
|
exports.version = exports.validators = exports.use = exports.t = exports.setup = exports.setTheme = exports.setLanguage = exports.setIcon = exports.setI18n = exports.setConfig = exports.saveFile = exports.renderer = exports.readFile = exports.print = exports.modal = exports.menus = exports.log = exports.interceptor = exports.hooks = exports.globalResize = exports.globalEvents = exports.getTheme = exports.getIcon = exports.getI18n = exports.getConfig = exports.formats = exports.default = exports.config = exports.commands = exports.clipboard = exports._t = void 0;
|
|
14
14
|
var _core = require("@vxe-ui/core");
|
|
15
15
|
var _utils = require("./src/utils");
|
|
16
|
-
const version = exports.version = "4.16.0-beta.
|
|
16
|
+
const version = exports.version = "4.16.0-beta.1";
|
|
17
17
|
_core.VxeUI.version = version;
|
|
18
18
|
_core.VxeUI.tableVersion = version;
|
|
19
19
|
_core.VxeUI.setConfig({
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.VXETable=void 0,Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.version=exports.validators=exports.use=exports.t=exports.setup=exports.setTheme=exports.setLanguage=exports.setIcon=exports.setI18n=exports.setConfig=exports.saveFile=exports.renderer=exports.readFile=exports.print=exports.modal=exports.menus=exports.log=exports.interceptor=exports.hooks=exports.globalResize=exports.globalEvents=exports.getTheme=exports.getIcon=exports.getI18n=exports.getConfig=exports.formats=exports.default=exports.config=exports.commands=exports.clipboard=exports._t=void 0;var _core=require("@vxe-ui/core"),_utils=require("./src/utils");let version=exports.version="4.16.0-beta.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.VXETable=void 0,Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.version=exports.validators=exports.use=exports.t=exports.setup=exports.setTheme=exports.setLanguage=exports.setIcon=exports.setI18n=exports.setConfig=exports.saveFile=exports.renderer=exports.readFile=exports.print=exports.modal=exports.menus=exports.log=exports.interceptor=exports.hooks=exports.globalResize=exports.globalEvents=exports.getTheme=exports.getIcon=exports.getI18n=exports.getConfig=exports.formats=exports.default=exports.config=exports.commands=exports.clipboard=exports._t=void 0;var _core=require("@vxe-ui/core"),_utils=require("./src/utils");let version=exports.version="4.16.0-beta.1",iconPrefix=(_core.VxeUI.version=version,_core.VxeUI.tableVersion=version,_core.VxeUI.setConfig({emptyCell:" ",table:{fit:!0,showHeader:!0,animat:!0,delayHover:250,autoResize:!0,minHeight:144,resizeConfig:{},resizableConfig:{dragMode:"auto",showDragTip:!0,isSyncAutoHeight:!0,isSyncAutoWidth:!0,minHeight:18},radioConfig:{strict:!0},rowDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},columnDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},checkboxConfig:{strict:!0},tooltipConfig:{enterable:!0},validConfig:{showMessage:!0,autoClear:!0,autoPos:!0,message:"inline",msgMode:"single",theme:"beautify"},columnConfig:{autoOptions:{isCalcHeader:!0,isCalcBody:!0,isCalcFooter:!0},maxFixedSize:4},cellConfig:{padding:!0},headerCellConfig:{height:"unset"},footerCellConfig:{height:"unset"},customConfig:{allowVisible:!0,allowResizable:!0,allowFixed:!0,allowSort:!0,showFooter:!0,placement:"top-right",storeOptions:{visible:!0,resizable:!0,sort:!0,fixed:!0},modalOptions:{showMaximize:!0,mask:!0,lockView:!0,resize:!0,escClosable:!0},drawerOptions:{mask:!0,lockView:!0,escClosable:!0,resize:!0}},sortConfig:{showIcon:!0,allowClear:!0,allowBtn:!0,iconLayout:"vertical"},filterConfig:{multiple:!0,showIcon:!0},aggregateConfig:{padding:!0,rowField:"id",parentField:"_X_ROW_PARENT_KEY",childrenField:"_X_ROW_CHILDREN",mapChildrenField:"_X_ROW_CHILD_LIST",indent:20,showIcon:!0,maxGroupSize:4,showAggFuncTitle:!0},treeConfig:{padding:!0,rowField:"id",parentField:"parentId",childrenField:"children",hasChildField:"hasChild",mapChildrenField:"_X_ROW_CHILD",indent:20,showIcon:!0},expandConfig:{showIcon:!0,mode:"fixed"},editConfig:{showIcon:!0,showAsterisk:!0,autoFocus:!0},importConfig:{_typeMaps:{csv:1,html:1,xml:1,txt:1}},exportConfig:{_typeMaps:{csv:1,html:1,xml:1,txt:1}},printConfig:{},mouseConfig:{extension:!0},keyboardConfig:{isAll:!0,isEsc:!0},areaConfig:{autoClear:!0,selectCellByHeader:!0,selectCellByBody:!0,extendDirection:{top:!0,left:!0,bottom:!0,right:!0}},clipConfig:{isCopy:!0,isCut:!0,isPaste:!0},fnrConfig:{isFind:!0,isReplace:!0},virtualXConfig:{gt:24,preSize:1,oSize:0},virtualYConfig:{gt:100,preSize:1,oSize:0},scrollbarConfig:{x:{visible:!0},y:{visible:!0}}},grid:{formConfig:{enabled:!0},pagerConfig:{enabled:!0},toolbarConfig:{enabled:!0},proxyConfig:{enabled:!0,autoLoad:!0,showLoading:!0,showResponseMsg:!0,showActionMsg:!0,response:{list:null,result:"result",total:"page.total",message:"message"}}},toolbar:{},gantt:{}}),"vxe-table-icon-"),setTheme=(_core.VxeUI.setIcon({TABLE_SORT_ASC:iconPrefix+"caret-up",TABLE_SORT_DESC:iconPrefix+"caret-down",TABLE_FILTER_NONE:iconPrefix+"funnel",TABLE_FILTER_MATCH:iconPrefix+"funnel",TABLE_EDIT:iconPrefix+"edit",TABLE_TITLE_PREFIX:iconPrefix+"question-circle-fill",TABLE_TITLE_SUFFIX:iconPrefix+"question-circle-fill",TABLE_TREE_LOADED:iconPrefix+"spinner roll",TABLE_TREE_OPEN:iconPrefix+"caret-right rotate90",TABLE_TREE_CLOSE:iconPrefix+"caret-right",TABLE_EXPAND_LOADED:iconPrefix+"spinner roll",TABLE_EXPAND_OPEN:iconPrefix+"arrow-right rotate90",TABLE_EXPAND_CLOSE:iconPrefix+"arrow-right",TABLE_CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",TABLE_CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",TABLE_CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",TABLE_CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",TABLE_RADIO_CHECKED:iconPrefix+"radio-checked-fill",TABLE_RADIO_UNCHECKED:iconPrefix+"radio-unchecked",TABLE_RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",TABLE_CUSTOM_SORT:iconPrefix+"drag-handle",TABLE_MENU_OPTIONS:iconPrefix+"arrow-right",TABLE_DRAG_ROW:iconPrefix+"drag-handle",TABLE_DRAG_COLUMN:iconPrefix+"drag-handle",TABLE_DRAG_STATUS_ROW:iconPrefix+"sort",TABLE_DRAG_STATUS_SUB_ROW:iconPrefix+"add-sub",TABLE_DRAG_STATUS_AGG_GROUP:iconPrefix+"grouping",TABLE_DRAG_STATUS_AGG_VALUES:iconPrefix+"values",TABLE_DRAG_STATUS_COLUMN:iconPrefix+"swap",TABLE_DRAG_DISABLED:iconPrefix+"no-drop",TABLE_ROW_GROUP_OPEN:iconPrefix+"arrow-right rotate90",TABLE_ROW_GROUP_CLOSE:iconPrefix+"arrow-right",TABLE_AGGREGATE_GROUPING:iconPrefix+"grouping",TABLE_AGGREGATE_VALUES:iconPrefix+"values",TABLE_AGGREGATE_SORT:iconPrefix+"drag-handle",TABLE_AGGREGATE_DELETE:iconPrefix+"close",TOOLBAR_TOOLS_REFRESH:iconPrefix+"repeat",TOOLBAR_TOOLS_REFRESH_LOADING:iconPrefix+"repeat roll",TOOLBAR_TOOLS_IMPORT:iconPrefix+"upload",TOOLBAR_TOOLS_EXPORT:iconPrefix+"download",TOOLBAR_TOOLS_PRINT:iconPrefix+"print",TOOLBAR_TOOLS_FULLSCREEN:iconPrefix+"fullscreen",TOOLBAR_TOOLS_MINIMIZE:iconPrefix+"minimize",TOOLBAR_TOOLS_CUSTOM:iconPrefix+"custom-column",TOOLBAR_TOOLS_FIXED_LEFT:iconPrefix+"fixed-left",TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE:iconPrefix+"fixed-left-fill",TOOLBAR_TOOLS_FIXED_RIGHT:iconPrefix+"fixed-right",TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE:iconPrefix+"fixed-right-fill"}),exports.setTheme=_core.VxeUI.setTheme),getTheme=exports.getTheme=_core.VxeUI.getTheme,setConfig=exports.setConfig=_core.VxeUI.setConfig,getConfig=exports.getConfig=_core.VxeUI.getConfig,setIcon=exports.setIcon=_core.VxeUI.setIcon,getIcon=exports.getIcon=_core.VxeUI.getIcon,setLanguage=exports.setLanguage=_core.VxeUI.setLanguage,setI18n=exports.setI18n=_core.VxeUI.setI18n,getI18n=exports.getI18n=_core.VxeUI.getI18n,globalEvents=exports.globalEvents=_core.VxeUI.globalEvents,globalResize=exports.globalResize=_core.VxeUI.globalResize,renderer=exports.renderer=_core.VxeUI.renderer,validators=exports.validators=_core.VxeUI.validators,menus=exports.menus=_core.VxeUI.menus,formats=exports.formats=_core.VxeUI.formats,commands=exports.commands=_core.VxeUI.commands,interceptor=exports.interceptor=_core.VxeUI.interceptor,clipboard=exports.clipboard=_core.VxeUI.clipboard,log=exports.log=_core.VxeUI.log,hooks=exports.hooks=_core.VxeUI.hooks,use=exports.use=_core.VxeUI.use,setup=e=>_core.VxeUI.setConfig(e),config=(exports.setup=setup,_core.VxeUI.setup=setup,e=>_core.VxeUI.setConfig(e)),t=(exports.config=config,_core.VxeUI.config=config,(e,o)=>_core.VxeUI.getI18n(e,o)),_t=(exports.t=t,_core.VxeUI.t=t,(e,o)=>(0,_utils.getFuncText)(e,o)),VXETable=(exports._t=_t,_core.VxeUI._t=_t,exports.VXETable=_core.VxeUI),saveFile=e=>_core.VxeUI.saveFile(e),readFile=(exports.saveFile=saveFile,e=>_core.VxeUI.readFile(e)),print=(exports.readFile=readFile,e=>_core.VxeUI.print(e)),modal=(exports.print=print,exports.modal={get(e){return _core.VxeUI.modal.get(e)},close(e){return _core.VxeUI.modal.close(e)},open(e){return _core.VxeUI.modal.open(e)},alert(e,o,i){return _core.VxeUI.modal.alert(e,o,i)},confirm(e,o,i){return _core.VxeUI.modal.confirm(e,o,i)},message(e,o){return _core.VxeUI.modal.message(e,o)},notification(e,o,i){return _core.VxeUI.modal.notification(e,o,i)}});var _default=exports.default=_core.VxeUI;
|
package/lib/ui/src/log.js
CHANGED
|
@@ -8,6 +8,6 @@ var _core = require("@vxe-ui/core");
|
|
|
8
8
|
const {
|
|
9
9
|
log
|
|
10
10
|
} = _core.VxeUI;
|
|
11
|
-
const version = `table v${"4.16.0-beta.
|
|
11
|
+
const version = `table v${"4.16.0-beta.1"}`;
|
|
12
12
|
const warnLog = exports.warnLog = log.create('warn', version);
|
|
13
13
|
const errLog = exports.errLog = log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="table v4.16.0-beta.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="table v4.16.0-beta.1",warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "4.16.0-beta.
|
|
3
|
+
"version": "4.16.0-beta.1",
|
|
4
4
|
"description": "A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -14,6 +14,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
14
14
|
const { refElem } = $xeTable.getRefMaps()
|
|
15
15
|
|
|
16
16
|
const $xeGrid = $xeTable.xeGrid
|
|
17
|
+
const $xeGantt = $xeTable.xeGantt
|
|
17
18
|
|
|
18
19
|
const calcMaxHeight = () => {
|
|
19
20
|
const { customStore } = reactData
|
|
@@ -281,7 +282,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
281
282
|
}
|
|
282
283
|
|
|
283
284
|
const emitCustomEvent = (type: VxeTableDefines.CustomType, evnt: Event) => {
|
|
284
|
-
const comp = $xeGrid || $xeTable
|
|
285
|
+
const comp = $xeGrid || $xeGantt || $xeTable
|
|
285
286
|
comp.dispatchEvent('custom', { type }, evnt)
|
|
286
287
|
}
|
|
287
288
|
|
|
@@ -598,6 +598,7 @@ export default defineVxeComponent({
|
|
|
598
598
|
|
|
599
599
|
const renderSimplePanel = () => {
|
|
600
600
|
const $xeGrid = $xeTable.xeGrid
|
|
601
|
+
const $xeGantt = $xeTable.xeGantt
|
|
601
602
|
const tableProps = $xeTable.props
|
|
602
603
|
|
|
603
604
|
const { customStore } = props
|
|
@@ -628,6 +629,7 @@ export default defineVxeComponent({
|
|
|
628
629
|
const params = {
|
|
629
630
|
$table: $xeTable,
|
|
630
631
|
$grid: $xeGrid,
|
|
632
|
+
$gantt: $xeGantt,
|
|
631
633
|
columns: customColumnList,
|
|
632
634
|
isAllChecked,
|
|
633
635
|
isAllIndeterminate,
|
|
@@ -882,6 +884,7 @@ export default defineVxeComponent({
|
|
|
882
884
|
|
|
883
885
|
const renderPopupPanel = () => {
|
|
884
886
|
const $xeGrid = $xeTable.xeGrid
|
|
887
|
+
const $xeGantt = $xeTable.xeGantt
|
|
885
888
|
|
|
886
889
|
const { customStore } = props
|
|
887
890
|
const { treeConfig, rowGroupConfig, aggregateConfig, resizable: allResizable } = tableProps
|
|
@@ -910,6 +913,7 @@ export default defineVxeComponent({
|
|
|
910
913
|
const params = {
|
|
911
914
|
$table: $xeTable,
|
|
912
915
|
$grid: $xeGrid,
|
|
916
|
+
$gantt: $xeGantt,
|
|
913
917
|
columns: customColumnList,
|
|
914
918
|
isAllChecked,
|
|
915
919
|
isAllIndeterminate,
|
|
@@ -339,6 +339,7 @@ hooks.add('tableEditModule', {
|
|
|
339
339
|
|
|
340
340
|
const handleEditActive = (params: any, evnt: Event | null, isFocus: boolean, isPos: boolean) => {
|
|
341
341
|
const $xeGrid = $xeTable.xeGrid
|
|
342
|
+
const $xeGantt = $xeTable.xeGantt
|
|
342
343
|
|
|
343
344
|
const { editConfig, mouseConfig } = props
|
|
344
345
|
const { editStore, tableColumn } = reactData
|
|
@@ -356,7 +357,7 @@ hooks.add('tableEditModule', {
|
|
|
356
357
|
if (actived.row !== row || (mode === 'cell' ? actived.column !== column : false)) {
|
|
357
358
|
// 判断是否禁用编辑
|
|
358
359
|
let type: 'edit-disabled' | 'edit-activated' = 'edit-disabled'
|
|
359
|
-
if (!beforeEditMethod || beforeEditMethod({ ...params, $table: $xeTable, $grid: $xeGrid })) {
|
|
360
|
+
if (!beforeEditMethod || beforeEditMethod({ ...params, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt })) {
|
|
360
361
|
if (mouseConfig) {
|
|
361
362
|
$xeTable.clearSelected()
|
|
362
363
|
if ($xeTable.clearCellAreas) {
|
|
@@ -384,7 +385,7 @@ hooks.add('tableEditModule', {
|
|
|
384
385
|
$xeTable.handleFocus(params, evnt)
|
|
385
386
|
}
|
|
386
387
|
if (afterEditMethod) {
|
|
387
|
-
afterEditMethod({ ...params, $table: $xeTable, $grid: $xeGrid })
|
|
388
|
+
afterEditMethod({ ...params, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt })
|
|
388
389
|
}
|
|
389
390
|
})
|
|
390
391
|
}
|
|
@@ -163,6 +163,7 @@ export default defineVxeComponent({
|
|
|
163
163
|
|
|
164
164
|
const renderVN = () => {
|
|
165
165
|
const $xeGrid = $xeTable.xeGrid
|
|
166
|
+
const $xeGantt = $xeTable.xeGantt
|
|
166
167
|
|
|
167
168
|
const { defaultOptions, storeData } = props
|
|
168
169
|
const { isAll: isAllChecked, isIndeterminate: isAllIndeterminate } = reactData
|
|
@@ -245,6 +246,7 @@ export default defineVxeComponent({
|
|
|
245
246
|
const params = {
|
|
246
247
|
$table: $xeTable,
|
|
247
248
|
$grid: $xeGrid,
|
|
249
|
+
$gantt: $xeGantt,
|
|
248
250
|
options: defaultOptions,
|
|
249
251
|
columns,
|
|
250
252
|
params: defaultOptions.params as any
|
|
@@ -502,6 +504,7 @@ export default defineVxeComponent({
|
|
|
502
504
|
const params = {
|
|
503
505
|
$table: $xeTable,
|
|
504
506
|
$grid: $xeGrid,
|
|
507
|
+
$gantt: $xeGantt,
|
|
505
508
|
options: defaultOptions,
|
|
506
509
|
columns,
|
|
507
510
|
params: defaultOptions.params as any
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { nextTick } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../../ui'
|
|
4
4
|
import { isColumnInfo, getCellValue, createHandleGetRowId } from '../../src/util'
|
|
@@ -7,7 +7,7 @@ import { hasClass } from '../../../ui/src/dom'
|
|
|
7
7
|
import { createHtmlPage, getExportBlobByContent } from './util'
|
|
8
8
|
import { warnLog, errLog } from '../../../ui/src/log'
|
|
9
9
|
|
|
10
|
-
import type {
|
|
10
|
+
import type { VxeTablePropTypes, VxeColumnPropTypes, TableExportMethods, VxeGridPropTypes, VxeTableDefines, VxeTableConstructor, VxeTablePrivateMethods } from '../../../../types'
|
|
11
11
|
|
|
12
12
|
const { getI18n, hooks, renderer } = VxeUI
|
|
13
13
|
|
|
@@ -93,8 +93,11 @@ function getBooleanValue (cellValue: any) {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
function getFooterData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, opts: VxeTablePropTypes.ExportHandleOptions, footerTableData: any[]) {
|
|
96
|
+
const $xeGrid = $xeTable.xeGrid
|
|
97
|
+
const $xeGantt = $xeTable.xeGantt
|
|
98
|
+
|
|
96
99
|
const { footerFilterMethod } = opts
|
|
97
|
-
return footerFilterMethod ? footerTableData.filter((items, index) => footerFilterMethod({ $table: $xeTable, items, $rowIndex: index })) : footerTableData
|
|
100
|
+
return footerFilterMethod ? footerTableData.filter((items, index) => footerFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, items, $rowIndex: index })) : footerTableData
|
|
98
101
|
}
|
|
99
102
|
|
|
100
103
|
function getCsvCellTypeLabel (column: any, cellValue: any) {
|
|
@@ -301,9 +304,6 @@ hooks.add('tableExportModule', {
|
|
|
301
304
|
const { props, reactData, internalData } = $xeTable
|
|
302
305
|
const { computeTreeOpts, computePrintOpts, computeExportOpts, computeImportOpts, computeCustomOpts, computeSeqOpts, computeRadioOpts, computeCheckboxOpts, computeColumnOpts } = $xeTable.getComputeMaps()
|
|
303
306
|
|
|
304
|
-
const $xeGrid = inject<VxeGridConstructor | null>('$xeGrid', null)
|
|
305
|
-
const $xeGantt = inject('$xeGantt', null)
|
|
306
|
-
|
|
307
307
|
const hasTreeChildren = (row: any) => {
|
|
308
308
|
const treeOpts = computeTreeOpts.value
|
|
309
309
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
@@ -491,10 +491,13 @@ hooks.add('tableExportModule', {
|
|
|
491
491
|
}
|
|
492
492
|
|
|
493
493
|
const getExportData = (opts: VxeTablePropTypes.ExportHandleOptions) => {
|
|
494
|
+
const $xeGrid = $xeTable.xeGrid
|
|
495
|
+
const $xeGantt = $xeTable.xeGantt
|
|
496
|
+
|
|
494
497
|
const { columns, dataFilterMethod } = opts
|
|
495
498
|
let datas = opts.data
|
|
496
499
|
if (dataFilterMethod) {
|
|
497
|
-
datas = datas.filter((row, index) => dataFilterMethod({ $table: $xeTable, row, $rowIndex: index }))
|
|
500
|
+
datas = datas.filter((row, index) => dataFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, row, $rowIndex: index }))
|
|
498
501
|
}
|
|
499
502
|
return getBodyLabelData(opts, columns, datas)
|
|
500
503
|
}
|
|
@@ -810,10 +813,13 @@ hooks.add('tableExportModule', {
|
|
|
810
813
|
}
|
|
811
814
|
|
|
812
815
|
const handleExport = (opts: VxeTablePropTypes.ExportHandleOptions) => {
|
|
816
|
+
const $xeGrid = $xeTable.xeGrid
|
|
817
|
+
const $xeGantt = $xeTable.xeGantt
|
|
818
|
+
|
|
813
819
|
const { remote, columns, colgroups, exportMethod, afterExportMethod } = opts
|
|
814
820
|
return new Promise(resolve => {
|
|
815
821
|
if (remote) {
|
|
816
|
-
const params = { options: opts, $table: $xeTable, $grid: $xeGrid }
|
|
822
|
+
const params = { options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }
|
|
817
823
|
resolve(exportMethod ? exportMethod(params) : params)
|
|
818
824
|
} else {
|
|
819
825
|
const datas = getExportData(opts)
|
|
@@ -827,7 +833,7 @@ hooks.add('tableExportModule', {
|
|
|
827
833
|
clearColumnConvert(columns)
|
|
828
834
|
if (!opts.print) {
|
|
829
835
|
if (afterExportMethod) {
|
|
830
|
-
afterExportMethod({ status: true, options: opts, $table: $xeTable, $grid: $xeGrid })
|
|
836
|
+
afterExportMethod({ status: true, options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt })
|
|
831
837
|
}
|
|
832
838
|
}
|
|
833
839
|
return Object.assign({ status: true }, params)
|
|
@@ -835,7 +841,7 @@ hooks.add('tableExportModule', {
|
|
|
835
841
|
clearColumnConvert(columns)
|
|
836
842
|
if (!opts.print) {
|
|
837
843
|
if (afterExportMethod) {
|
|
838
|
-
afterExportMethod({ status: false, options: opts, $table: $xeTable, $grid: $xeGrid })
|
|
844
|
+
afterExportMethod({ status: false, options: opts, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt })
|
|
839
845
|
}
|
|
840
846
|
}
|
|
841
847
|
const params = { status: false }
|
|
@@ -1027,6 +1033,10 @@ hooks.add('tableExportModule', {
|
|
|
1027
1033
|
}
|
|
1028
1034
|
|
|
1029
1035
|
const handleExportAndPrint = (options: VxeTablePropTypes.ExportOpts | VxeTablePropTypes.ExportConfig, isPrint?: boolean) => {
|
|
1036
|
+
const $xeGrid = $xeTable.xeGrid
|
|
1037
|
+
const $xeGantt = $xeTable.xeGantt
|
|
1038
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
1039
|
+
|
|
1030
1040
|
const { treeConfig, showHeader, showFooter } = props
|
|
1031
1041
|
const { initStore, isGroup, footerTableData, exportStore, exportParams } = reactData
|
|
1032
1042
|
const { collectColumn, mergeBodyList, mergeFooterList } = internalData
|
|
@@ -1034,7 +1044,7 @@ hooks.add('tableExportModule', {
|
|
|
1034
1044
|
const hasTree = treeConfig
|
|
1035
1045
|
const customOpts = computeCustomOpts.value
|
|
1036
1046
|
const selectRecords = $xeTable.getCheckboxRecords()
|
|
1037
|
-
const proxyOpts = $
|
|
1047
|
+
const proxyOpts = $xeGGWrapper ? $xeGGWrapper.getComputeMaps().computeProxyOpts.value : {} as VxeGridPropTypes.ProxyOpts
|
|
1038
1048
|
const hasFooter = !!footerTableData.length
|
|
1039
1049
|
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length)
|
|
1040
1050
|
const defOpts = Object.assign({
|
|
@@ -1109,7 +1119,8 @@ hooks.add('tableExportModule', {
|
|
|
1109
1119
|
exportParams.filename = filename({
|
|
1110
1120
|
options: defOpts,
|
|
1111
1121
|
$table: $xeTable,
|
|
1112
|
-
$grid: $xeGrid
|
|
1122
|
+
$grid: $xeGrid,
|
|
1123
|
+
$gantt: $xeGantt
|
|
1113
1124
|
})
|
|
1114
1125
|
} else {
|
|
1115
1126
|
exportParams.filename = `${filename}`
|
|
@@ -1120,7 +1131,8 @@ hooks.add('tableExportModule', {
|
|
|
1120
1131
|
exportParams.sheetName = sheetName({
|
|
1121
1132
|
options: defOpts,
|
|
1122
1133
|
$table: $xeTable,
|
|
1123
|
-
$grid: $xeGrid
|
|
1134
|
+
$grid: $xeGrid,
|
|
1135
|
+
$gantt: $xeGantt
|
|
1124
1136
|
})
|
|
1125
1137
|
} else {
|
|
1126
1138
|
exportParams.sheetName = `${sheetName}`
|
|
@@ -1151,12 +1163,16 @@ hooks.add('tableExportModule', {
|
|
|
1151
1163
|
* @param {Object} options 参数
|
|
1152
1164
|
*/
|
|
1153
1165
|
exportData (options) {
|
|
1166
|
+
const $xeGrid = $xeTable.xeGrid
|
|
1167
|
+
const $xeGantt = $xeTable.xeGantt
|
|
1168
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
1169
|
+
|
|
1154
1170
|
const { treeConfig, showHeader, showFooter } = props
|
|
1155
1171
|
const { isGroup } = reactData
|
|
1156
1172
|
const { tableFullColumn, afterFullData, afterTreeFullData, collectColumn, mergeBodyList, mergeFooterList } = internalData
|
|
1157
1173
|
const exportOpts = computeExportOpts.value
|
|
1158
1174
|
const treeOpts = computeTreeOpts.value
|
|
1159
|
-
const proxyOpts = $
|
|
1175
|
+
const proxyOpts = $xeGGWrapper ? $xeGGWrapper.getComputeMaps().computeProxyOpts.value : {} as VxeGridPropTypes.ProxyOpts
|
|
1160
1176
|
const hasMerge = !!(mergeBodyList.length || mergeFooterList.length)
|
|
1161
1177
|
const opts = Object.assign({
|
|
1162
1178
|
message: true,
|
|
@@ -1257,7 +1273,7 @@ hooks.add('tableExportModule', {
|
|
|
1257
1273
|
children: 'childNodes',
|
|
1258
1274
|
mapChildren: '_children'
|
|
1259
1275
|
}),
|
|
1260
|
-
(column, index) => isColumnInfo(column) && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, column: column as any, $columnIndex: index })),
|
|
1276
|
+
(column, index) => isColumnInfo(column) && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column: column as any, $columnIndex: index })),
|
|
1261
1277
|
{
|
|
1262
1278
|
children: '_children',
|
|
1263
1279
|
mapChildren: 'childNodes',
|
|
@@ -1265,7 +1281,7 @@ hooks.add('tableExportModule', {
|
|
|
1265
1281
|
}
|
|
1266
1282
|
)
|
|
1267
1283
|
} else {
|
|
1268
|
-
groups = XEUtils.searchTree(isGroup ? collectColumn : tableFullColumn, (column, index) => column.visible && (!columnFilterMethod || columnFilterMethod({ $table: $xeTable, column, $columnIndex: index })), { children: 'children', mapChildren: 'childNodes', original: true })
|
|
1284
|
+
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 })
|
|
1269
1285
|
}
|
|
1270
1286
|
// 获取所有列
|
|
1271
1287
|
const cols: VxeTableDefines.ColumnInfo[] = []
|
|
@@ -1283,7 +1299,8 @@ hooks.add('tableExportModule', {
|
|
|
1283
1299
|
handleOptions.filename = filename({
|
|
1284
1300
|
options: opts,
|
|
1285
1301
|
$table: $xeTable,
|
|
1286
|
-
$grid: $xeGrid
|
|
1302
|
+
$grid: $xeGrid,
|
|
1303
|
+
$gantt: $xeGantt
|
|
1287
1304
|
})
|
|
1288
1305
|
} else {
|
|
1289
1306
|
handleOptions.filename = `${filename}`
|
|
@@ -1298,7 +1315,8 @@ hooks.add('tableExportModule', {
|
|
|
1298
1315
|
handleOptions.sheetName = sheetName({
|
|
1299
1316
|
options: opts,
|
|
1300
1317
|
$table: $xeTable,
|
|
1301
|
-
$grid: $xeGrid
|
|
1318
|
+
$grid: $xeGrid,
|
|
1319
|
+
$gantt: $xeGantt
|
|
1302
1320
|
})
|
|
1303
1321
|
} else {
|
|
1304
1322
|
handleOptions.sheetName = `${sheetName}`
|
|
@@ -1320,7 +1338,7 @@ hooks.add('tableExportModule', {
|
|
|
1320
1338
|
|
|
1321
1339
|
if (!handleOptions.print) {
|
|
1322
1340
|
if (beforeExportMethod) {
|
|
1323
|
-
beforeExportMethod({ options: handleOptions, $table: $xeTable, $grid: $xeGrid })
|
|
1341
|
+
beforeExportMethod({ options: handleOptions, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt })
|
|
1324
1342
|
}
|
|
1325
1343
|
}
|
|
1326
1344
|
if (!handleOptions.data) {
|
|
@@ -1332,13 +1350,13 @@ hooks.add('tableExportModule', {
|
|
|
1332
1350
|
handleOptions.data = selectRecords
|
|
1333
1351
|
}
|
|
1334
1352
|
} else if (mode === 'all') {
|
|
1335
|
-
if (!$
|
|
1353
|
+
if (!$xeGGWrapper) {
|
|
1336
1354
|
errLog('vxe.error.errProp', ['all', 'mode=current,selected'])
|
|
1337
1355
|
}
|
|
1338
1356
|
|
|
1339
|
-
if ($
|
|
1340
|
-
const gridReactData = $
|
|
1341
|
-
const { computeProxyOpts } = $
|
|
1357
|
+
if ($xeGGWrapper && !handleOptions.remote) {
|
|
1358
|
+
const gridReactData = $xeGGWrapper.reactData
|
|
1359
|
+
const { computeProxyOpts } = $xeGGWrapper.getComputeMaps()
|
|
1342
1360
|
const proxyOpts = computeProxyOpts.value
|
|
1343
1361
|
const { sortData } = gridReactData
|
|
1344
1362
|
const { beforeQueryAll, afterQueryAll, ajax = {} } = proxyOpts
|
|
@@ -1425,6 +1443,9 @@ hooks.add('tableExportModule', {
|
|
|
1425
1443
|
return VxeUI.readFile(options)
|
|
1426
1444
|
},
|
|
1427
1445
|
print (options) {
|
|
1446
|
+
const $xeGrid = $xeTable.xeGrid
|
|
1447
|
+
const $xeGantt = $xeTable.xeGantt
|
|
1448
|
+
|
|
1428
1449
|
const printOpts = computePrintOpts.value
|
|
1429
1450
|
const opts = Object.assign({
|
|
1430
1451
|
original: false
|
|
@@ -1442,7 +1463,8 @@ hooks.add('tableExportModule', {
|
|
|
1442
1463
|
printTitle = sheetName({
|
|
1443
1464
|
options: opts,
|
|
1444
1465
|
$table: $xeTable,
|
|
1445
|
-
$grid: $xeGrid
|
|
1466
|
+
$grid: $xeGrid,
|
|
1467
|
+
$gantt: $xeGantt
|
|
1446
1468
|
})
|
|
1447
1469
|
} else {
|
|
1448
1470
|
printTitle = `${sheetName}`
|
|
@@ -1468,7 +1490,9 @@ hooks.add('tableExportModule', {
|
|
|
1468
1490
|
html,
|
|
1469
1491
|
content: html,
|
|
1470
1492
|
options: opts,
|
|
1471
|
-
$table: $xeTable
|
|
1493
|
+
$table: $xeTable,
|
|
1494
|
+
$grid: $xeGrid,
|
|
1495
|
+
$gantt: $xeGantt
|
|
1472
1496
|
})
|
|
1473
1497
|
}
|
|
1474
1498
|
: undefined
|
|
@@ -1487,7 +1511,9 @@ hooks.add('tableExportModule', {
|
|
|
1487
1511
|
html,
|
|
1488
1512
|
content: html,
|
|
1489
1513
|
options: opts,
|
|
1490
|
-
$table: $xeTable
|
|
1514
|
+
$table: $xeTable,
|
|
1515
|
+
$grid: $xeGrid,
|
|
1516
|
+
$gantt: $xeGantt
|
|
1491
1517
|
})
|
|
1492
1518
|
}
|
|
1493
1519
|
: undefined
|
|
@@ -94,6 +94,7 @@ export default defineVxeComponent({
|
|
|
94
94
|
|
|
95
95
|
const renderVN = () => {
|
|
96
96
|
const $xeGrid = $xeTable.xeGrid
|
|
97
|
+
const $xeGantt = $xeTable.xeGantt
|
|
97
98
|
|
|
98
99
|
const { defaultOptions, storeData } = props
|
|
99
100
|
const selectName = computeSelectName.value
|
|
@@ -130,6 +131,7 @@ export default defineVxeComponent({
|
|
|
130
131
|
const params = {
|
|
131
132
|
$table: $xeTable,
|
|
132
133
|
$grid: $xeGrid,
|
|
134
|
+
$gantt: $xeGantt,
|
|
133
135
|
options: defaultOptions,
|
|
134
136
|
params: defaultOptions.params as any
|
|
135
137
|
}
|
|
@@ -207,6 +209,7 @@ export default defineVxeComponent({
|
|
|
207
209
|
const params = {
|
|
208
210
|
$table: $xeTable,
|
|
209
211
|
$grid: $xeGrid,
|
|
212
|
+
$gantt: $xeGantt,
|
|
210
213
|
options: defaultOptions,
|
|
211
214
|
params: defaultOptions.params as any
|
|
212
215
|
}
|
|
@@ -280,11 +280,12 @@ hooks.add('tableMenuModule', {
|
|
|
280
280
|
*/
|
|
281
281
|
ctxMenuLinkEvent (evnt, menu) {
|
|
282
282
|
const $xeGrid = $xeTable.xeGrid
|
|
283
|
+
const $xeGantt = $xeTable.xeGantt
|
|
283
284
|
|
|
284
285
|
// 如果一级菜单有配置 code 则允许点击,否则不能点击
|
|
285
286
|
if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
286
287
|
const gMenuOpts = menus.get(menu.code)
|
|
287
|
-
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid, $event: evnt })
|
|
288
|
+
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, $event: evnt })
|
|
288
289
|
const tmMethod = gMenuOpts ? (gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod) : null
|
|
289
290
|
if (tmMethod) {
|
|
290
291
|
tmMethod(params, evnt)
|
|
@@ -463,6 +463,7 @@ hooks.add('tableValidatorModule', {
|
|
|
463
463
|
*/
|
|
464
464
|
validCellRules (validType, row, column, val) {
|
|
465
465
|
const $xeGrid = $xeTable.xeGrid
|
|
466
|
+
const $xeGantt = $xeTable.xeGantt
|
|
466
467
|
|
|
467
468
|
const { editRules } = props
|
|
468
469
|
const { field } = column
|
|
@@ -486,7 +487,8 @@ hooks.add('tableValidatorModule', {
|
|
|
486
487
|
columnIndex: $xeTable.getColumnIndex(column),
|
|
487
488
|
field: column.field,
|
|
488
489
|
$table: $xeTable,
|
|
489
|
-
$grid: $xeGrid
|
|
490
|
+
$grid: $xeGrid,
|
|
491
|
+
$gantt: $xeGantt
|
|
490
492
|
}
|
|
491
493
|
let customValid: any
|
|
492
494
|
if (XEUtils.isString(validator)) {
|
|
@@ -102,6 +102,7 @@ export default defineVxeComponent({
|
|
|
102
102
|
items: any[]
|
|
103
103
|
) => {
|
|
104
104
|
const $xeGrid = $xeTable.xeGrid
|
|
105
|
+
const $xeGantt = $xeTable.xeGantt
|
|
105
106
|
|
|
106
107
|
const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, treeConfig, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps
|
|
107
108
|
const { tableData, tableColumn, dragRow, overflowX, overflowY, currentColumn, scrollXLoad, scrollYLoad, mergeBodyFlag, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, editStore, isAllOverflow, validErrorMaps } = tableReactData
|
|
@@ -162,6 +163,7 @@ export default defineVxeComponent({
|
|
|
162
163
|
} = {
|
|
163
164
|
$table: $xeTable,
|
|
164
165
|
$grid: $xeGrid,
|
|
166
|
+
$gantt: $xeGantt,
|
|
165
167
|
isEdit: false,
|
|
166
168
|
seq,
|
|
167
169
|
rowid,
|
|
@@ -469,6 +471,7 @@ export default defineVxeComponent({
|
|
|
469
471
|
|
|
470
472
|
const renderRows = (fixedType: 'left' | 'right' | '', isOptimizeMode: boolean, tableData: any[], tableColumn: VxeTableDefines.ColumnInfo[]) => {
|
|
471
473
|
const $xeGrid = $xeTable.xeGrid
|
|
474
|
+
const $xeGantt = $xeTable.xeGantt
|
|
472
475
|
|
|
473
476
|
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps
|
|
474
477
|
const { hasFixedColumn, treeExpandedFlag, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData
|
|
@@ -608,8 +611,9 @@ export default defineVxeComponent({
|
|
|
608
611
|
_columnIndex = colRest._index
|
|
609
612
|
}
|
|
610
613
|
const expandParams: VxeTableDefines.CellRenderDataParams = {
|
|
611
|
-
$grid: $xeGrid,
|
|
612
614
|
$table: $xeTable,
|
|
615
|
+
$grid: $xeGrid,
|
|
616
|
+
$gantt: $xeGantt,
|
|
613
617
|
seq,
|
|
614
618
|
column: expandColumn as VxeTableDefines.ColumnInfo,
|
|
615
619
|
columnIndex,
|
|
@@ -697,6 +701,7 @@ export default defineVxeComponent({
|
|
|
697
701
|
const renderVN = () => {
|
|
698
702
|
const { slots } = tableContext
|
|
699
703
|
const $xeGrid = $xeTable.xeGrid
|
|
704
|
+
const $xeGantt = $xeTable.xeGantt
|
|
700
705
|
|
|
701
706
|
const { fixedColumn, fixedType, tableColumn } = props
|
|
702
707
|
const { spanMethod, footerSpanMethod, mouseConfig } = tableProps
|
|
@@ -778,7 +783,7 @@ export default defineVxeComponent({
|
|
|
778
783
|
|
|
779
784
|
let emptyContent: string | VxeComponentSlotType | VxeComponentSlotType[]
|
|
780
785
|
const emptySlot = slots ? slots.empty : null
|
|
781
|
-
const emptyParams = { $table: $xeTable, $grid: $xeGrid }
|
|
786
|
+
const emptyParams = { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }
|
|
782
787
|
if (emptySlot) {
|
|
783
788
|
emptyContent = $xeTable.callSlot(emptySlot, emptyParams)
|
|
784
789
|
} else {
|
|
@@ -12,6 +12,8 @@ export class ColumnInfo {
|
|
|
12
12
|
constructor ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, _vm: any, { renderHeader, renderCell, renderFooter, renderData }: any = {}) {
|
|
13
13
|
const tableProps = $xeTable.props
|
|
14
14
|
const $xeGrid = $xeTable.xeGrid
|
|
15
|
+
const $xeGantt = $xeTable.xeGantt
|
|
16
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
15
17
|
|
|
16
18
|
const { field, editRender } = _vm
|
|
17
19
|
|
|
@@ -166,11 +168,11 @@ export class ColumnInfo {
|
|
|
166
168
|
// 单元格插槽,只对 grid 有效
|
|
167
169
|
slots: _vm.slots
|
|
168
170
|
})
|
|
169
|
-
if ($
|
|
170
|
-
const { computeProxyOpts } = $
|
|
171
|
+
if ($xeGGWrapper) {
|
|
172
|
+
const { computeProxyOpts } = $xeGGWrapper.getComputeMaps()
|
|
171
173
|
const proxyOpts = computeProxyOpts.value
|
|
172
174
|
if (proxyOpts.beforeColumn) {
|
|
173
|
-
proxyOpts.beforeColumn({ $grid: $xeGrid, column: this })
|
|
175
|
+
proxyOpts.beforeColumn({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, column: this })
|
|
174
176
|
}
|
|
175
177
|
}
|
|
176
178
|
}
|
|
@@ -46,6 +46,7 @@ export default defineVxeComponent({
|
|
|
46
46
|
|
|
47
47
|
const renderRows = (isOptimizeMode: boolean, tableColumn: VxeTableDefines.ColumnInfo[], footerTableData: any[], row: any, $rowIndex: number, _rowIndex: number) => {
|
|
48
48
|
const $xeGrid = $xeTable.xeGrid
|
|
49
|
+
const $xeGantt = $xeTable.xeGantt
|
|
49
50
|
|
|
50
51
|
const { fixedType } = props
|
|
51
52
|
const { resizable: allResizable, border, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps
|
|
@@ -87,6 +88,7 @@ export default defineVxeComponent({
|
|
|
87
88
|
} = {
|
|
88
89
|
$table: $xeTable,
|
|
89
90
|
$grid: $xeGrid,
|
|
91
|
+
$gantt: $xeGantt,
|
|
90
92
|
row,
|
|
91
93
|
rowIndex: _rowIndex,
|
|
92
94
|
_rowIndex,
|
|
@@ -45,6 +45,7 @@ export default defineVxeComponent({
|
|
|
45
45
|
|
|
46
46
|
const renderRows = (isGroup: boolean, isOptimizeMode: boolean, cols: VxeTableDefines.ColumnInfo[], $rowIndex: number) => {
|
|
47
47
|
const $xeGrid = $xeTable.xeGrid
|
|
48
|
+
const $xeGantt = $xeTable.xeGantt
|
|
48
49
|
|
|
49
50
|
const { fixedType } = props
|
|
50
51
|
const { resizable: allResizable, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, mouseConfig } = tableProps
|
|
@@ -87,6 +88,7 @@ export default defineVxeComponent({
|
|
|
87
88
|
} = {
|
|
88
89
|
$table: $xeTable,
|
|
89
90
|
$grid: $xeGrid,
|
|
91
|
+
$gantt: $xeGantt,
|
|
90
92
|
$rowIndex,
|
|
91
93
|
column,
|
|
92
94
|
columnIndex,
|