vxe-table 3.18.0-beta.2 → 3.18.0-beta.4
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/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 +141 -40
- 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/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/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.1755245623987.ttf → iconfont.1755566131950.ttf} +0 -0
- /package/es/{iconfont.1755245623987.woff → iconfont.1755566131950.woff} +0 -0
- /package/es/{iconfont.1755245623987.woff2 → iconfont.1755566131950.woff2} +0 -0
- /package/lib/{iconfont.1755245623987.ttf → iconfont.1755566131950.ttf} +0 -0
- /package/lib/{iconfont.1755245623987.woff → iconfont.1755566131950.woff} +0 -0
- /package/lib/{iconfont.1755245623987.woff2 → iconfont.1755566131950.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.4";
|
|
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.4"}`;
|
|
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,
|
|
@@ -6175,8 +6176,8 @@ function updateScrollYStatus($xeTable, fullData) {
|
|
|
6175
6176
|
// 如果gt为0,则总是启用
|
|
6176
6177
|
const scrollYLoad = (transform || !treeConfig) && !!virtualYOpts.enabled && virtualYOpts.gt > -1 && (virtualYOpts.gt === 0 || virtualYOpts.gt < allList.length);
|
|
6177
6178
|
reactData.scrollYLoad = scrollYLoad;
|
|
6178
|
-
if ($xeGanttView) {
|
|
6179
|
-
$xeGanttView.
|
|
6179
|
+
if ($xeGanttView && $xeGanttView.handleUpdateSYStatus) {
|
|
6180
|
+
$xeGanttView.handleUpdateSYStatus(scrollYLoad);
|
|
6180
6181
|
}
|
|
6181
6182
|
return scrollYLoad;
|
|
6182
6183
|
}
|
|
@@ -7207,7 +7208,7 @@ function updateStyle($xeTable) {
|
|
|
7207
7208
|
if (mouseConfig && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
7208
7209
|
$xeTable.addCellSelectedClass();
|
|
7209
7210
|
}
|
|
7210
|
-
if ($xeGanttView) {
|
|
7211
|
+
if ($xeGanttView && $xeGanttView.handleUpdateStyle) {
|
|
7211
7212
|
$xeGanttView.handleUpdateStyle();
|
|
7212
7213
|
}
|
|
7213
7214
|
return $xeTable.$nextTick();
|
|
@@ -9010,7 +9011,7 @@ function handleLazyRecalculate($xeTable, reFull, reWidth, reHeight) {
|
|
|
9010
9011
|
} else {
|
|
9011
9012
|
resolve(handleRecalculateStyle($xeTable, reFull, reWidth, reHeight));
|
|
9012
9013
|
}
|
|
9013
|
-
if ($xeGanttView) {
|
|
9014
|
+
if ($xeGanttView && $xeGanttView.handleLazyRecalculate) {
|
|
9014
9015
|
$xeGanttView.handleLazyRecalculate();
|
|
9015
9016
|
}
|
|
9016
9017
|
internalData.rceTimeout = setTimeout(() => {
|
|
@@ -10295,7 +10296,7 @@ const Methods = {
|
|
|
10295
10296
|
});
|
|
10296
10297
|
reactData.tableData = tableData;
|
|
10297
10298
|
internalData.visibleDataRowIdData = visibleDataRowIdMaps;
|
|
10298
|
-
if ($xeGanttView) {
|
|
10299
|
+
if ($xeGanttView && $xeGanttView.updateViewData) {
|
|
10299
10300
|
$xeGanttView.updateViewData();
|
|
10300
10301
|
}
|
|
10301
10302
|
return $xeTable.$nextTick();
|
|
@@ -11426,6 +11427,35 @@ const Methods = {
|
|
|
11426
11427
|
}
|
|
11427
11428
|
return [];
|
|
11428
11429
|
},
|
|
11430
|
+
/**
|
|
11431
|
+
* 只对 tree-config 有效,用于树形结构,获取指定行的层级
|
|
11432
|
+
*/
|
|
11433
|
+
getTreeRowLevel(rowOrRowid) {
|
|
11434
|
+
const $xeTable = this;
|
|
11435
|
+
const props = $xeTable;
|
|
11436
|
+
const internalData = $xeTable;
|
|
11437
|
+
const {
|
|
11438
|
+
treeConfig
|
|
11439
|
+
} = props;
|
|
11440
|
+
const {
|
|
11441
|
+
fullAllDataRowIdData
|
|
11442
|
+
} = internalData;
|
|
11443
|
+
if (rowOrRowid && treeConfig) {
|
|
11444
|
+
let rowid;
|
|
11445
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowOrRowid)) {
|
|
11446
|
+
rowid = rowOrRowid;
|
|
11447
|
+
} else {
|
|
11448
|
+
rowid = getRowid($xeTable, rowOrRowid);
|
|
11449
|
+
}
|
|
11450
|
+
if (rowid) {
|
|
11451
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
11452
|
+
if (rest) {
|
|
11453
|
+
return rest.level;
|
|
11454
|
+
}
|
|
11455
|
+
}
|
|
11456
|
+
}
|
|
11457
|
+
return -1;
|
|
11458
|
+
},
|
|
11429
11459
|
/**
|
|
11430
11460
|
* 只对 tree-config 有效,获取行的父级
|
|
11431
11461
|
*/
|
|
@@ -11448,7 +11478,9 @@ const Methods = {
|
|
|
11448
11478
|
}
|
|
11449
11479
|
if (rowid) {
|
|
11450
11480
|
const rest = fullAllDataRowIdData[rowid];
|
|
11451
|
-
|
|
11481
|
+
if (rest) {
|
|
11482
|
+
return rest.parent;
|
|
11483
|
+
}
|
|
11452
11484
|
}
|
|
11453
11485
|
}
|
|
11454
11486
|
return null;
|
|
@@ -14566,7 +14598,7 @@ const Methods = {
|
|
|
14566
14598
|
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
14599
|
}
|
|
14568
14600
|
}
|
|
14569
|
-
if ($xeGanttView) {
|
|
14601
|
+
if ($xeGanttView && $xeGanttView.handleUpdateCurrentRow) {
|
|
14570
14602
|
$xeGanttView.handleUpdateCurrentRow(row);
|
|
14571
14603
|
}
|
|
14572
14604
|
return this.$nextTick();
|
|
@@ -14631,7 +14663,7 @@ const Methods = {
|
|
|
14631
14663
|
if (el) {
|
|
14632
14664
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll('.row--current'), elem => removeClass(elem, 'row--current'));
|
|
14633
14665
|
}
|
|
14634
|
-
if ($xeGanttView) {
|
|
14666
|
+
if ($xeGanttView && $xeGanttView.handleUpdateCurrentRow) {
|
|
14635
14667
|
$xeGanttView.handleUpdateCurrentRow();
|
|
14636
14668
|
}
|
|
14637
14669
|
return $xeTable.$nextTick();
|
|
@@ -14714,7 +14746,7 @@ const Methods = {
|
|
|
14714
14746
|
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
14747
|
}
|
|
14716
14748
|
internalData.hoverRow = row;
|
|
14717
|
-
if ($xeGanttView) {
|
|
14749
|
+
if ($xeGanttView && $xeGanttView.handleUpdateHoverRow) {
|
|
14718
14750
|
$xeGanttView.handleUpdateHoverRow(row);
|
|
14719
14751
|
}
|
|
14720
14752
|
},
|
|
@@ -14727,7 +14759,7 @@ const Methods = {
|
|
|
14727
14759
|
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
14760
|
}
|
|
14729
14761
|
internalData.hoverRow = null;
|
|
14730
|
-
if ($xeGanttView) {
|
|
14762
|
+
if ($xeGanttView && $xeGanttView.handleUpdateHoverRow) {
|
|
14731
14763
|
$xeGanttView.handleUpdateHoverRow();
|
|
14732
14764
|
}
|
|
14733
14765
|
},
|
|
@@ -17866,6 +17898,7 @@ const Methods = {
|
|
|
17866
17898
|
elemStore,
|
|
17867
17899
|
fullColumnIdData
|
|
17868
17900
|
} = internalData;
|
|
17901
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
17869
17902
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
17870
17903
|
const tableBody = $xeTable.$refs.refTableBody;
|
|
17871
17904
|
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
@@ -17930,6 +17963,9 @@ const Methods = {
|
|
|
17930
17963
|
if (isScrollXBig && mouseOpts.area) {
|
|
17931
17964
|
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
17932
17965
|
}
|
|
17966
|
+
if ($xeGanttView && $xeGanttView.handleUpdateSXSpace) {
|
|
17967
|
+
$xeGanttView.handleUpdateSXSpace();
|
|
17968
|
+
}
|
|
17933
17969
|
return $xeTable.$nextTick(() => {
|
|
17934
17970
|
updateStyle($xeTable);
|
|
17935
17971
|
});
|
|
@@ -18058,8 +18094,8 @@ const Methods = {
|
|
|
18058
18094
|
if (isScrollYBig && mouseOpts.area) {
|
|
18059
18095
|
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
18060
18096
|
}
|
|
18061
|
-
if ($xeGanttView) {
|
|
18062
|
-
$xeGanttView.
|
|
18097
|
+
if ($xeGanttView && $xeGanttView.handleUpdateSYSpace) {
|
|
18098
|
+
$xeGanttView.handleUpdateSYSpace();
|
|
18063
18099
|
}
|
|
18064
18100
|
return $xeTable.$nextTick().then(() => {
|
|
18065
18101
|
updateStyle($xeTable);
|
|
@@ -20700,6 +20736,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
20700
20736
|
}
|
|
20701
20737
|
});
|
|
20702
20738
|
return h('div', {
|
|
20739
|
+
ref: 'refElem',
|
|
20703
20740
|
key: 'simple',
|
|
20704
20741
|
class: ['vxe-table-custom-wrapper', `placement--${placement}`, {
|
|
20705
20742
|
'is--active': customStore.visible
|
|
@@ -20799,7 +20836,7 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
20799
20836
|
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
20800
20837
|
const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
|
|
20801
20838
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
20802
|
-
const VxeUINumberInputComponent = core_.VxeUI.getComponent('
|
|
20839
|
+
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
|
|
20803
20840
|
const _vm = $xeTableCustomPanel;
|
|
20804
20841
|
const props = $xeTableCustomPanel;
|
|
20805
20842
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
@@ -21209,6 +21246,8 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
21209
21246
|
const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
|
|
21210
21247
|
$xeTableCustomPanel.$nextTick(() => {
|
|
21211
21248
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
21249
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
21250
|
+
const tableInternalData = $xeTable;
|
|
21212
21251
|
const {
|
|
21213
21252
|
customOpts
|
|
21214
21253
|
} = $xeTable;
|
|
@@ -21225,13 +21264,33 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
21225
21264
|
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
21226
21265
|
}
|
|
21227
21266
|
if (!VxeUINumberInputComponent) {
|
|
21228
|
-
errLog('vxe.error.reqComp', ['vxe-input']);
|
|
21267
|
+
errLog('vxe.error.reqComp', ['vxe-number-input']);
|
|
21229
21268
|
}
|
|
21230
21269
|
if (!VxeUIRadioGroupComponent) {
|
|
21231
21270
|
errLog('vxe.error.reqComp', ['vxe-radio-group']);
|
|
21232
21271
|
}
|
|
21272
|
+
if ($xeGantt) {
|
|
21273
|
+
const {
|
|
21274
|
+
teleportToWrapperElem
|
|
21275
|
+
} = tableInternalData;
|
|
21276
|
+
const el = $xeTableCustomPanel.$refs.refElem;
|
|
21277
|
+
if (el && teleportToWrapperElem) {
|
|
21278
|
+
teleportToWrapperElem.appendChild(el);
|
|
21279
|
+
}
|
|
21280
|
+
}
|
|
21233
21281
|
});
|
|
21234
21282
|
},
|
|
21283
|
+
beforeDestroy() {
|
|
21284
|
+
const $xeTableCustomPanel = this;
|
|
21285
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
21286
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
21287
|
+
if ($xeGantt) {
|
|
21288
|
+
const el = $xeTableCustomPanel.$refs.refElem;
|
|
21289
|
+
if (el && el.parentElement) {
|
|
21290
|
+
el.parentElement.removeChild(el);
|
|
21291
|
+
}
|
|
21292
|
+
}
|
|
21293
|
+
},
|
|
21235
21294
|
render(h) {
|
|
21236
21295
|
const $xeTableCustomPanel = this;
|
|
21237
21296
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
@@ -27232,8 +27291,8 @@ function handleMoveSelected($xeTable, evnt, args, isLeftArrow, isUpArrow, isRigh
|
|
|
27232
27291
|
mouseConfig,
|
|
27233
27292
|
mouseOpts
|
|
27234
27293
|
} = this;
|
|
27235
|
-
if (mouseConfig && mouseOpts.area && $xeTable.
|
|
27236
|
-
return $xeTable.
|
|
27294
|
+
if (mouseConfig && mouseOpts.area && $xeTable.triggerCellAreaModnEvent) {
|
|
27295
|
+
return $xeTable.triggerCellAreaModnEvent(evnt, params);
|
|
27237
27296
|
} else {
|
|
27238
27297
|
if (checkboxConfig && checkboxOpts.range) {
|
|
27239
27298
|
this.handleCheckboxRangeEvent(evnt, params);
|
|
@@ -28124,15 +28183,22 @@ function checkRuleStatus(rule, val) {
|
|
|
28124
28183
|
|
|
28125
28184
|
|
|
28126
28185
|
function calcMaxHeight($xeTable) {
|
|
28186
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
28127
28187
|
const reactData = $xeTable;
|
|
28128
28188
|
const {
|
|
28129
28189
|
customStore
|
|
28130
28190
|
} = reactData;
|
|
28131
|
-
|
|
28191
|
+
let wrapperEl = $xeTable.$refs.refElem;
|
|
28132
28192
|
// 判断面板不能大于表格高度
|
|
28133
28193
|
let tableHeight = 0;
|
|
28134
|
-
if (
|
|
28135
|
-
|
|
28194
|
+
if ($xeGantt) {
|
|
28195
|
+
const ganttContainerElem = $xeGantt.$refs.refGanttContainerElem;
|
|
28196
|
+
if (ganttContainerElem) {
|
|
28197
|
+
wrapperEl = ganttContainerElem;
|
|
28198
|
+
}
|
|
28199
|
+
}
|
|
28200
|
+
if (wrapperEl) {
|
|
28201
|
+
tableHeight = wrapperEl.clientHeight - 28;
|
|
28136
28202
|
}
|
|
28137
28203
|
customStore.maxHeight = Math.max(88, tableHeight);
|
|
28138
28204
|
}
|
|
@@ -30134,7 +30200,7 @@ function renderBody(h, $xeTable) {
|
|
|
30134
30200
|
if (rowOpts.height && !this.showOverflow) {
|
|
30135
30201
|
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
30136
30202
|
}
|
|
30137
|
-
if (!$xeTable.
|
|
30203
|
+
if (!$xeTable.triggerCellAreaModnEvent) {
|
|
30138
30204
|
if (props.areaConfig) {
|
|
30139
30205
|
warnLog('vxe.error.notProp', ['area-config']);
|
|
30140
30206
|
}
|
|
@@ -30302,10 +30368,18 @@ function renderBody(h, $xeTable) {
|
|
|
30302
30368
|
mounted() {
|
|
30303
30369
|
const $xeTable = this;
|
|
30304
30370
|
const props = $xeTable;
|
|
30371
|
+
const internalData = $xeTable;
|
|
30372
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
30305
30373
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
30306
30374
|
const rowOpts = $xeTable.computeRowOpts;
|
|
30307
30375
|
const customOpts = $xeTable.computeCustomOpts;
|
|
30308
30376
|
const virtualYOpts = $xeTable.computeVirtualYOpts;
|
|
30377
|
+
if ($xeGantt) {
|
|
30378
|
+
const classifyWrapperEl = $xeGantt.$refs.refClassifyWrapperElem;
|
|
30379
|
+
if (classifyWrapperEl) {
|
|
30380
|
+
internalData.teleportToWrapperElem = classifyWrapperEl;
|
|
30381
|
+
}
|
|
30382
|
+
}
|
|
30309
30383
|
if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
|
|
30310
30384
|
initTpImg();
|
|
30311
30385
|
}
|
|
@@ -30758,6 +30832,9 @@ function toolbar_createInternalData() {
|
|
|
30758
30832
|
inject: {
|
|
30759
30833
|
$xeGrid: {
|
|
30760
30834
|
default: null
|
|
30835
|
+
},
|
|
30836
|
+
$xeGantt: {
|
|
30837
|
+
default: null
|
|
30761
30838
|
}
|
|
30762
30839
|
},
|
|
30763
30840
|
data() {
|
|
@@ -30921,6 +30998,8 @@ function toolbar_createInternalData() {
|
|
|
30921
30998
|
const $xeToolbar = this;
|
|
30922
30999
|
const reactData = $xeToolbar.reactData;
|
|
30923
31000
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31001
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31002
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
30924
31003
|
const {
|
|
30925
31004
|
isRefresh
|
|
30926
31005
|
} = reactData;
|
|
@@ -30936,11 +31015,11 @@ function toolbar_createInternalData() {
|
|
|
30936
31015
|
} catch (e) {
|
|
30937
31016
|
reactData.isRefresh = false;
|
|
30938
31017
|
}
|
|
30939
|
-
} else if ($
|
|
31018
|
+
} else if ($xeGGWrapper) {
|
|
30940
31019
|
reactData.isRefresh = true;
|
|
30941
|
-
$
|
|
31020
|
+
$xeGGWrapper.triggerToolbarCommitEvent({
|
|
30942
31021
|
code: refreshOpts.code || 'reload'
|
|
30943
|
-
}, $event).catch(
|
|
31022
|
+
}, $event).catch(() => {}).then(() => {
|
|
30944
31023
|
reactData.isRefresh = false;
|
|
30945
31024
|
});
|
|
30946
31025
|
}
|
|
@@ -30951,8 +31030,10 @@ function toolbar_createInternalData() {
|
|
|
30951
31030
|
}) {
|
|
30952
31031
|
const $xeToolbar = this;
|
|
30953
31032
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
30954
|
-
|
|
30955
|
-
|
|
31033
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31034
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
31035
|
+
if ($xeGGWrapper) {
|
|
31036
|
+
$xeGGWrapper.triggerZoomEvent($event);
|
|
30956
31037
|
} else {
|
|
30957
31038
|
warnLog('vxe.error.notProp', ['zoom']);
|
|
30958
31039
|
}
|
|
@@ -31074,6 +31155,8 @@ function toolbar_createInternalData() {
|
|
|
31074
31155
|
const $xeToolbar = this;
|
|
31075
31156
|
const internalData = $xeToolbar.internalData;
|
|
31076
31157
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31158
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31159
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
31077
31160
|
const {
|
|
31078
31161
|
$event
|
|
31079
31162
|
} = eventParams;
|
|
@@ -31086,8 +31169,8 @@ function toolbar_createInternalData() {
|
|
|
31086
31169
|
} = item;
|
|
31087
31170
|
if (code) {
|
|
31088
31171
|
$xeToolbar.handleDefaultCodeEvent(eventParams, item, () => {
|
|
31089
|
-
if ($
|
|
31090
|
-
$
|
|
31172
|
+
if ($xeGGWrapper) {
|
|
31173
|
+
$xeGGWrapper.triggerToolbarBtnEvent(item, $event);
|
|
31091
31174
|
} else {
|
|
31092
31175
|
const gCommandOpts = toolbar_commands.get(code);
|
|
31093
31176
|
const params = {
|
|
@@ -31095,7 +31178,7 @@ function toolbar_createInternalData() {
|
|
|
31095
31178
|
button: item,
|
|
31096
31179
|
$table: $table,
|
|
31097
31180
|
$grid: $xeGrid,
|
|
31098
|
-
$gantt:
|
|
31181
|
+
$gantt: $xeGantt,
|
|
31099
31182
|
$event
|
|
31100
31183
|
};
|
|
31101
31184
|
if (gCommandOpts) {
|
|
@@ -31115,6 +31198,8 @@ function toolbar_createInternalData() {
|
|
|
31115
31198
|
const $xeToolbar = this;
|
|
31116
31199
|
const internalData = $xeToolbar.internalData;
|
|
31117
31200
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31201
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31202
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
31118
31203
|
const {
|
|
31119
31204
|
$event
|
|
31120
31205
|
} = eventParams;
|
|
@@ -31127,8 +31212,8 @@ function toolbar_createInternalData() {
|
|
|
31127
31212
|
} = item;
|
|
31128
31213
|
if (code) {
|
|
31129
31214
|
$xeToolbar.handleDefaultCodeEvent(eventParams, item, () => {
|
|
31130
|
-
if ($
|
|
31131
|
-
$
|
|
31215
|
+
if ($xeGGWrapper) {
|
|
31216
|
+
$xeGGWrapper.triggerToolbarTolEvent(item, $event);
|
|
31132
31217
|
} else {
|
|
31133
31218
|
const gCommandOpts = toolbar_commands.get(code);
|
|
31134
31219
|
const params = {
|
|
@@ -31137,7 +31222,7 @@ function toolbar_createInternalData() {
|
|
|
31137
31222
|
tool: item,
|
|
31138
31223
|
$table: $table,
|
|
31139
31224
|
$grid: $xeGrid,
|
|
31140
|
-
$gantt:
|
|
31225
|
+
$gantt: $xeGantt,
|
|
31141
31226
|
$event
|
|
31142
31227
|
};
|
|
31143
31228
|
if (gCommandOpts) {
|
|
@@ -31206,6 +31291,7 @@ function toolbar_createInternalData() {
|
|
|
31206
31291
|
const slots = $xeToolbar.$scopedSlots;
|
|
31207
31292
|
const internalData = $xeToolbar.internalData;
|
|
31208
31293
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31294
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31209
31295
|
const {
|
|
31210
31296
|
buttons
|
|
31211
31297
|
} = props;
|
|
@@ -31220,6 +31306,7 @@ function toolbar_createInternalData() {
|
|
|
31220
31306
|
btnVNs.push(...getSlotVNs(buttonPrefixSlot.call($xeToolbar, {
|
|
31221
31307
|
buttons: buttons || [],
|
|
31222
31308
|
$grid: $xeGrid,
|
|
31309
|
+
$gantt: $xeGantt,
|
|
31223
31310
|
$table: $table
|
|
31224
31311
|
})));
|
|
31225
31312
|
}
|
|
@@ -31235,6 +31322,7 @@ function toolbar_createInternalData() {
|
|
|
31235
31322
|
const toolbarButtonClassName = compConf.toolbarButtonClassName;
|
|
31236
31323
|
const params = {
|
|
31237
31324
|
$grid: $xeGrid,
|
|
31325
|
+
$gantt: $xeGantt,
|
|
31238
31326
|
$table: $table,
|
|
31239
31327
|
button: item
|
|
31240
31328
|
};
|
|
@@ -31279,6 +31367,7 @@ function toolbar_createInternalData() {
|
|
|
31279
31367
|
btnVNs.push(...getSlotVNs(buttonSuffixSlot.call($xeToolbar, {
|
|
31280
31368
|
buttons: buttons || [],
|
|
31281
31369
|
$grid: $xeGrid,
|
|
31370
|
+
$gantt: $xeGantt,
|
|
31282
31371
|
$table: $table
|
|
31283
31372
|
})));
|
|
31284
31373
|
}
|
|
@@ -31295,6 +31384,7 @@ function toolbar_createInternalData() {
|
|
|
31295
31384
|
const slots = $xeToolbar.$scopedSlots;
|
|
31296
31385
|
const internalData = $xeToolbar.internalData;
|
|
31297
31386
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31387
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31298
31388
|
const {
|
|
31299
31389
|
tools
|
|
31300
31390
|
} = props;
|
|
@@ -31309,6 +31399,7 @@ function toolbar_createInternalData() {
|
|
|
31309
31399
|
btnVNs.push(...getSlotVNs(toolPrefixSlot.call($xeToolbar, {
|
|
31310
31400
|
tools: tools || [],
|
|
31311
31401
|
$grid: $xeGrid,
|
|
31402
|
+
$gantt: $xeGantt,
|
|
31312
31403
|
$table: $table
|
|
31313
31404
|
})));
|
|
31314
31405
|
}
|
|
@@ -31325,6 +31416,7 @@ function toolbar_createInternalData() {
|
|
|
31325
31416
|
const toolbarToolClassName = compConf.toolbarToolClassName;
|
|
31326
31417
|
const params = {
|
|
31327
31418
|
$grid: $xeGrid,
|
|
31419
|
+
$gantt: $xeGantt,
|
|
31328
31420
|
$table: $table,
|
|
31329
31421
|
tool: item
|
|
31330
31422
|
};
|
|
@@ -31371,6 +31463,7 @@ function toolbar_createInternalData() {
|
|
|
31371
31463
|
btnVNs.push(...getSlotVNs(toolSuffixSlot.call($xeToolbar, {
|
|
31372
31464
|
tools: tools || [],
|
|
31373
31465
|
$grid: $xeGrid,
|
|
31466
|
+
$gantt: $xeGantt,
|
|
31374
31467
|
$table: $table
|
|
31375
31468
|
})));
|
|
31376
31469
|
}
|
|
@@ -31450,13 +31543,15 @@ function toolbar_createInternalData() {
|
|
|
31450
31543
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
31451
31544
|
const $xeToolbar = this;
|
|
31452
31545
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31546
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31547
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
31453
31548
|
const zoomOpts = $xeToolbar.computeZoomOpts;
|
|
31454
|
-
return $
|
|
31549
|
+
return $xeGGWrapper && VxeUIButtonComponent ? h(VxeUIButtonComponent, {
|
|
31455
31550
|
key: 'zoom',
|
|
31456
31551
|
props: {
|
|
31457
31552
|
circle: true,
|
|
31458
|
-
icon: $
|
|
31459
|
-
title: toolbar_getI18n(`vxe.toolbar.zoom${$
|
|
31553
|
+
icon: $xeGGWrapper.isMaximized() ? zoomOpts.iconOut || toolbar_getIcon().TOOLBAR_TOOLS_MINIMIZE : zoomOpts.iconIn || toolbar_getIcon().TOOLBAR_TOOLS_FULLSCREEN,
|
|
31554
|
+
title: toolbar_getI18n(`vxe.toolbar.zoom${$xeGGWrapper.isMaximized() ? 'Out' : 'In'}`)
|
|
31460
31555
|
},
|
|
31461
31556
|
on: {
|
|
31462
31557
|
click: $xeToolbar.zoomEvent
|
|
@@ -31497,6 +31592,8 @@ function toolbar_createInternalData() {
|
|
|
31497
31592
|
const slots = $xeToolbar.$scopedSlots;
|
|
31498
31593
|
const internalData = $xeToolbar.internalData;
|
|
31499
31594
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31595
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31596
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
31500
31597
|
const {
|
|
31501
31598
|
perfect,
|
|
31502
31599
|
loading,
|
|
@@ -31525,26 +31622,30 @@ function toolbar_createInternalData() {
|
|
|
31525
31622
|
class: 'vxe-buttons--wrapper'
|
|
31526
31623
|
}, buttonsSlot ? buttonsSlot({
|
|
31527
31624
|
$grid: $xeGrid,
|
|
31625
|
+
$gantt: $xeGantt,
|
|
31528
31626
|
$table: $table
|
|
31529
31627
|
}) : $xeToolbar.renderLeftBtns(h)), h('div', {
|
|
31530
31628
|
class: 'vxe-tools--wrapper'
|
|
31531
31629
|
}, toolsSlot ? toolsSlot({
|
|
31532
31630
|
$grid: $xeGrid,
|
|
31631
|
+
$gantt: $xeGantt,
|
|
31533
31632
|
$table: $table
|
|
31534
31633
|
}) : $xeToolbar.renderRightTools(h)), h('div', {
|
|
31535
31634
|
class: 'vxe-tools--operate'
|
|
31536
|
-
}, [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 && $
|
|
31635
|
+
}, [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)])]);
|
|
31537
31636
|
}
|
|
31538
31637
|
},
|
|
31539
31638
|
created() {
|
|
31540
31639
|
const $xeToolbar = this;
|
|
31541
31640
|
const props = $xeToolbar;
|
|
31542
31641
|
const $xeGrid = $xeToolbar.$xeGrid;
|
|
31642
|
+
const $xeGantt = $xeToolbar.$xeGantt;
|
|
31643
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
31543
31644
|
$xeToolbar.$nextTick(() => {
|
|
31544
31645
|
const refreshOpts = $xeToolbar.computeRefreshOpts;
|
|
31545
31646
|
const $xeTable = $xeToolbar.fintTable();
|
|
31546
31647
|
const queryMethod = refreshOpts.queryMethod || refreshOpts.query;
|
|
31547
|
-
if (props.refresh && !$
|
|
31648
|
+
if (props.refresh && !$xeGGWrapper && !queryMethod) {
|
|
31548
31649
|
warnLog('vxe.error.notFunc', ['queryMethod']);
|
|
31549
31650
|
}
|
|
31550
31651
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isPlainObject(props.custom)) {
|
|
@@ -31998,7 +32099,7 @@ function grid_createInternalData() {
|
|
|
31998
32099
|
}
|
|
31999
32100
|
}
|
|
32000
32101
|
},
|
|
32001
|
-
callSlot(slotFunc, params, h
|
|
32102
|
+
callSlot(slotFunc, params, h) {
|
|
32002
32103
|
const $xeGrid = this;
|
|
32003
32104
|
const slots = $xeGrid.$scopedSlots;
|
|
32004
32105
|
if (slotFunc) {
|
|
@@ -32006,7 +32107,7 @@ function grid_createInternalData() {
|
|
|
32006
32107
|
slotFunc = slots[slotFunc] || null;
|
|
32007
32108
|
}
|
|
32008
32109
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
|
|
32009
|
-
return getSlotVNs(slotFunc.call(this, params, h
|
|
32110
|
+
return getSlotVNs(slotFunc.call(this, params, h));
|
|
32010
32111
|
}
|
|
32011
32112
|
}
|
|
32012
32113
|
return [];
|