vxe-table 3.19.1 → 3.19.3
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/README.md +2 -25
- package/es/style.css +1 -1
- package/es/table/module/custom/mixin.js +1 -4
- package/es/table/module/custom/panel.js +3 -0
- package/es/table/module/menu/mixin.js +4 -1
- package/es/table/src/cell.js +4 -4
- package/es/table/src/methods.js +34 -19
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +51 -30
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/mixin.js +1 -4
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +3 -0
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/menu/mixin.js +4 -1
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/src/cell.js +5 -4
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +36 -19
- package/lib/table/src/methods.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 +2 -2
- package/packages/table/module/custom/mixin.ts +1 -4
- package/packages/table/module/custom/panel.ts +3 -0
- package/packages/table/module/menu/mixin.ts +4 -1
- package/packages/table/src/cell.ts +4 -4
- package/packages/table/src/methods.ts +36 -19
- /package/es/{iconfont.1761181583983.ttf → iconfont.1761545705692.ttf} +0 -0
- /package/es/{iconfont.1761181583983.woff → iconfont.1761545705692.woff} +0 -0
- /package/es/{iconfont.1761181583983.woff2 → iconfont.1761545705692.woff2} +0 -0
- /package/lib/{iconfont.1761181583983.ttf → iconfont.1761545705692.ttf} +0 -0
- /package/lib/{iconfont.1761181583983.woff → iconfont.1761545705692.woff} +0 -0
- /package/lib/{iconfont.1761181583983.woff2 → iconfont.1761545705692.woff2} +0 -0
|
@@ -953,6 +953,7 @@ export default {
|
|
|
953
953
|
$xeTable.saveCustom();
|
|
954
954
|
$xeTable.closeCustom();
|
|
955
955
|
$xeTable.emitCustomEvent('confirm', $event);
|
|
956
|
+
$xeTable.emitCustomEvent('close', $event);
|
|
956
957
|
},
|
|
957
958
|
cancelCloseEvent({ $event }) {
|
|
958
959
|
const $xeTableCustomPanel = this;
|
|
@@ -966,6 +967,7 @@ export default {
|
|
|
966
967
|
$xeTable.cancelCustom();
|
|
967
968
|
$xeTable.closeCustom();
|
|
968
969
|
$xeTable.emitCustomEvent('cancel', $event);
|
|
970
|
+
$xeTable.emitCustomEvent('close', $event);
|
|
969
971
|
},
|
|
970
972
|
handleResetCustomEvent(evnt) {
|
|
971
973
|
const $xeTableCustomPanel = this;
|
|
@@ -973,6 +975,7 @@ export default {
|
|
|
973
975
|
$xeTable.resetCustom(true);
|
|
974
976
|
$xeTable.closeCustom();
|
|
975
977
|
$xeTable.emitCustomEvent('reset', evnt);
|
|
978
|
+
$xeTable.emitCustomEvent('close', evnt);
|
|
976
979
|
},
|
|
977
980
|
resetCustomEvent(evnt) {
|
|
978
981
|
if (VxeUI.modal) {
|
|
@@ -163,6 +163,9 @@ export default {
|
|
|
163
163
|
*/
|
|
164
164
|
handleOpenMenuEvent(evnt, type, params) {
|
|
165
165
|
const $xeTable = this;
|
|
166
|
+
const $xeGrid = $xeTable.$xeGrid;
|
|
167
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
168
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
166
169
|
const reactData = $xeTable;
|
|
167
170
|
const internalData = $xeTable;
|
|
168
171
|
const { ctxMenuStore } = reactData;
|
|
@@ -181,7 +184,7 @@ export default {
|
|
|
181
184
|
if (!visibleMethod || visibleMethod(params)) {
|
|
182
185
|
evnt.preventDefault();
|
|
183
186
|
$xeTable.updateZindex();
|
|
184
|
-
const el = $xeTable.$refs.refElem;
|
|
187
|
+
const el = $xeGGWrapper ? $xeGGWrapper.$refs.refElem : $xeTable.$refs.refElem;
|
|
185
188
|
const tableRect = el.getBoundingClientRect();
|
|
186
189
|
const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode();
|
|
187
190
|
let top = evnt.clientY - tableRect.y;
|
package/es/table/src/cell.js
CHANGED
|
@@ -370,9 +370,8 @@ export const Cell = {
|
|
|
370
370
|
const tableInternalData = $table;
|
|
371
371
|
const { isRowGroupStatus } = tableReactData;
|
|
372
372
|
const { editConfig } = tableProps;
|
|
373
|
-
const
|
|
374
|
-
const
|
|
375
|
-
const renderOpts = editConfig && isEnableConf(editOpts) && editRender ? editRender : cellRender;
|
|
373
|
+
const { field, slots, editRender, cellRender, rowGroupNode, aggFunc, formatter } = column;
|
|
374
|
+
const renderOpts = editConfig && isEnableConf(editRender) ? editRender : (isEnableConf(cellRender) ? cellRender : null);
|
|
376
375
|
const defaultSlot = slots ? slots.default : null;
|
|
377
376
|
const gcSlot = slots ? (slots.groupContent || slots['group-content']) : null;
|
|
378
377
|
let cellValue = '';
|
|
@@ -433,7 +432,8 @@ export const Cell = {
|
|
|
433
432
|
if (defaultSlot) {
|
|
434
433
|
return renderCellBaseVNs(h, params, $table.callSlot(defaultSlot, params, h));
|
|
435
434
|
}
|
|
436
|
-
|
|
435
|
+
// formatter > (renderTableCell | renderTableDefault)
|
|
436
|
+
if (renderOpts && !formatter) {
|
|
437
437
|
const compConf = renderer.get(renderOpts.name);
|
|
438
438
|
const rtDefault = compConf ? (compConf.renderTableDefault || compConf.renderDefault) : null;
|
|
439
439
|
const rtCell = compConf ? (compConf.renderTableCell || compConf.renderCell) : null;
|
package/es/table/src/methods.js
CHANGED
|
@@ -125,7 +125,7 @@ function handleCustomRestore($xeTable, storeData) {
|
|
|
125
125
|
const customOpts = $xeTable.computeCustomOpts;
|
|
126
126
|
const { storage, storeOptions } = customOpts;
|
|
127
127
|
const isAllCustom = storage === true;
|
|
128
|
-
const storageOpts = isAllCustom ? {} :
|
|
128
|
+
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
129
129
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
130
130
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
131
131
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
@@ -219,7 +219,7 @@ function restoreCustomStorage($xeTable) {
|
|
|
219
219
|
const customOpts = $xeTable.computeCustomOpts;
|
|
220
220
|
const { storage, restoreStore, storeOptions } = customOpts;
|
|
221
221
|
const isAllCustom = storage === true;
|
|
222
|
-
const storageOpts = isAllCustom ? {} :
|
|
222
|
+
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
223
223
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
224
224
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
225
225
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
@@ -474,6 +474,7 @@ function handleBaseTreeExpand($xeTable, rows, expanded) {
|
|
|
474
474
|
}
|
|
475
475
|
reactData.treeExpandedFlag++;
|
|
476
476
|
return Promise.all(result).then(() => {
|
|
477
|
+
updateTreeLineStyle($xeTable);
|
|
477
478
|
return $xeTable.recalculate();
|
|
478
479
|
});
|
|
479
480
|
}
|
|
@@ -2912,6 +2913,9 @@ function handleRecalculateStyle($xeTable, reFull, reWidth, reHeight) {
|
|
|
2912
2913
|
calcScrollbar($xeTable);
|
|
2913
2914
|
updateStyle($xeTable);
|
|
2914
2915
|
updateRowExpandStyle($xeTable);
|
|
2916
|
+
if (reFull) {
|
|
2917
|
+
updateTreeLineStyle($xeTable);
|
|
2918
|
+
}
|
|
2915
2919
|
return computeScrollLoad($xeTable).then(() => {
|
|
2916
2920
|
// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
|
|
2917
2921
|
if (reWidth) {
|
|
@@ -2929,6 +2933,9 @@ function handleRecalculateStyle($xeTable, reFull, reWidth, reHeight) {
|
|
|
2929
2933
|
updateRowOffsetTop($xeTable);
|
|
2930
2934
|
}
|
|
2931
2935
|
updateRowExpandStyle($xeTable);
|
|
2936
|
+
if (reFull) {
|
|
2937
|
+
updateTreeLineStyle($xeTable);
|
|
2938
|
+
}
|
|
2932
2939
|
if (reFull) {
|
|
2933
2940
|
return computeScrollLoad($xeTable);
|
|
2934
2941
|
}
|
|
@@ -5403,7 +5410,7 @@ const Methods = {
|
|
|
5403
5410
|
const customOpts = $xeTable.computeCustomOpts;
|
|
5404
5411
|
const { storage, restoreStore, storeOptions } = customOpts;
|
|
5405
5412
|
const isAllCustom = storage === true;
|
|
5406
|
-
const storageOpts = isAllCustom ? {} :
|
|
5413
|
+
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
5407
5414
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
5408
5415
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
5409
5416
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
@@ -5439,7 +5446,7 @@ const Methods = {
|
|
|
5439
5446
|
const { fullColumnFieldData, collectColumn } = internalData;
|
|
5440
5447
|
const { storage, checkMethod, storeOptions } = customOpts;
|
|
5441
5448
|
const isAllCustom = storage === true;
|
|
5442
|
-
const storageOpts = isAllCustom ? {} :
|
|
5449
|
+
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
5443
5450
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
5444
5451
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
5445
5452
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
@@ -5560,7 +5567,7 @@ const Methods = {
|
|
|
5560
5567
|
const customOpts = $xeTable.computeCustomOpts;
|
|
5561
5568
|
const { updateStore, storage, storeOptions } = customOpts;
|
|
5562
5569
|
const isAllCustom = storage === true;
|
|
5563
|
-
const storageOpts = isAllCustom ? {} :
|
|
5570
|
+
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
5564
5571
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
5565
5572
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
5566
5573
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
@@ -6319,7 +6326,7 @@ const Methods = {
|
|
|
6319
6326
|
}
|
|
6320
6327
|
else {
|
|
6321
6328
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
6322
|
-
|
|
6329
|
+
$xeTable.preventEvent(evnt, 'event.clearFilter', internalData._currFilterParams, $xeTable.closeFilter);
|
|
6323
6330
|
}
|
|
6324
6331
|
}
|
|
6325
6332
|
}
|
|
@@ -6333,7 +6340,12 @@ const Methods = {
|
|
|
6333
6340
|
}
|
|
6334
6341
|
else {
|
|
6335
6342
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
6336
|
-
|
|
6343
|
+
if (customStore.visible && $xeTable.closeCustom) {
|
|
6344
|
+
$xeTable.preventEvent(evnt, 'event.clearCustom', {}, () => {
|
|
6345
|
+
$xeTable.closeCustom();
|
|
6346
|
+
$xeTable.dispatchEvent('custom', { type: 'close' }, evnt);
|
|
6347
|
+
});
|
|
6348
|
+
}
|
|
6337
6349
|
}
|
|
6338
6350
|
}
|
|
6339
6351
|
}
|
|
@@ -6346,10 +6358,10 @@ const Methods = {
|
|
|
6346
6358
|
if (validTooltip && getEventTargetNode(evnt, validTooltip.$el).flag) {
|
|
6347
6359
|
// 如果是激活状态,且点击了校验提示框
|
|
6348
6360
|
}
|
|
6349
|
-
else if (!
|
|
6361
|
+
else if (!internalData._lastCallTime || internalData._lastCallTime + 50 < Date.now()) {
|
|
6350
6362
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
6351
6363
|
// 如果手动调用了激活单元格,避免触发源被移除后导致重复关闭
|
|
6352
|
-
|
|
6364
|
+
$xeTable.preventEvent(evnt, 'event.clearEdit', actived.args, () => {
|
|
6353
6365
|
let isClear;
|
|
6354
6366
|
if (editOpts.mode === 'row') {
|
|
6355
6367
|
const rowTargetNode = getEventTargetNode(evnt, el, 'vxe-body--row');
|
|
@@ -6370,7 +6382,7 @@ const Methods = {
|
|
|
6370
6382
|
isClear = getEventTargetNode(evnt, el, 'vxe-footer--row').flag;
|
|
6371
6383
|
}
|
|
6372
6384
|
// 如果固定了高度且点击了行之外的空白处,则清除激活状态
|
|
6373
|
-
if (!isClear &&
|
|
6385
|
+
if (!isClear && props.height && !reactData.overflowY) {
|
|
6374
6386
|
const bodyWrapperElem = evnt.target;
|
|
6375
6387
|
if (hasClass(bodyWrapperElem, 'vxe-table--body-wrapper')) {
|
|
6376
6388
|
isClear = evnt.offsetY < bodyWrapperElem.clientHeight;
|
|
@@ -6382,8 +6394,8 @@ const Methods = {
|
|
|
6382
6394
|
setTimeout(() => {
|
|
6383
6395
|
$xeTable.handleClearEdit(evnt).then(() => {
|
|
6384
6396
|
// 如果存在校验,点击了表格之外则清除
|
|
6385
|
-
if (!
|
|
6386
|
-
|
|
6397
|
+
if (!internalData.isActivated && editRules && validOpts.autoClear) {
|
|
6398
|
+
reactData.validErrorMaps = {};
|
|
6387
6399
|
}
|
|
6388
6400
|
});
|
|
6389
6401
|
});
|
|
@@ -6415,29 +6427,31 @@ const Methods = {
|
|
|
6415
6427
|
}
|
|
6416
6428
|
// 如果配置了快捷菜单且,点击了其他地方则关闭
|
|
6417
6429
|
if (ctxMenuStore.visible && tableMenu && !getEventTargetNode(evnt, tableMenu.$el).flag) {
|
|
6418
|
-
|
|
6430
|
+
$xeTable.closeMenu();
|
|
6419
6431
|
}
|
|
6420
6432
|
const isActivated = getEventTargetNode(evnt, ($xeGGWrapper || $xeTable).$el).flag;
|
|
6421
6433
|
// 如果存在校验,点击了表格之外则清除
|
|
6422
6434
|
if (!isActivated && editRules && validOpts.autoClear) {
|
|
6423
|
-
|
|
6435
|
+
reactData.validErrorMaps = {};
|
|
6424
6436
|
}
|
|
6425
6437
|
// 最后激活的表格
|
|
6426
|
-
|
|
6438
|
+
internalData.isActivated = isActivated;
|
|
6427
6439
|
},
|
|
6428
6440
|
/**
|
|
6429
6441
|
* 窗口失焦事件处理
|
|
6430
6442
|
*/
|
|
6431
6443
|
handleGlobalBlurEvent() {
|
|
6432
|
-
this
|
|
6433
|
-
|
|
6444
|
+
const $xeTable = this;
|
|
6445
|
+
$xeTable.closeFilter();
|
|
6446
|
+
$xeTable.closeMenu();
|
|
6434
6447
|
},
|
|
6435
6448
|
/**
|
|
6436
6449
|
* 全局滚动事件
|
|
6437
6450
|
*/
|
|
6438
6451
|
handleGlobalMousewheelEvent() {
|
|
6439
|
-
this
|
|
6440
|
-
|
|
6452
|
+
const $xeTable = this;
|
|
6453
|
+
$xeTable.closeTooltip();
|
|
6454
|
+
$xeTable.closeMenu();
|
|
6441
6455
|
},
|
|
6442
6456
|
/**
|
|
6443
6457
|
* 表格键盘事件
|
|
@@ -10469,6 +10483,7 @@ const Methods = {
|
|
|
10469
10483
|
}
|
|
10470
10484
|
reactData.treeExpandedFlag++;
|
|
10471
10485
|
}).then(() => {
|
|
10486
|
+
updateTreeLineStyle($xeTable);
|
|
10472
10487
|
if (expList.length) {
|
|
10473
10488
|
$xeTable.recalculate();
|
|
10474
10489
|
}
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -2005,7 +2005,7 @@ function getClass(property, params) {
|
|
|
2005
2005
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2006
2006
|
|
|
2007
2007
|
|
|
2008
|
-
const version = "3.19.
|
|
2008
|
+
const version = "3.19.3";
|
|
2009
2009
|
core_.VxeUI.version = version;
|
|
2010
2010
|
core_.VxeUI.tableVersion = version;
|
|
2011
2011
|
core_.VxeUI.setConfig({
|
|
@@ -2695,7 +2695,7 @@ function isNodeElement(elem) {
|
|
|
2695
2695
|
const {
|
|
2696
2696
|
log: log_log
|
|
2697
2697
|
} = core_.VxeUI;
|
|
2698
|
-
const log_version = `table v${"3.19.
|
|
2698
|
+
const log_version = `table v${"3.19.3"}`;
|
|
2699
2699
|
const warnLog = log_log.create('warn', log_version);
|
|
2700
2700
|
const errLog = log_log.create('error', log_version);
|
|
2701
2701
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -4242,16 +4242,16 @@ const Cell = {
|
|
|
4242
4242
|
const {
|
|
4243
4243
|
editConfig
|
|
4244
4244
|
} = tableProps;
|
|
4245
|
-
const editOpts = $table.computeEditOpts;
|
|
4246
4245
|
const {
|
|
4247
4246
|
field,
|
|
4248
4247
|
slots,
|
|
4249
4248
|
editRender,
|
|
4250
4249
|
cellRender,
|
|
4251
4250
|
rowGroupNode,
|
|
4252
|
-
aggFunc
|
|
4251
|
+
aggFunc,
|
|
4252
|
+
formatter
|
|
4253
4253
|
} = column;
|
|
4254
|
-
const renderOpts = editConfig && isEnableConf(
|
|
4254
|
+
const renderOpts = editConfig && isEnableConf(editRender) ? editRender : isEnableConf(cellRender) ? cellRender : null;
|
|
4255
4255
|
const defaultSlot = slots ? slots.default : null;
|
|
4256
4256
|
const gcSlot = slots ? slots.groupContent || slots['group-content'] : null;
|
|
4257
4257
|
let cellValue = '';
|
|
@@ -4323,7 +4323,8 @@ const Cell = {
|
|
|
4323
4323
|
if (defaultSlot) {
|
|
4324
4324
|
return renderCellBaseVNs(h, params, $table.callSlot(defaultSlot, params, h));
|
|
4325
4325
|
}
|
|
4326
|
-
|
|
4326
|
+
// formatter > (renderTableCell | renderTableDefault)
|
|
4327
|
+
if (renderOpts && !formatter) {
|
|
4327
4328
|
const compConf = cell_renderer.get(renderOpts.name);
|
|
4328
4329
|
const rtDefault = compConf ? compConf.renderTableDefault || compConf.renderDefault : null;
|
|
4329
4330
|
const rtCell = compConf ? compConf.renderTableCell || compConf.renderCell : null;
|
|
@@ -6099,7 +6100,7 @@ function handleCustomRestore($xeTable, storeData) {
|
|
|
6099
6100
|
storeOptions
|
|
6100
6101
|
} = customOpts;
|
|
6101
6102
|
const isAllCustom = storage === true;
|
|
6102
|
-
const storageOpts = isAllCustom ? {} :
|
|
6103
|
+
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
6103
6104
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
6104
6105
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
6105
6106
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
@@ -6221,7 +6222,7 @@ function restoreCustomStorage($xeTable) {
|
|
|
6221
6222
|
storeOptions
|
|
6222
6223
|
} = customOpts;
|
|
6223
6224
|
const isAllCustom = storage === true;
|
|
6224
|
-
const storageOpts = isAllCustom ? {} :
|
|
6225
|
+
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
6225
6226
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
6226
6227
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
6227
6228
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
@@ -6530,6 +6531,7 @@ function handleBaseTreeExpand($xeTable, rows, expanded) {
|
|
|
6530
6531
|
}
|
|
6531
6532
|
reactData.treeExpandedFlag++;
|
|
6532
6533
|
return Promise.all(result).then(() => {
|
|
6534
|
+
updateTreeLineStyle($xeTable);
|
|
6533
6535
|
return $xeTable.recalculate();
|
|
6534
6536
|
});
|
|
6535
6537
|
}
|
|
@@ -9423,6 +9425,9 @@ function handleRecalculateStyle($xeTable, reFull, reWidth, reHeight) {
|
|
|
9423
9425
|
calcScrollbar($xeTable);
|
|
9424
9426
|
updateStyle($xeTable);
|
|
9425
9427
|
updateRowExpandStyle($xeTable);
|
|
9428
|
+
if (reFull) {
|
|
9429
|
+
updateTreeLineStyle($xeTable);
|
|
9430
|
+
}
|
|
9426
9431
|
return computeScrollLoad($xeTable).then(() => {
|
|
9427
9432
|
// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
|
|
9428
9433
|
if (reWidth) {
|
|
@@ -9440,6 +9445,9 @@ function handleRecalculateStyle($xeTable, reFull, reWidth, reHeight) {
|
|
|
9440
9445
|
updateRowOffsetTop($xeTable);
|
|
9441
9446
|
}
|
|
9442
9447
|
updateRowExpandStyle($xeTable);
|
|
9448
|
+
if (reFull) {
|
|
9449
|
+
updateTreeLineStyle($xeTable);
|
|
9450
|
+
}
|
|
9443
9451
|
if (reFull) {
|
|
9444
9452
|
return computeScrollLoad($xeTable);
|
|
9445
9453
|
}
|
|
@@ -12276,7 +12284,7 @@ const Methods = {
|
|
|
12276
12284
|
storeOptions
|
|
12277
12285
|
} = customOpts;
|
|
12278
12286
|
const isAllCustom = storage === true;
|
|
12279
|
-
const storageOpts = isAllCustom ? {} :
|
|
12287
|
+
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
12280
12288
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
12281
12289
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
12282
12290
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
@@ -12328,7 +12336,7 @@ const Methods = {
|
|
|
12328
12336
|
storeOptions
|
|
12329
12337
|
} = customOpts;
|
|
12330
12338
|
const isAllCustom = storage === true;
|
|
12331
|
-
const storageOpts = isAllCustom ? {} :
|
|
12339
|
+
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
12332
12340
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
12333
12341
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
12334
12342
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
@@ -12460,7 +12468,7 @@ const Methods = {
|
|
|
12460
12468
|
storeOptions
|
|
12461
12469
|
} = customOpts;
|
|
12462
12470
|
const isAllCustom = storage === true;
|
|
12463
|
-
const storageOpts = isAllCustom ? {} :
|
|
12471
|
+
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
12464
12472
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
12465
12473
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
12466
12474
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
@@ -13325,7 +13333,7 @@ const Methods = {
|
|
|
13325
13333
|
// 如果点击筛选容器
|
|
13326
13334
|
} else {
|
|
13327
13335
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
13328
|
-
|
|
13336
|
+
$xeTable.preventEvent(evnt, 'event.clearFilter', internalData._currFilterParams, $xeTable.closeFilter);
|
|
13329
13337
|
}
|
|
13330
13338
|
}
|
|
13331
13339
|
}
|
|
@@ -13337,7 +13345,14 @@ const Methods = {
|
|
|
13337
13345
|
// 如果点击自定义列容器
|
|
13338
13346
|
} else {
|
|
13339
13347
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
13340
|
-
|
|
13348
|
+
if (customStore.visible && $xeTable.closeCustom) {
|
|
13349
|
+
$xeTable.preventEvent(evnt, 'event.clearCustom', {}, () => {
|
|
13350
|
+
$xeTable.closeCustom();
|
|
13351
|
+
$xeTable.dispatchEvent('custom', {
|
|
13352
|
+
type: 'close'
|
|
13353
|
+
}, evnt);
|
|
13354
|
+
});
|
|
13355
|
+
}
|
|
13341
13356
|
}
|
|
13342
13357
|
}
|
|
13343
13358
|
}
|
|
@@ -13349,10 +13364,10 @@ const Methods = {
|
|
|
13349
13364
|
if (!cell || !getEventTargetNode(evnt, cell).flag) {
|
|
13350
13365
|
if (validTooltip && getEventTargetNode(evnt, validTooltip.$el).flag) {
|
|
13351
13366
|
// 如果是激活状态,且点击了校验提示框
|
|
13352
|
-
} else if (!
|
|
13367
|
+
} else if (!internalData._lastCallTime || internalData._lastCallTime + 50 < Date.now()) {
|
|
13353
13368
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
13354
13369
|
// 如果手动调用了激活单元格,避免触发源被移除后导致重复关闭
|
|
13355
|
-
|
|
13370
|
+
$xeTable.preventEvent(evnt, 'event.clearEdit', actived.args, () => {
|
|
13356
13371
|
let isClear;
|
|
13357
13372
|
if (editOpts.mode === 'row') {
|
|
13358
13373
|
const rowTargetNode = getEventTargetNode(evnt, el, 'vxe-body--row');
|
|
@@ -13372,7 +13387,7 @@ const Methods = {
|
|
|
13372
13387
|
isClear = getEventTargetNode(evnt, el, 'vxe-footer--row').flag;
|
|
13373
13388
|
}
|
|
13374
13389
|
// 如果固定了高度且点击了行之外的空白处,则清除激活状态
|
|
13375
|
-
if (!isClear &&
|
|
13390
|
+
if (!isClear && props.height && !reactData.overflowY) {
|
|
13376
13391
|
const bodyWrapperElem = evnt.target;
|
|
13377
13392
|
if (hasClass(bodyWrapperElem, 'vxe-table--body-wrapper')) {
|
|
13378
13393
|
isClear = evnt.offsetY < bodyWrapperElem.clientHeight;
|
|
@@ -13384,8 +13399,8 @@ const Methods = {
|
|
|
13384
13399
|
setTimeout(() => {
|
|
13385
13400
|
$xeTable.handleClearEdit(evnt).then(() => {
|
|
13386
13401
|
// 如果存在校验,点击了表格之外则清除
|
|
13387
|
-
if (!
|
|
13388
|
-
|
|
13402
|
+
if (!internalData.isActivated && editRules && validOpts.autoClear) {
|
|
13403
|
+
reactData.validErrorMaps = {};
|
|
13389
13404
|
}
|
|
13390
13405
|
});
|
|
13391
13406
|
});
|
|
@@ -13418,29 +13433,31 @@ const Methods = {
|
|
|
13418
13433
|
}
|
|
13419
13434
|
// 如果配置了快捷菜单且,点击了其他地方则关闭
|
|
13420
13435
|
if (ctxMenuStore.visible && tableMenu && !getEventTargetNode(evnt, tableMenu.$el).flag) {
|
|
13421
|
-
|
|
13436
|
+
$xeTable.closeMenu();
|
|
13422
13437
|
}
|
|
13423
13438
|
const isActivated = getEventTargetNode(evnt, ($xeGGWrapper || $xeTable).$el).flag;
|
|
13424
13439
|
// 如果存在校验,点击了表格之外则清除
|
|
13425
13440
|
if (!isActivated && editRules && validOpts.autoClear) {
|
|
13426
|
-
|
|
13441
|
+
reactData.validErrorMaps = {};
|
|
13427
13442
|
}
|
|
13428
13443
|
// 最后激活的表格
|
|
13429
|
-
|
|
13444
|
+
internalData.isActivated = isActivated;
|
|
13430
13445
|
},
|
|
13431
13446
|
/**
|
|
13432
13447
|
* 窗口失焦事件处理
|
|
13433
13448
|
*/
|
|
13434
13449
|
handleGlobalBlurEvent() {
|
|
13435
|
-
this
|
|
13436
|
-
|
|
13450
|
+
const $xeTable = this;
|
|
13451
|
+
$xeTable.closeFilter();
|
|
13452
|
+
$xeTable.closeMenu();
|
|
13437
13453
|
},
|
|
13438
13454
|
/**
|
|
13439
13455
|
* 全局滚动事件
|
|
13440
13456
|
*/
|
|
13441
13457
|
handleGlobalMousewheelEvent() {
|
|
13442
|
-
this
|
|
13443
|
-
|
|
13458
|
+
const $xeTable = this;
|
|
13459
|
+
$xeTable.closeTooltip();
|
|
13460
|
+
$xeTable.closeMenu();
|
|
13444
13461
|
},
|
|
13445
13462
|
/**
|
|
13446
13463
|
* 表格键盘事件
|
|
@@ -18186,6 +18203,7 @@ const Methods = {
|
|
|
18186
18203
|
}
|
|
18187
18204
|
reactData.treeExpandedFlag++;
|
|
18188
18205
|
}).then(() => {
|
|
18206
|
+
updateTreeLineStyle($xeTable);
|
|
18189
18207
|
if (expList.length) {
|
|
18190
18208
|
$xeTable.recalculate();
|
|
18191
18209
|
}
|
|
@@ -22574,6 +22592,7 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
22574
22592
|
$xeTable.saveCustom();
|
|
22575
22593
|
$xeTable.closeCustom();
|
|
22576
22594
|
$xeTable.emitCustomEvent('confirm', $event);
|
|
22595
|
+
$xeTable.emitCustomEvent('close', $event);
|
|
22577
22596
|
},
|
|
22578
22597
|
cancelCloseEvent({
|
|
22579
22598
|
$event
|
|
@@ -22591,6 +22610,7 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
22591
22610
|
$xeTable.cancelCustom();
|
|
22592
22611
|
$xeTable.closeCustom();
|
|
22593
22612
|
$xeTable.emitCustomEvent('cancel', $event);
|
|
22613
|
+
$xeTable.emitCustomEvent('close', $event);
|
|
22594
22614
|
},
|
|
22595
22615
|
handleResetCustomEvent(evnt) {
|
|
22596
22616
|
const $xeTableCustomPanel = this;
|
|
@@ -22598,6 +22618,7 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
|
22598
22618
|
$xeTable.resetCustom(true);
|
|
22599
22619
|
$xeTable.closeCustom();
|
|
22600
22620
|
$xeTable.emitCustomEvent('reset', evnt);
|
|
22621
|
+
$xeTable.emitCustomEvent('close', evnt);
|
|
22601
22622
|
},
|
|
22602
22623
|
resetCustomEvent(evnt) {
|
|
22603
22624
|
if (core_.VxeUI.modal) {
|
|
@@ -24992,6 +25013,9 @@ const {
|
|
|
24992
25013
|
*/
|
|
24993
25014
|
handleOpenMenuEvent(evnt, type, params) {
|
|
24994
25015
|
const $xeTable = this;
|
|
25016
|
+
const $xeGrid = $xeTable.$xeGrid;
|
|
25017
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
25018
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
24995
25019
|
const reactData = $xeTable;
|
|
24996
25020
|
const internalData = $xeTable;
|
|
24997
25021
|
const {
|
|
@@ -25017,7 +25041,7 @@ const {
|
|
|
25017
25041
|
if (!visibleMethod || visibleMethod(params)) {
|
|
25018
25042
|
evnt.preventDefault();
|
|
25019
25043
|
$xeTable.updateZindex();
|
|
25020
|
-
const el = $xeTable.$refs.refElem;
|
|
25044
|
+
const el = $xeGGWrapper ? $xeGGWrapper.$refs.refElem : $xeTable.$refs.refElem;
|
|
25021
25045
|
const tableRect = el.getBoundingClientRect();
|
|
25022
25046
|
const {
|
|
25023
25047
|
scrollTop,
|
|
@@ -30025,10 +30049,7 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
30025
30049
|
},
|
|
30026
30050
|
emitCustomEvent(type, evnt) {
|
|
30027
30051
|
const $xeTable = this;
|
|
30028
|
-
|
|
30029
|
-
const $xeGantt = $xeTable.$xeGantt;
|
|
30030
|
-
const comp = $xeGrid || $xeGantt || $xeTable;
|
|
30031
|
-
comp.dispatchEvent('custom', {
|
|
30052
|
+
$xeTable.dispatchEvent('custom', {
|
|
30032
30053
|
type
|
|
30033
30054
|
}, evnt);
|
|
30034
30055
|
},
|