vxe-table 3.19.0 → 3.19.2
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 +4 -27
- package/es/grid/src/grid.js +27 -31
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/en-US.js +22 -22
- package/es/style.css +1 -1
- package/es/style.min.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 +73 -29
- package/es/table/src/table.js +18 -5
- package/es/table/src/util.js +29 -23
- package/es/table/style.css +29 -2
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +29 -2
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +48 -52
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +172 -118
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +22 -22
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +22 -22
- package/lib/style.css +1 -1
- package/lib/style.min.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 +78 -29
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +14 -3
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +17 -23
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +29 -2
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +29 -2
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +64 -68
- package/packages/locale/lang/en-US.ts +22 -22
- 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 +78 -29
- package/packages/table/src/table.ts +19 -5
- package/packages/table/src/util.ts +37 -23
- package/styles/components/table.scss +52 -2
- /package/es/{iconfont.1760925668508.ttf → iconfont.1761269884508.ttf} +0 -0
- /package/es/{iconfont.1760925668508.woff → iconfont.1761269884508.woff} +0 -0
- /package/es/{iconfont.1760925668508.woff2 → iconfont.1761269884508.woff2} +0 -0
- /package/lib/{iconfont.1760925668508.ttf → iconfont.1761269884508.ttf} +0 -0
- /package/lib/{iconfont.1760925668508.woff → iconfont.1761269884508.woff} +0 -0
- /package/lib/{iconfont.1760925668508.woff2 → iconfont.1761269884508.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
|
@@ -957,7 +957,7 @@ function updateStyle($xeTable) {
|
|
|
957
957
|
const { visibleColumn, tableHeight, elemStore, customHeight, customMinHeight, customMaxHeight, tHeaderHeight, tFooterHeight } = internalData;
|
|
958
958
|
const $xeGanttView = internalData.xeGanttView;
|
|
959
959
|
const el = $xeTable.$refs.refElem;
|
|
960
|
-
if (!el || !el.clientHeight) {
|
|
960
|
+
if (!el || (internalData.tBodyHeight && !el.clientHeight)) {
|
|
961
961
|
return;
|
|
962
962
|
}
|
|
963
963
|
const containerList = ['main', 'left', 'right'];
|
|
@@ -2272,7 +2272,7 @@ function clearAllSort($xeTable) {
|
|
|
2272
2272
|
function calcTableHeight($xeTable, key) {
|
|
2273
2273
|
const props = $xeTable;
|
|
2274
2274
|
const reactData = $xeTable;
|
|
2275
|
-
const { editConfig } = props;
|
|
2275
|
+
const { editConfig, editRules } = props;
|
|
2276
2276
|
const { parentHeight } = reactData;
|
|
2277
2277
|
let val = props[key];
|
|
2278
2278
|
if (key === 'minHeight') {
|
|
@@ -2280,7 +2280,7 @@ function calcTableHeight($xeTable, key) {
|
|
|
2280
2280
|
if (XEUtils.eqNull(val)) {
|
|
2281
2281
|
if (eqEmptyValue(defMinHeight)) {
|
|
2282
2282
|
// 编辑模式默认最小高度
|
|
2283
|
-
if (isEnableConf(editConfig)) {
|
|
2283
|
+
if (editRules && isEnableConf(editConfig)) {
|
|
2284
2284
|
val = 144;
|
|
2285
2285
|
}
|
|
2286
2286
|
}
|
|
@@ -6319,7 +6319,7 @@ const Methods = {
|
|
|
6319
6319
|
}
|
|
6320
6320
|
else {
|
|
6321
6321
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
6322
|
-
|
|
6322
|
+
$xeTable.preventEvent(evnt, 'event.clearFilter', internalData._currFilterParams, $xeTable.closeFilter);
|
|
6323
6323
|
}
|
|
6324
6324
|
}
|
|
6325
6325
|
}
|
|
@@ -6333,7 +6333,12 @@ const Methods = {
|
|
|
6333
6333
|
}
|
|
6334
6334
|
else {
|
|
6335
6335
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
6336
|
-
|
|
6336
|
+
if (customStore.visible && $xeTable.closeCustom) {
|
|
6337
|
+
$xeTable.preventEvent(evnt, 'event.clearCustom', {}, () => {
|
|
6338
|
+
$xeTable.closeCustom();
|
|
6339
|
+
$xeTable.dispatchEvent('custom', { type: 'close' }, evnt);
|
|
6340
|
+
});
|
|
6341
|
+
}
|
|
6337
6342
|
}
|
|
6338
6343
|
}
|
|
6339
6344
|
}
|
|
@@ -6346,10 +6351,10 @@ const Methods = {
|
|
|
6346
6351
|
if (validTooltip && getEventTargetNode(evnt, validTooltip.$el).flag) {
|
|
6347
6352
|
// 如果是激活状态,且点击了校验提示框
|
|
6348
6353
|
}
|
|
6349
|
-
else if (!
|
|
6354
|
+
else if (!internalData._lastCallTime || internalData._lastCallTime + 50 < Date.now()) {
|
|
6350
6355
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
6351
6356
|
// 如果手动调用了激活单元格,避免触发源被移除后导致重复关闭
|
|
6352
|
-
|
|
6357
|
+
$xeTable.preventEvent(evnt, 'event.clearEdit', actived.args, () => {
|
|
6353
6358
|
let isClear;
|
|
6354
6359
|
if (editOpts.mode === 'row') {
|
|
6355
6360
|
const rowTargetNode = getEventTargetNode(evnt, el, 'vxe-body--row');
|
|
@@ -6370,7 +6375,7 @@ const Methods = {
|
|
|
6370
6375
|
isClear = getEventTargetNode(evnt, el, 'vxe-footer--row').flag;
|
|
6371
6376
|
}
|
|
6372
6377
|
// 如果固定了高度且点击了行之外的空白处,则清除激活状态
|
|
6373
|
-
if (!isClear &&
|
|
6378
|
+
if (!isClear && props.height && !reactData.overflowY) {
|
|
6374
6379
|
const bodyWrapperElem = evnt.target;
|
|
6375
6380
|
if (hasClass(bodyWrapperElem, 'vxe-table--body-wrapper')) {
|
|
6376
6381
|
isClear = evnt.offsetY < bodyWrapperElem.clientHeight;
|
|
@@ -6382,8 +6387,8 @@ const Methods = {
|
|
|
6382
6387
|
setTimeout(() => {
|
|
6383
6388
|
$xeTable.handleClearEdit(evnt).then(() => {
|
|
6384
6389
|
// 如果存在校验,点击了表格之外则清除
|
|
6385
|
-
if (!
|
|
6386
|
-
|
|
6390
|
+
if (!internalData.isActivated && editRules && validOpts.autoClear) {
|
|
6391
|
+
reactData.validErrorMaps = {};
|
|
6387
6392
|
}
|
|
6388
6393
|
});
|
|
6389
6394
|
});
|
|
@@ -6415,29 +6420,31 @@ const Methods = {
|
|
|
6415
6420
|
}
|
|
6416
6421
|
// 如果配置了快捷菜单且,点击了其他地方则关闭
|
|
6417
6422
|
if (ctxMenuStore.visible && tableMenu && !getEventTargetNode(evnt, tableMenu.$el).flag) {
|
|
6418
|
-
|
|
6423
|
+
$xeTable.closeMenu();
|
|
6419
6424
|
}
|
|
6420
6425
|
const isActivated = getEventTargetNode(evnt, ($xeGGWrapper || $xeTable).$el).flag;
|
|
6421
6426
|
// 如果存在校验,点击了表格之外则清除
|
|
6422
6427
|
if (!isActivated && editRules && validOpts.autoClear) {
|
|
6423
|
-
|
|
6428
|
+
reactData.validErrorMaps = {};
|
|
6424
6429
|
}
|
|
6425
6430
|
// 最后激活的表格
|
|
6426
|
-
|
|
6431
|
+
internalData.isActivated = isActivated;
|
|
6427
6432
|
},
|
|
6428
6433
|
/**
|
|
6429
6434
|
* 窗口失焦事件处理
|
|
6430
6435
|
*/
|
|
6431
6436
|
handleGlobalBlurEvent() {
|
|
6432
|
-
this
|
|
6433
|
-
|
|
6437
|
+
const $xeTable = this;
|
|
6438
|
+
$xeTable.closeFilter();
|
|
6439
|
+
$xeTable.closeMenu();
|
|
6434
6440
|
},
|
|
6435
6441
|
/**
|
|
6436
6442
|
* 全局滚动事件
|
|
6437
6443
|
*/
|
|
6438
6444
|
handleGlobalMousewheelEvent() {
|
|
6439
|
-
this
|
|
6440
|
-
|
|
6445
|
+
const $xeTable = this;
|
|
6446
|
+
$xeTable.closeTooltip();
|
|
6447
|
+
$xeTable.closeMenu();
|
|
6441
6448
|
},
|
|
6442
6449
|
/**
|
|
6443
6450
|
* 表格键盘事件
|
|
@@ -10482,17 +10489,44 @@ const Methods = {
|
|
|
10482
10489
|
* 获取表格的滚动状态
|
|
10483
10490
|
*/
|
|
10484
10491
|
getScroll() {
|
|
10492
|
+
const $xeTable = this;
|
|
10493
|
+
return $xeTable.getScrollData();
|
|
10494
|
+
},
|
|
10495
|
+
/**
|
|
10496
|
+
* 获取表格的滚动数据
|
|
10497
|
+
*/
|
|
10498
|
+
getScrollData() {
|
|
10485
10499
|
const $xeTable = this;
|
|
10486
10500
|
const reactData = $xeTable;
|
|
10487
10501
|
const internalData = $xeTable;
|
|
10488
|
-
const { scrollXLoad, scrollYLoad } = reactData;
|
|
10502
|
+
const { scrollXLoad, scrollYLoad, scrollbarHeight, scrollbarWidth } = reactData;
|
|
10489
10503
|
const { elemStore } = internalData;
|
|
10490
10504
|
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
10505
|
+
const scrollTop = bodyScrollElem ? bodyScrollElem.scrollTop : 0;
|
|
10506
|
+
const scrollLeft = bodyScrollElem ? bodyScrollElem.scrollLeft : 0;
|
|
10507
|
+
const clientHeight = bodyScrollElem ? bodyScrollElem.clientHeight : 0;
|
|
10508
|
+
const clientWidth = bodyScrollElem ? bodyScrollElem.clientWidth : 0;
|
|
10509
|
+
const scrollHeight = bodyScrollElem ? bodyScrollElem.scrollHeight : 0;
|
|
10510
|
+
const scrollWidth = bodyScrollElem ? bodyScrollElem.scrollWidth : 0;
|
|
10511
|
+
const isTop = scrollTop <= 0;
|
|
10512
|
+
const isBottom = scrollTop + clientHeight >= scrollHeight;
|
|
10513
|
+
const isLeft = scrollLeft <= 0;
|
|
10514
|
+
const isRight = scrollLeft + clientWidth >= scrollWidth;
|
|
10491
10515
|
return {
|
|
10492
10516
|
virtualX: scrollXLoad,
|
|
10493
10517
|
virtualY: scrollYLoad,
|
|
10494
|
-
|
|
10495
|
-
|
|
10518
|
+
isTop,
|
|
10519
|
+
isBottom,
|
|
10520
|
+
isLeft,
|
|
10521
|
+
isRight,
|
|
10522
|
+
scrollbarHeight,
|
|
10523
|
+
scrollbarWidth,
|
|
10524
|
+
scrollTop,
|
|
10525
|
+
scrollLeft,
|
|
10526
|
+
scrollHeight,
|
|
10527
|
+
scrollWidth,
|
|
10528
|
+
clientHeight,
|
|
10529
|
+
clientWidth
|
|
10496
10530
|
};
|
|
10497
10531
|
},
|
|
10498
10532
|
handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, params) {
|
|
@@ -10804,11 +10838,10 @@ const Methods = {
|
|
|
10804
10838
|
const { scrollXLoad, scrollYLoad, expandColumn } = reactData;
|
|
10805
10839
|
const leftFixedWidth = $xeTable.computeLeftFixedWidth;
|
|
10806
10840
|
const rightFixedWidth = $xeTable.computeRightFixedWidth;
|
|
10807
|
-
if (!(leftFixedWidth || rightFixedWidth || expandColumn)) {
|
|
10808
|
-
return;
|
|
10809
|
-
}
|
|
10810
10841
|
const { elemStore, lastScrollTop, lastScrollLeft } = internalData;
|
|
10811
10842
|
const rowOpts = $xeTable.computeRowOpts;
|
|
10843
|
+
const scrollbarXOpts = $xeTable.computeScrollbarXOpts;
|
|
10844
|
+
const scrollbarYOpts = $xeTable.computeScrollbarYOpts;
|
|
10812
10845
|
const xHandleEl = $xeTable.$refs.refScrollXHandleElem;
|
|
10813
10846
|
const yHandleEl = $xeTable.$refs.refScrollYHandleElem;
|
|
10814
10847
|
const leftScrollElem = getRefElem(elemStore['left-body-scroll']);
|
|
@@ -10817,12 +10850,6 @@ const Methods = {
|
|
|
10817
10850
|
const footerScrollElem = getRefElem(elemStore['main-footer-scroll']);
|
|
10818
10851
|
const rightScrollElem = getRefElem(elemStore['right-body-scroll']);
|
|
10819
10852
|
const rowExpandEl = $xeTable.$refs.refRowExpandElem;
|
|
10820
|
-
if (!xHandleEl) {
|
|
10821
|
-
return;
|
|
10822
|
-
}
|
|
10823
|
-
if (!yHandleEl) {
|
|
10824
|
-
return;
|
|
10825
|
-
}
|
|
10826
10853
|
if (!bodyScrollElem) {
|
|
10827
10854
|
return;
|
|
10828
10855
|
}
|
|
@@ -10835,13 +10862,28 @@ const Methods = {
|
|
|
10835
10862
|
const scrollLeft = currScrollLeft + deltaLeft;
|
|
10836
10863
|
const isRollX = scrollLeft !== lastScrollLeft;
|
|
10837
10864
|
const isRollY = scrollTop !== lastScrollTop;
|
|
10865
|
+
if (isRollX) {
|
|
10866
|
+
// 如果禁用滚动
|
|
10867
|
+
if (scrollbarXOpts.visible === 'hidden') {
|
|
10868
|
+
evnt.preventDefault();
|
|
10869
|
+
return;
|
|
10870
|
+
}
|
|
10871
|
+
}
|
|
10838
10872
|
if (isRollY) {
|
|
10873
|
+
// 如果禁用滚动
|
|
10874
|
+
if (scrollbarYOpts.visible === 'hidden') {
|
|
10875
|
+
evnt.preventDefault();
|
|
10876
|
+
return;
|
|
10877
|
+
}
|
|
10839
10878
|
const isTopWheel = deltaTop < 0;
|
|
10840
10879
|
// 如果滚动位置已经是顶部或底部,则不需要触发
|
|
10841
10880
|
if (isTopWheel ? currScrollTop <= 0 : currScrollTop >= bodyScrollElem.scrollHeight - bodyScrollElem.clientHeight) {
|
|
10842
10881
|
return;
|
|
10843
10882
|
}
|
|
10844
10883
|
}
|
|
10884
|
+
if (!(leftFixedWidth || rightFixedWidth || expandColumn)) {
|
|
10885
|
+
return;
|
|
10886
|
+
}
|
|
10845
10887
|
if (rowOpts.isHover || highlightHoverRow) {
|
|
10846
10888
|
$xeTable.clearHoverRow();
|
|
10847
10889
|
}
|
|
@@ -11367,6 +11409,8 @@ const Methods = {
|
|
|
11367
11409
|
scrollYStore.endIndex = scrollYStore.visibleSize;
|
|
11368
11410
|
scrollYStore.visibleEndIndex = scrollYStore.visibleSize;
|
|
11369
11411
|
return $xeTable.$nextTick().then(() => {
|
|
11412
|
+
internalData.lastScrollLeft = 0;
|
|
11413
|
+
internalData.lastScrollTop = 0;
|
|
11370
11414
|
internalData.intoRunScroll = false;
|
|
11371
11415
|
});
|
|
11372
11416
|
},
|
package/es/table/src/table.js
CHANGED
|
@@ -72,7 +72,7 @@ function renderViewFixed(h, $xeTable, fixedType) {
|
|
|
72
72
|
const osYBehavior = XEUtils.eqNull(overscrollYBehavior) ? scrollbarOpts.overscrollBehavior : overscrollYBehavior;
|
|
73
73
|
return h('div', {
|
|
74
74
|
ref: isFixedLeft ? 'refLeftContainer' : 'refRightContainer',
|
|
75
|
-
class: [`vxe-table--fixed-${fixedType}-wrapper`, {
|
|
75
|
+
class: [`vxe-table--fixed-${fixedType}-wrapper`, `sx--${scrollbarXOpts.visible}`, `sy--${scrollbarYOpts.visible}`, {
|
|
76
76
|
[`x-ob--${osXBehavior}`]: osXBehavior,
|
|
77
77
|
[`y-ob--${osYBehavior}`]: osYBehavior
|
|
78
78
|
}]
|
|
@@ -413,7 +413,7 @@ function renderViewport(h, $xeTable) {
|
|
|
413
413
|
}]
|
|
414
414
|
}, [
|
|
415
415
|
h('div', {
|
|
416
|
-
class: 'vxe-table--main-wrapper'
|
|
416
|
+
class: ['vxe-table--main-wrapper', `sx--${scrollbarXOpts.visible}`, `sy--${scrollbarYOpts.visible}`]
|
|
417
417
|
}, [
|
|
418
418
|
/**
|
|
419
419
|
* 表头
|
|
@@ -1364,6 +1364,12 @@ export default {
|
|
|
1364
1364
|
},
|
|
1365
1365
|
computeVxeLanguage() {
|
|
1366
1366
|
return VxeUI.getLanguage();
|
|
1367
|
+
},
|
|
1368
|
+
computeScrollbarVisible() {
|
|
1369
|
+
const $xeTable = this;
|
|
1370
|
+
const scrollbarXOpts = $xeTable.computeScrollbarXOpts;
|
|
1371
|
+
const scrollbarYOpts = $xeTable.computeScrollbarYOpts;
|
|
1372
|
+
return `${scrollbarXOpts.visible}${scrollbarYOpts.visible}`;
|
|
1367
1373
|
} }),
|
|
1368
1374
|
watch: {
|
|
1369
1375
|
data(value) {
|
|
@@ -1433,6 +1439,9 @@ export default {
|
|
|
1433
1439
|
computeVxeLanguage() {
|
|
1434
1440
|
this.reLayoutFlag++;
|
|
1435
1441
|
},
|
|
1442
|
+
computeScrollbarVisible() {
|
|
1443
|
+
this.reLayoutFlag++;
|
|
1444
|
+
},
|
|
1436
1445
|
reLayoutFlag() {
|
|
1437
1446
|
const $xeTable = this;
|
|
1438
1447
|
$xeTable.$nextTick(() => $xeTable.recalculate(true));
|
|
@@ -2051,11 +2060,15 @@ export default {
|
|
|
2051
2060
|
h('div', {
|
|
2052
2061
|
key: 'tn',
|
|
2053
2062
|
ref: 'refEmptyPlaceholder',
|
|
2054
|
-
class: 'vxe-table--empty-
|
|
2063
|
+
class: 'vxe-table--empty-place-wrapper'
|
|
2055
2064
|
}, [
|
|
2056
2065
|
h('div', {
|
|
2057
|
-
class: 'vxe-table--empty-
|
|
2058
|
-
},
|
|
2066
|
+
class: 'vxe-table--empty-placeholder'
|
|
2067
|
+
}, [
|
|
2068
|
+
h('div', {
|
|
2069
|
+
class: 'vxe-table--empty-content'
|
|
2070
|
+
}, renderEmptyBody(h, $xeTable))
|
|
2071
|
+
])
|
|
2059
2072
|
]),
|
|
2060
2073
|
/**
|
|
2061
2074
|
* 边框线
|
package/es/table/src/util.js
CHANGED
|
@@ -576,29 +576,35 @@ export function getRefElem(refEl) {
|
|
|
576
576
|
}
|
|
577
577
|
return null;
|
|
578
578
|
}
|
|
579
|
-
export function clearTableDefaultStatus(
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
579
|
+
export function clearTableDefaultStatus($xeTable) {
|
|
580
|
+
const props = $xeTable;
|
|
581
|
+
const internalData = $xeTable;
|
|
582
|
+
internalData.initStatus = false;
|
|
583
|
+
const actionList = [
|
|
584
|
+
$xeTable.clearSort(),
|
|
585
|
+
$xeTable.clearCurrentRow(),
|
|
586
|
+
$xeTable.clearCurrentColumn(),
|
|
587
|
+
$xeTable.clearRadioRow(),
|
|
588
|
+
$xeTable.clearRadioReserve(),
|
|
589
|
+
$xeTable.clearCheckboxRow(),
|
|
590
|
+
$xeTable.clearCheckboxReserve(),
|
|
591
|
+
$xeTable.clearRowExpand(),
|
|
592
|
+
$xeTable.clearTreeExpand(),
|
|
593
|
+
$xeTable.clearTreeExpandReserve(),
|
|
594
|
+
$xeTable.clearPendingRow()
|
|
595
|
+
];
|
|
596
|
+
if ($xeTable.clearFilter) {
|
|
597
|
+
actionList.push($xeTable.clearFilter());
|
|
598
|
+
}
|
|
599
|
+
if ($xeTable.clearSelected && (props.keyboardConfig || props.mouseConfig)) {
|
|
600
|
+
actionList.push($xeTable.clearSelected());
|
|
601
|
+
}
|
|
602
|
+
if ($xeTable.clearCellAreas && props.mouseConfig) {
|
|
603
|
+
actionList.push($xeTable.clearCellAreas(), $xeTable.clearCopyCellArea());
|
|
604
|
+
}
|
|
605
|
+
return Promise.all(actionList).then(() => {
|
|
606
|
+
return $xeTable.clearScroll();
|
|
607
|
+
});
|
|
602
608
|
}
|
|
603
609
|
export function clearTableAllStatus(_vm) {
|
|
604
610
|
if (_vm.clearFilter) {
|
package/es/table/style.css
CHANGED
|
@@ -1839,6 +1839,28 @@
|
|
|
1839
1839
|
overflow-x: scroll;
|
|
1840
1840
|
}
|
|
1841
1841
|
|
|
1842
|
+
.vxe-table--main-wrapper.sx--hidden > .vxe-table--header-wrapper > .vxe-table--header-inner-wrapper {
|
|
1843
|
+
overflow-x: hidden;
|
|
1844
|
+
}
|
|
1845
|
+
.vxe-table--main-wrapper.sx--hidden > .vxe-table--body-wrapper > .vxe-table--body-inner-wrapper {
|
|
1846
|
+
overflow-x: hidden;
|
|
1847
|
+
}
|
|
1848
|
+
.vxe-table--main-wrapper.sx--hidden > .vxe-table--footer-wrapper > .vxe-table--footer-inner-wrapper {
|
|
1849
|
+
overflow-x: hidden;
|
|
1850
|
+
}
|
|
1851
|
+
.vxe-table--main-wrapper.sy--hidden > .vxe-table--body-wrapper > .vxe-table--body-inner-wrapper {
|
|
1852
|
+
overflow-y: hidden;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
.vxe-table--fixed-left-wrapper.sx--hidden > .vxe-table--body-wrapper > .vxe-table--body-inner-wrapper,
|
|
1856
|
+
.vxe-table--fixed-right-wrapper.sx--hidden > .vxe-table--body-wrapper > .vxe-table--body-inner-wrapper {
|
|
1857
|
+
overflow-x: hidden;
|
|
1858
|
+
}
|
|
1859
|
+
.vxe-table--fixed-left-wrapper.sy--hidden > .vxe-table--body-wrapper > .vxe-table--body-inner-wrapper,
|
|
1860
|
+
.vxe-table--fixed-right-wrapper.sy--hidden > .vxe-table--body-wrapper > .vxe-table--body-inner-wrapper {
|
|
1861
|
+
overflow-y: hidden;
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1842
1864
|
.vxe-loading--custom-wrapper {
|
|
1843
1865
|
display: none;
|
|
1844
1866
|
position: absolute;
|
|
@@ -3496,11 +3518,16 @@
|
|
|
3496
3518
|
display: none;
|
|
3497
3519
|
visibility: hidden;
|
|
3498
3520
|
}
|
|
3499
|
-
.vxe-table--render-default .vxe-table--empty-
|
|
3521
|
+
.vxe-table--render-default .vxe-table--empty-place-wrapper {
|
|
3500
3522
|
display: none;
|
|
3501
3523
|
position: absolute;
|
|
3524
|
+
width: 100%;
|
|
3502
3525
|
top: 0;
|
|
3503
3526
|
z-index: 5;
|
|
3527
|
+
overflow: hidden;
|
|
3528
|
+
}
|
|
3529
|
+
.vxe-table--render-default .vxe-table--empty-placeholder {
|
|
3530
|
+
display: flex;
|
|
3504
3531
|
}
|
|
3505
3532
|
.vxe-table--render-default .vxe-table--empty-content {
|
|
3506
3533
|
display: block;
|
|
@@ -3508,7 +3535,7 @@
|
|
|
3508
3535
|
pointer-events: auto;
|
|
3509
3536
|
}
|
|
3510
3537
|
.vxe-table--render-default.is--empty .vxe-table--empty-block,
|
|
3511
|
-
.vxe-table--render-default.is--empty .vxe-table--empty-
|
|
3538
|
+
.vxe-table--render-default.is--empty .vxe-table--empty-place-wrapper {
|
|
3512
3539
|
display: flex;
|
|
3513
3540
|
}
|
|
3514
3541
|
.vxe-table--render-default .vxe-body--column.col--selected {
|