vxe-table 3.18.0-beta.3 → 3.18.0-beta.5
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 +2 -2
- package/es/style.css +1 -1
- package/es/table/module/custom/mixin.js +10 -3
- package/es/table/module/custom/panel.js +23 -2
- package/es/table/module/keyboard/mixin.js +2 -2
- package/es/table/src/cell.js +7 -2
- package/es/table/src/methods.js +44 -12
- package/es/table/src/table.js +9 -1
- package/es/table/src/util.js +1 -0
- package/es/toolbar/src/toolbar.js +42 -23
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +2 -2
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +152 -42
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/mixin.js +10 -3
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +25 -2
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +2 -2
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/src/cell.js +11 -2
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +47 -12
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +9 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +1 -0
- package/lib/table/src/util.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +43 -16
- package/lib/toolbar/src/toolbar.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 +2 -2
- package/packages/table/module/custom/mixin.ts +10 -3
- package/packages/table/module/custom/panel.ts +24 -2
- package/packages/table/module/keyboard/mixin.ts +2 -2
- package/packages/table/src/cell.ts +7 -2
- package/packages/table/src/methods.ts +44 -12
- package/packages/table/src/table.ts +10 -1
- package/packages/table/src/util.ts +2 -0
- package/packages/toolbar/src/toolbar.ts +43 -23
- /package/es/{iconfont.1755253931426.ttf → iconfont.1755588944779.ttf} +0 -0
- /package/es/{iconfont.1755253931426.woff → iconfont.1755588944779.woff} +0 -0
- /package/es/{iconfont.1755253931426.woff2 → iconfont.1755588944779.woff2} +0 -0
- /package/lib/{iconfont.1755253931426.ttf → iconfont.1755588944779.ttf} +0 -0
- /package/lib/{iconfont.1755253931426.woff → iconfont.1755588944779.woff} +0 -0
- /package/lib/{iconfont.1755253931426.woff2 → iconfont.1755588944779.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2002,7 +2002,7 @@ function getClass(property, params) {
|
|
|
2002
2002
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2003
2003
|
|
|
2004
2004
|
|
|
2005
|
-
const version = "3.18.0-beta.
|
|
2005
|
+
const version = "3.18.0-beta.5";
|
|
2006
2006
|
core_.VxeUI.version = version;
|
|
2007
2007
|
core_.VxeUI.tableVersion = version;
|
|
2008
2008
|
core_.VxeUI.setConfig({
|
|
@@ -2678,7 +2678,7 @@ function isNodeElement(elem) {
|
|
|
2678
2678
|
const {
|
|
2679
2679
|
log: log_log
|
|
2680
2680
|
} = core_.VxeUI;
|
|
2681
|
-
const log_version = `table v${"3.18.0-beta.
|
|
2681
|
+
const log_version = `table v${"3.18.0-beta.5"}`;
|
|
2682
2682
|
const warnLog = log_log.create('warn', log_version);
|
|
2683
2683
|
const errLog = log_log.create('error', log_version);
|
|
2684
2684
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -3006,6 +3006,7 @@ function createInternalData() {
|
|
|
3006
3006
|
tBodyHeight: 0,
|
|
3007
3007
|
// 表尾高度
|
|
3008
3008
|
tFooterHeight: 0,
|
|
3009
|
+
teleportToWrapperElem: null,
|
|
3009
3010
|
inited: false,
|
|
3010
3011
|
tooltipTimeout: null,
|
|
3011
3012
|
initStatus: false,
|
|
@@ -4104,6 +4105,8 @@ const Cell = {
|
|
|
4104
4105
|
aggFunc
|
|
4105
4106
|
} = column;
|
|
4106
4107
|
const renderOpts = editRender || cellRender;
|
|
4108
|
+
const defaultSlot = slots ? slots.default : null;
|
|
4109
|
+
const gcSlot = slots ? slots.groupContent || slots['group-content'] : null;
|
|
4107
4110
|
let cellValue = '';
|
|
4108
4111
|
if (isRowGroupStatus && field && row.isAggregate) {
|
|
4109
4112
|
const aggRow = row;
|
|
@@ -4140,6 +4143,13 @@ const Cell = {
|
|
|
4140
4143
|
*/
|
|
4141
4144
|
totalValue: childCount
|
|
4142
4145
|
};
|
|
4146
|
+
if (gcSlot) {
|
|
4147
|
+
return renderCellBaseVNs(h, params, $table.callSlot(gcSlot, Object.assign({
|
|
4148
|
+
groupField,
|
|
4149
|
+
groupContent,
|
|
4150
|
+
childCount
|
|
4151
|
+
}, params), h));
|
|
4152
|
+
}
|
|
4143
4153
|
if (mode === 'column' ? field === aggRow.groupField : rowGroupNode) {
|
|
4144
4154
|
cellValue = groupContent;
|
|
4145
4155
|
if (contentMethod) {
|
|
@@ -4157,8 +4167,8 @@ const Cell = {
|
|
|
4157
4167
|
}
|
|
4158
4168
|
}
|
|
4159
4169
|
} else {
|
|
4160
|
-
if (
|
|
4161
|
-
return renderCellBaseVNs(h, params, $table.callSlot(
|
|
4170
|
+
if (defaultSlot) {
|
|
4171
|
+
return renderCellBaseVNs(h, params, $table.callSlot(defaultSlot, params, h));
|
|
4162
4172
|
}
|
|
4163
4173
|
if (renderOpts) {
|
|
4164
4174
|
const compConf = cell_renderer.get(renderOpts.name);
|
|
@@ -6175,7 +6185,7 @@ function updateScrollYStatus($xeTable, fullData) {
|
|
|
6175
6185
|
// 如果gt为0,则总是启用
|
|
6176
6186
|
const scrollYLoad = (transform || !treeConfig) && !!virtualYOpts.enabled && virtualYOpts.gt > -1 && (virtualYOpts.gt === 0 || virtualYOpts.gt < allList.length);
|
|
6177
6187
|
reactData.scrollYLoad = scrollYLoad;
|
|
6178
|
-
if ($xeGanttView) {
|
|
6188
|
+
if ($xeGanttView && $xeGanttView.handleUpdateSYStatus) {
|
|
6179
6189
|
$xeGanttView.handleUpdateSYStatus(scrollYLoad);
|
|
6180
6190
|
}
|
|
6181
6191
|
return scrollYLoad;
|
|
@@ -7207,7 +7217,7 @@ function updateStyle($xeTable) {
|
|
|
7207
7217
|
if (mouseConfig && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
7208
7218
|
$xeTable.addCellSelectedClass();
|
|
7209
7219
|
}
|
|
7210
|
-
if ($xeGanttView) {
|
|
7220
|
+
if ($xeGanttView && $xeGanttView.handleUpdateStyle) {
|
|
7211
7221
|
$xeGanttView.handleUpdateStyle();
|
|
7212
7222
|
}
|
|
7213
7223
|
return $xeTable.$nextTick();
|
|
@@ -9010,7 +9020,7 @@ function handleLazyRecalculate($xeTable, reFull, reWidth, reHeight) {
|
|
|
9010
9020
|
} else {
|
|
9011
9021
|
resolve(handleRecalculateStyle($xeTable, reFull, reWidth, reHeight));
|
|
9012
9022
|
}
|
|
9013
|
-
if ($xeGanttView) {
|
|
9023
|
+
if ($xeGanttView && $xeGanttView.handleLazyRecalculate) {
|
|
9014
9024
|
$xeGanttView.handleLazyRecalculate();
|
|
9015
9025
|
}
|
|
9016
9026
|
internalData.rceTimeout = setTimeout(() => {
|
|
@@ -9309,6 +9319,7 @@ function loadTableData($xeTable, datas, isReset) {
|
|
|
9309
9319
|
}).then(() => {
|
|
9310
9320
|
computeScrollLoad($xeTable);
|
|
9311
9321
|
}).then(() => {
|
|
9322
|
+
const virtualYOpts = $xeTable.computeVirtualYOpts;
|
|
9312
9323
|
// 是否启用了虚拟滚动
|
|
9313
9324
|
if (sYLoad) {
|
|
9314
9325
|
scrollYStore.endIndex = scrollYStore.visibleSize;
|
|
@@ -9317,6 +9328,9 @@ function loadTableData($xeTable, datas, isReset) {
|
|
|
9317
9328
|
if (reactData.expandColumn && expandOpts.mode !== 'fixed') {
|
|
9318
9329
|
errLog('vxe.error.notConflictProp', ['column.type="expand', 'expand-config.mode="fixed"']);
|
|
9319
9330
|
}
|
|
9331
|
+
if (virtualYOpts.mode === 'scroll' && expandOpts.mode === 'fixed') {
|
|
9332
|
+
warnLog('vxe.error.notConflictProp', ['virtual-y-config.mode=scroll', 'expand-config.mode=inside']);
|
|
9333
|
+
}
|
|
9320
9334
|
// if (showOverflow) {
|
|
9321
9335
|
// if (!rowOpts.height) {
|
|
9322
9336
|
// const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false)
|
|
@@ -10140,7 +10154,7 @@ const Methods = {
|
|
|
10140
10154
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
10141
10155
|
if (slotFunc) {
|
|
10142
10156
|
if ($xeGGWrapper) {
|
|
10143
|
-
return $xeGGWrapper.callSlot(slotFunc, params, h
|
|
10157
|
+
return $xeGGWrapper.callSlot(slotFunc, params, h);
|
|
10144
10158
|
}
|
|
10145
10159
|
// if (XEUtils.isString(slotFunc)) {
|
|
10146
10160
|
// slotFunc = slots[slotFunc] || null
|
|
@@ -10295,7 +10309,7 @@ const Methods = {
|
|
|
10295
10309
|
});
|
|
10296
10310
|
reactData.tableData = tableData;
|
|
10297
10311
|
internalData.visibleDataRowIdData = visibleDataRowIdMaps;
|
|
10298
|
-
if ($xeGanttView) {
|
|
10312
|
+
if ($xeGanttView && $xeGanttView.updateViewData) {
|
|
10299
10313
|
$xeGanttView.updateViewData();
|
|
10300
10314
|
}
|
|
10301
10315
|
return $xeTable.$nextTick();
|
|
@@ -11426,6 +11440,35 @@ const Methods = {
|
|
|
11426
11440
|
}
|
|
11427
11441
|
return [];
|
|
11428
11442
|
},
|
|
11443
|
+
/**
|
|
11444
|
+
* 只对 tree-config 有效,用于树形结构,获取指定行的层级
|
|
11445
|
+
*/
|
|
11446
|
+
getTreeRowLevel(rowOrRowid) {
|
|
11447
|
+
const $xeTable = this;
|
|
11448
|
+
const props = $xeTable;
|
|
11449
|
+
const internalData = $xeTable;
|
|
11450
|
+
const {
|
|
11451
|
+
treeConfig
|
|
11452
|
+
} = props;
|
|
11453
|
+
const {
|
|
11454
|
+
fullAllDataRowIdData
|
|
11455
|
+
} = internalData;
|
|
11456
|
+
if (rowOrRowid && treeConfig) {
|
|
11457
|
+
let rowid;
|
|
11458
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowOrRowid)) {
|
|
11459
|
+
rowid = rowOrRowid;
|
|
11460
|
+
} else {
|
|
11461
|
+
rowid = getRowid($xeTable, rowOrRowid);
|
|
11462
|
+
}
|
|
11463
|
+
if (rowid) {
|
|
11464
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
11465
|
+
if (rest) {
|
|
11466
|
+
return rest.level;
|
|
11467
|
+
}
|
|
11468
|
+
}
|
|
11469
|
+
}
|
|
11470
|
+
return -1;
|
|
11471
|
+
},
|
|
11429
11472
|
/**
|
|
11430
11473
|
* 只对 tree-config 有效,获取行的父级
|
|
11431
11474
|
*/
|
|
@@ -11448,7 +11491,9 @@ const Methods = {
|
|
|
11448
11491
|
}
|
|
11449
11492
|
if (rowid) {
|
|
11450
11493
|
const rest = fullAllDataRowIdData[rowid];
|
|
11451
|
-
|
|
11494
|
+
if (rest) {
|
|
11495
|
+
return rest.parent;
|
|
11496
|
+
}
|
|
11452
11497
|
}
|
|
11453
11498
|
}
|
|
11454
11499
|
return null;
|
|
@@ -14566,7 +14611,7 @@ const Methods = {
|
|
|
14566
14611
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll(`[rowid="${getRowid($xeTable, row)}"]`), elem => addClass(elem, 'row--current'));
|
|
14567
14612
|
}
|
|
14568
14613
|
}
|
|
14569
|
-
if ($xeGanttView) {
|
|
14614
|
+
if ($xeGanttView && $xeGanttView.handleUpdateCurrentRow) {
|
|
14570
14615
|
$xeGanttView.handleUpdateCurrentRow(row);
|
|
14571
14616
|
}
|
|
14572
14617
|
return this.$nextTick();
|
|
@@ -14631,7 +14676,7 @@ const Methods = {
|
|
|
14631
14676
|
if (el) {
|
|
14632
14677
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll('.row--current'), elem => removeClass(elem, 'row--current'));
|
|
14633
14678
|
}
|
|
14634
|
-
if ($xeGanttView) {
|
|
14679
|
+
if ($xeGanttView && $xeGanttView.handleUpdateCurrentRow) {
|
|
14635
14680
|
$xeGanttView.handleUpdateCurrentRow();
|
|
14636
14681
|
}
|
|
14637
14682
|
return $xeTable.$nextTick();
|
|
@@ -14714,7 +14759,7 @@ const Methods = {
|
|
|
14714
14759
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll(`.vxe-body--row[rowid="${getRowid($xeTable, row)}"]`), elem => addClass(elem, 'row--hover'));
|
|
14715
14760
|
}
|
|
14716
14761
|
internalData.hoverRow = row;
|
|
14717
|
-
if ($xeGanttView) {
|
|
14762
|
+
if ($xeGanttView && $xeGanttView.handleUpdateHoverRow) {
|
|
14718
14763
|
$xeGanttView.handleUpdateHoverRow(row);
|
|
14719
14764
|
}
|
|
14720
14765
|
},
|
|
@@ -14727,7 +14772,7 @@ const Methods = {
|
|
|
14727
14772
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll('.vxe-body--row.row--hover'), elem => removeClass(elem, 'row--hover'));
|
|
14728
14773
|
}
|
|
14729
14774
|
internalData.hoverRow = null;
|
|
14730
|
-
if ($xeGanttView) {
|
|
14775
|
+
if ($xeGanttView && $xeGanttView.handleUpdateHoverRow) {
|
|
14731
14776
|
$xeGanttView.handleUpdateHoverRow();
|
|
14732
14777
|
}
|
|
14733
14778
|
},
|
|
@@ -17931,7 +17976,7 @@ const Methods = {
|
|
|
17931
17976
|
if (isScrollXBig && mouseOpts.area) {
|
|
17932
17977
|
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
17933
17978
|
}
|
|
17934
|
-
if ($xeGanttView) {
|
|
17979
|
+
if ($xeGanttView && $xeGanttView.handleUpdateSXSpace) {
|
|
17935
17980
|
$xeGanttView.handleUpdateSXSpace();
|
|
17936
17981
|
}
|
|
17937
17982
|
return $xeTable.$nextTick(() => {
|
|
@@ -18062,7 +18107,7 @@ const Methods = {
|
|
|
18062
18107
|
if (isScrollYBig && mouseOpts.area) {
|
|
18063
18108
|
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
18064
18109
|
}
|
|
18065
|
-
if ($xeGanttView) {
|
|
18110
|
+
if ($xeGanttView && $xeGanttView.handleUpdateSYSpace) {
|
|
18066
18111
|
$xeGanttView.handleUpdateSYSpace();
|
|
18067
18112
|
}
|
|
18068
18113
|
return $xeTable.$nextTick().then(() => {
|
|
@@ -20704,6 +20749,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
20704
20749
|
}
|
|
20705
20750
|
});
|
|
20706
20751
|
return h('div', {
|
|
20752
|
+
ref: 'refElem',
|
|
20707
20753
|
key: 'simple',
|
|
20708
20754
|
class: ['vxe-table-custom-wrapper', `placement--${placement}`, {
|
|
20709
20755
|
'is--active': customStore.visible
|
|
@@ -20803,7 +20849,7 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
20803
20849
|
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
20804
20850
|
const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
|
|
20805
20851
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
20806
|
-
const VxeUINumberInputComponent = core_.VxeUI.getComponent('
|
|
20852
|
+
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
|
|
20807
20853
|
const _vm = $xeTableCustomPanel;
|
|
20808
20854
|
const props = $xeTableCustomPanel;
|
|
20809
20855
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
@@ -21213,6 +21259,8 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
21213
21259
|
const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
|
|
21214
21260
|
$xeTableCustomPanel.$nextTick(() => {
|
|
21215
21261
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
21262
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
21263
|
+
const tableInternalData = $xeTable;
|
|
21216
21264
|
const {
|
|
21217
21265
|
customOpts
|
|
21218
21266
|
} = $xeTable;
|
|
@@ -21229,13 +21277,33 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
21229
21277
|
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
21230
21278
|
}
|
|
21231
21279
|
if (!VxeUINumberInputComponent) {
|
|
21232
|
-
errLog('vxe.error.reqComp', ['vxe-input']);
|
|
21280
|
+
errLog('vxe.error.reqComp', ['vxe-number-input']);
|
|
21233
21281
|
}
|
|
21234
21282
|
if (!VxeUIRadioGroupComponent) {
|
|
21235
21283
|
errLog('vxe.error.reqComp', ['vxe-radio-group']);
|
|
21236
21284
|
}
|
|
21285
|
+
if ($xeGantt) {
|
|
21286
|
+
const {
|
|
21287
|
+
teleportToWrapperElem
|
|
21288
|
+
} = tableInternalData;
|
|
21289
|
+
const el = $xeTableCustomPanel.$refs.refElem;
|
|
21290
|
+
if (el && teleportToWrapperElem) {
|
|
21291
|
+
teleportToWrapperElem.appendChild(el);
|
|
21292
|
+
}
|
|
21293
|
+
}
|
|
21237
21294
|
});
|
|
21238
21295
|
},
|
|
21296
|
+
beforeDestroy() {
|
|
21297
|
+
const $xeTableCustomPanel = this;
|
|
21298
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
21299
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
21300
|
+
if ($xeGantt) {
|
|
21301
|
+
const el = $xeTableCustomPanel.$refs.refElem;
|
|
21302
|
+
if (el && el.parentElement) {
|
|
21303
|
+
el.parentElement.removeChild(el);
|
|
21304
|
+
}
|
|
21305
|
+
}
|
|
21306
|
+
},
|
|
21239
21307
|
render(h) {
|
|
21240
21308
|
const $xeTableCustomPanel = this;
|
|
21241
21309
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
@@ -27236,8 +27304,8 @@ function handleMoveSelected($xeTable, evnt, args, isLeftArrow, isUpArrow, isRigh
|
|
|
27236
27304
|
mouseConfig,
|
|
27237
27305
|
mouseOpts
|
|
27238
27306
|
} = this;
|
|
27239
|
-
if (mouseConfig && mouseOpts.area && $xeTable.
|
|
27240
|
-
return $xeTable.
|
|
27307
|
+
if (mouseConfig && mouseOpts.area && $xeTable.triggerCellAreaModnEvent) {
|
|
27308
|
+
return $xeTable.triggerCellAreaModnEvent(evnt, params);
|
|
27241
27309
|
} else {
|
|
27242
27310
|
if (checkboxConfig && checkboxOpts.range) {
|
|
27243
27311
|
this.handleCheckboxRangeEvent(evnt, params);
|
|
@@ -28128,15 +28196,22 @@ function checkRuleStatus(rule, val) {
|
|
|
28128
28196
|
|
|
28129
28197
|
|
|
28130
28198
|
function calcMaxHeight($xeTable) {
|
|
28199
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
28131
28200
|
const reactData = $xeTable;
|
|
28132
28201
|
const {
|
|
28133
28202
|
customStore
|
|
28134
28203
|
} = reactData;
|
|
28135
|
-
|
|
28204
|
+
let wrapperEl = $xeTable.$refs.refElem;
|
|
28136
28205
|
// 判断面板不能大于表格高度
|
|
28137
28206
|
let tableHeight = 0;
|
|
28138
|
-
if (
|
|
28139
|
-
|
|
28207
|
+
if ($xeGantt) {
|
|
28208
|
+
const ganttContainerElem = $xeGantt.$refs.refGanttContainerElem;
|
|
28209
|
+
if (ganttContainerElem) {
|
|
28210
|
+
wrapperEl = ganttContainerElem;
|
|
28211
|
+
}
|
|
28212
|
+
}
|
|
28213
|
+
if (wrapperEl) {
|
|
28214
|
+
tableHeight = wrapperEl.clientHeight - 28;
|
|
28140
28215
|
}
|
|
28141
28216
|
customStore.maxHeight = Math.max(88, tableHeight);
|
|
28142
28217
|
}
|
|
@@ -30138,7 +30213,7 @@ function renderBody(h, $xeTable) {
|
|
|
30138
30213
|
if (rowOpts.height && !this.showOverflow) {
|
|
30139
30214
|
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
30140
30215
|
}
|
|
30141
|
-
if (!$xeTable.
|
|
30216
|
+
if (!$xeTable.triggerCellAreaModnEvent) {
|
|
30142
30217
|
if (props.areaConfig) {
|
|
30143
30218
|
warnLog('vxe.error.notProp', ['area-config']);
|
|
30144
30219
|
}
|
|
@@ -30306,10 +30381,18 @@ function renderBody(h, $xeTable) {
|
|
|
30306
30381
|
mounted() {
|
|
30307
30382
|
const $xeTable = this;
|
|
30308
30383
|
const props = $xeTable;
|
|
30384
|
+
const internalData = $xeTable;
|
|
30385
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
30309
30386
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
30310
30387
|
const rowOpts = $xeTable.computeRowOpts;
|
|
30311
30388
|
const customOpts = $xeTable.computeCustomOpts;
|
|
30312
30389
|
const virtualYOpts = $xeTable.computeVirtualYOpts;
|
|
30390
|
+
if ($xeGantt) {
|
|
30391
|
+
const classifyWrapperEl = $xeGantt.$refs.refClassifyWrapperElem;
|
|
30392
|
+
if (classifyWrapperEl) {
|
|
30393
|
+
internalData.teleportToWrapperElem = classifyWrapperEl;
|
|
30394
|
+
}
|
|
30395
|
+
}
|
|
30313
30396
|
if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
|
|
30314
30397
|
initTpImg();
|
|
30315
30398
|
}
|
|
@@ -30762,6 +30845,9 @@ function toolbar_createInternalData() {
|
|
|
30762
30845
|
inject: {
|
|
30763
30846
|
$xeGrid: {
|
|
30764
30847
|
default: null
|
|
30848
|
+
},
|
|
30849
|
+
$xeGantt: {
|
|
30850
|
+
default: null
|
|
30765
30851
|
}
|
|
30766
30852
|
},
|
|
30767
30853
|
data() {
|
|
@@ -30925,6 +31011,8 @@ function toolbar_createInternalData() {
|
|
|
30925
31011
|
const $xeToolbar = this;
|
|
30926
31012
|
const reactData = $xeToolbar.reactData;
|
|
30927
31013
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31014
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31015
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
30928
31016
|
const {
|
|
30929
31017
|
isRefresh
|
|
30930
31018
|
} = reactData;
|
|
@@ -30940,11 +31028,11 @@ function toolbar_createInternalData() {
|
|
|
30940
31028
|
} catch (e) {
|
|
30941
31029
|
reactData.isRefresh = false;
|
|
30942
31030
|
}
|
|
30943
|
-
} else if ($
|
|
31031
|
+
} else if ($xeGGWrapper) {
|
|
30944
31032
|
reactData.isRefresh = true;
|
|
30945
|
-
$
|
|
31033
|
+
$xeGGWrapper.triggerToolbarCommitEvent({
|
|
30946
31034
|
code: refreshOpts.code || 'reload'
|
|
30947
|
-
}, $event).catch(
|
|
31035
|
+
}, $event).catch(() => {}).then(() => {
|
|
30948
31036
|
reactData.isRefresh = false;
|
|
30949
31037
|
});
|
|
30950
31038
|
}
|
|
@@ -30955,8 +31043,10 @@ function toolbar_createInternalData() {
|
|
|
30955
31043
|
}) {
|
|
30956
31044
|
const $xeToolbar = this;
|
|
30957
31045
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
30958
|
-
|
|
30959
|
-
|
|
31046
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31047
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
31048
|
+
if ($xeGGWrapper) {
|
|
31049
|
+
$xeGGWrapper.triggerZoomEvent($event);
|
|
30960
31050
|
} else {
|
|
30961
31051
|
warnLog('vxe.error.notProp', ['zoom']);
|
|
30962
31052
|
}
|
|
@@ -31078,6 +31168,8 @@ function toolbar_createInternalData() {
|
|
|
31078
31168
|
const $xeToolbar = this;
|
|
31079
31169
|
const internalData = $xeToolbar.internalData;
|
|
31080
31170
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31171
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31172
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
31081
31173
|
const {
|
|
31082
31174
|
$event
|
|
31083
31175
|
} = eventParams;
|
|
@@ -31090,8 +31182,8 @@ function toolbar_createInternalData() {
|
|
|
31090
31182
|
} = item;
|
|
31091
31183
|
if (code) {
|
|
31092
31184
|
$xeToolbar.handleDefaultCodeEvent(eventParams, item, () => {
|
|
31093
|
-
if ($
|
|
31094
|
-
$
|
|
31185
|
+
if ($xeGGWrapper) {
|
|
31186
|
+
$xeGGWrapper.triggerToolbarBtnEvent(item, $event);
|
|
31095
31187
|
} else {
|
|
31096
31188
|
const gCommandOpts = toolbar_commands.get(code);
|
|
31097
31189
|
const params = {
|
|
@@ -31099,7 +31191,7 @@ function toolbar_createInternalData() {
|
|
|
31099
31191
|
button: item,
|
|
31100
31192
|
$table: $table,
|
|
31101
31193
|
$grid: $xeGrid,
|
|
31102
|
-
$gantt:
|
|
31194
|
+
$gantt: $xeGantt,
|
|
31103
31195
|
$event
|
|
31104
31196
|
};
|
|
31105
31197
|
if (gCommandOpts) {
|
|
@@ -31119,6 +31211,8 @@ function toolbar_createInternalData() {
|
|
|
31119
31211
|
const $xeToolbar = this;
|
|
31120
31212
|
const internalData = $xeToolbar.internalData;
|
|
31121
31213
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31214
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31215
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
31122
31216
|
const {
|
|
31123
31217
|
$event
|
|
31124
31218
|
} = eventParams;
|
|
@@ -31131,8 +31225,8 @@ function toolbar_createInternalData() {
|
|
|
31131
31225
|
} = item;
|
|
31132
31226
|
if (code) {
|
|
31133
31227
|
$xeToolbar.handleDefaultCodeEvent(eventParams, item, () => {
|
|
31134
|
-
if ($
|
|
31135
|
-
$
|
|
31228
|
+
if ($xeGGWrapper) {
|
|
31229
|
+
$xeGGWrapper.triggerToolbarTolEvent(item, $event);
|
|
31136
31230
|
} else {
|
|
31137
31231
|
const gCommandOpts = toolbar_commands.get(code);
|
|
31138
31232
|
const params = {
|
|
@@ -31141,7 +31235,7 @@ function toolbar_createInternalData() {
|
|
|
31141
31235
|
tool: item,
|
|
31142
31236
|
$table: $table,
|
|
31143
31237
|
$grid: $xeGrid,
|
|
31144
|
-
$gantt:
|
|
31238
|
+
$gantt: $xeGantt,
|
|
31145
31239
|
$event
|
|
31146
31240
|
};
|
|
31147
31241
|
if (gCommandOpts) {
|
|
@@ -31210,6 +31304,7 @@ function toolbar_createInternalData() {
|
|
|
31210
31304
|
const slots = $xeToolbar.$scopedSlots;
|
|
31211
31305
|
const internalData = $xeToolbar.internalData;
|
|
31212
31306
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31307
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31213
31308
|
const {
|
|
31214
31309
|
buttons
|
|
31215
31310
|
} = props;
|
|
@@ -31224,6 +31319,7 @@ function toolbar_createInternalData() {
|
|
|
31224
31319
|
btnVNs.push(...getSlotVNs(buttonPrefixSlot.call($xeToolbar, {
|
|
31225
31320
|
buttons: buttons || [],
|
|
31226
31321
|
$grid: $xeGrid,
|
|
31322
|
+
$gantt: $xeGantt,
|
|
31227
31323
|
$table: $table
|
|
31228
31324
|
})));
|
|
31229
31325
|
}
|
|
@@ -31239,6 +31335,7 @@ function toolbar_createInternalData() {
|
|
|
31239
31335
|
const toolbarButtonClassName = compConf.toolbarButtonClassName;
|
|
31240
31336
|
const params = {
|
|
31241
31337
|
$grid: $xeGrid,
|
|
31338
|
+
$gantt: $xeGantt,
|
|
31242
31339
|
$table: $table,
|
|
31243
31340
|
button: item
|
|
31244
31341
|
};
|
|
@@ -31283,6 +31380,7 @@ function toolbar_createInternalData() {
|
|
|
31283
31380
|
btnVNs.push(...getSlotVNs(buttonSuffixSlot.call($xeToolbar, {
|
|
31284
31381
|
buttons: buttons || [],
|
|
31285
31382
|
$grid: $xeGrid,
|
|
31383
|
+
$gantt: $xeGantt,
|
|
31286
31384
|
$table: $table
|
|
31287
31385
|
})));
|
|
31288
31386
|
}
|
|
@@ -31299,6 +31397,7 @@ function toolbar_createInternalData() {
|
|
|
31299
31397
|
const slots = $xeToolbar.$scopedSlots;
|
|
31300
31398
|
const internalData = $xeToolbar.internalData;
|
|
31301
31399
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31400
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31302
31401
|
const {
|
|
31303
31402
|
tools
|
|
31304
31403
|
} = props;
|
|
@@ -31313,6 +31412,7 @@ function toolbar_createInternalData() {
|
|
|
31313
31412
|
btnVNs.push(...getSlotVNs(toolPrefixSlot.call($xeToolbar, {
|
|
31314
31413
|
tools: tools || [],
|
|
31315
31414
|
$grid: $xeGrid,
|
|
31415
|
+
$gantt: $xeGantt,
|
|
31316
31416
|
$table: $table
|
|
31317
31417
|
})));
|
|
31318
31418
|
}
|
|
@@ -31329,6 +31429,7 @@ function toolbar_createInternalData() {
|
|
|
31329
31429
|
const toolbarToolClassName = compConf.toolbarToolClassName;
|
|
31330
31430
|
const params = {
|
|
31331
31431
|
$grid: $xeGrid,
|
|
31432
|
+
$gantt: $xeGantt,
|
|
31332
31433
|
$table: $table,
|
|
31333
31434
|
tool: item
|
|
31334
31435
|
};
|
|
@@ -31375,6 +31476,7 @@ function toolbar_createInternalData() {
|
|
|
31375
31476
|
btnVNs.push(...getSlotVNs(toolSuffixSlot.call($xeToolbar, {
|
|
31376
31477
|
tools: tools || [],
|
|
31377
31478
|
$grid: $xeGrid,
|
|
31479
|
+
$gantt: $xeGantt,
|
|
31378
31480
|
$table: $table
|
|
31379
31481
|
})));
|
|
31380
31482
|
}
|
|
@@ -31454,13 +31556,15 @@ function toolbar_createInternalData() {
|
|
|
31454
31556
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
31455
31557
|
const $xeToolbar = this;
|
|
31456
31558
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31559
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31560
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
31457
31561
|
const zoomOpts = $xeToolbar.computeZoomOpts;
|
|
31458
|
-
return $
|
|
31562
|
+
return $xeGGWrapper && VxeUIButtonComponent ? h(VxeUIButtonComponent, {
|
|
31459
31563
|
key: 'zoom',
|
|
31460
31564
|
props: {
|
|
31461
31565
|
circle: true,
|
|
31462
|
-
icon: $
|
|
31463
|
-
title: toolbar_getI18n(`vxe.toolbar.zoom${$
|
|
31566
|
+
icon: $xeGGWrapper.isMaximized() ? zoomOpts.iconOut || toolbar_getIcon().TOOLBAR_TOOLS_MINIMIZE : zoomOpts.iconIn || toolbar_getIcon().TOOLBAR_TOOLS_FULLSCREEN,
|
|
31567
|
+
title: toolbar_getI18n(`vxe.toolbar.zoom${$xeGGWrapper.isMaximized() ? 'Out' : 'In'}`)
|
|
31464
31568
|
},
|
|
31465
31569
|
on: {
|
|
31466
31570
|
click: $xeToolbar.zoomEvent
|
|
@@ -31501,6 +31605,8 @@ function toolbar_createInternalData() {
|
|
|
31501
31605
|
const slots = $xeToolbar.$scopedSlots;
|
|
31502
31606
|
const internalData = $xeToolbar.internalData;
|
|
31503
31607
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31608
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31609
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
31504
31610
|
const {
|
|
31505
31611
|
perfect,
|
|
31506
31612
|
loading,
|
|
@@ -31529,26 +31635,30 @@ function toolbar_createInternalData() {
|
|
|
31529
31635
|
class: 'vxe-buttons--wrapper'
|
|
31530
31636
|
}, buttonsSlot ? buttonsSlot({
|
|
31531
31637
|
$grid: $xeGrid,
|
|
31638
|
+
$gantt: $xeGantt,
|
|
31532
31639
|
$table: $table
|
|
31533
31640
|
}) : $xeToolbar.renderLeftBtns(h)), h('div', {
|
|
31534
31641
|
class: 'vxe-tools--wrapper'
|
|
31535
31642
|
}, toolsSlot ? toolsSlot({
|
|
31536
31643
|
$grid: $xeGrid,
|
|
31644
|
+
$gantt: $xeGantt,
|
|
31537
31645
|
$table: $table
|
|
31538
31646
|
}) : $xeToolbar.renderRightTools(h)), h('div', {
|
|
31539
31647
|
class: 'vxe-tools--operate'
|
|
31540
|
-
}, [props.import ? $xeToolbar.renderToolImport(h) : toolbar_renderEmptyElement($xeToolbar), props.export ? $xeToolbar.renderToolExport(h) : toolbar_renderEmptyElement($xeToolbar), props.print ? $xeToolbar.renderToolPrint(h) : toolbar_renderEmptyElement($xeToolbar), refresh ? $xeToolbar.renderToolRefresh(h) : toolbar_renderEmptyElement($xeToolbar), zoom && $
|
|
31648
|
+
}, [props.import ? $xeToolbar.renderToolImport(h) : toolbar_renderEmptyElement($xeToolbar), props.export ? $xeToolbar.renderToolExport(h) : toolbar_renderEmptyElement($xeToolbar), props.print ? $xeToolbar.renderToolPrint(h) : toolbar_renderEmptyElement($xeToolbar), refresh ? $xeToolbar.renderToolRefresh(h) : toolbar_renderEmptyElement($xeToolbar), zoom && $xeGGWrapper ? $xeToolbar.renderToolZoom(h) : toolbar_renderEmptyElement($xeToolbar), custom ? $xeToolbar.renderToolCustom(h) : toolbar_renderEmptyElement($xeToolbar)])]);
|
|
31541
31649
|
}
|
|
31542
31650
|
},
|
|
31543
31651
|
created() {
|
|
31544
31652
|
const $xeToolbar = this;
|
|
31545
31653
|
const props = $xeToolbar;
|
|
31546
31654
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31655
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31656
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
31547
31657
|
$xeToolbar.$nextTick(() => {
|
|
31548
31658
|
const refreshOpts = $xeToolbar.computeRefreshOpts;
|
|
31549
31659
|
const $xeTable = $xeToolbar.fintTable();
|
|
31550
31660
|
const queryMethod = refreshOpts.queryMethod || refreshOpts.query;
|
|
31551
|
-
if (props.refresh && !$
|
|
31661
|
+
if (props.refresh && !$xeGGWrapper && !queryMethod) {
|
|
31552
31662
|
warnLog('vxe.error.notFunc', ['queryMethod']);
|
|
31553
31663
|
}
|
|
31554
31664
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isPlainObject(props.custom)) {
|
|
@@ -32002,7 +32112,7 @@ function grid_createInternalData() {
|
|
|
32002
32112
|
}
|
|
32003
32113
|
}
|
|
32004
32114
|
},
|
|
32005
|
-
callSlot(slotFunc, params, h
|
|
32115
|
+
callSlot(slotFunc, params, h) {
|
|
32006
32116
|
const $xeGrid = this;
|
|
32007
32117
|
const slots = $xeGrid.$scopedSlots;
|
|
32008
32118
|
if (slotFunc) {
|
|
@@ -32010,7 +32120,7 @@ function grid_createInternalData() {
|
|
|
32010
32120
|
slotFunc = slots[slotFunc] || null;
|
|
32011
32121
|
}
|
|
32012
32122
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
|
|
32013
|
-
return getSlotVNs(slotFunc.call(this, params, h
|
|
32123
|
+
return getSlotVNs(slotFunc.call(this, params, h));
|
|
32014
32124
|
}
|
|
32015
32125
|
}
|
|
32016
32126
|
return [];
|