vxe-table 3.24.4 → 3.25.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/es/grid/src/grid.js +15 -2
  2. package/es/locale/lang/fr-FR.js +29 -29
  3. package/es/style.css +1 -1
  4. package/es/table/module/custom/panel.js +3 -2
  5. package/es/table/module/edit/mixin.js +5 -4
  6. package/es/table/module/export/mixin.js +6 -4
  7. package/es/table/module/filter/mixin.js +2 -2
  8. package/es/table/module/keyboard/mixin.js +4 -3
  9. package/es/table/module/menu/mixin.js +3 -3
  10. package/es/table/render/index.js +5 -3
  11. package/es/table/src/body.js +4 -4
  12. package/es/table/src/header.js +4 -3
  13. package/es/table/src/methods.js +93 -59
  14. package/es/table/src/props.js +4 -0
  15. package/es/table/src/table.js +63 -43
  16. package/es/table/src/util.js +6 -3
  17. package/es/ui/index.js +9 -11
  18. package/es/ui/src/log.js +1 -1
  19. package/es/ui/src/utils.js +9 -0
  20. package/lib/grid/src/grid.js +14 -1
  21. package/lib/grid/src/grid.min.js +1 -1
  22. package/lib/index.umd.js +170 -110
  23. package/lib/index.umd.min.js +1 -1
  24. package/lib/locale/lang/fr-FR.js +29 -29
  25. package/lib/locale/lang/fr-FR.min.js +1 -1
  26. package/lib/locale/lang/fr-FR.umd.js +29 -29
  27. package/lib/style.css +1 -1
  28. package/lib/table/module/custom/panel.js +2 -1
  29. package/lib/table/module/custom/panel.min.js +1 -1
  30. package/lib/table/module/edit/mixin.js +4 -3
  31. package/lib/table/module/edit/mixin.min.js +1 -1
  32. package/lib/table/module/export/mixin.js +9 -3
  33. package/lib/table/module/export/mixin.min.js +1 -1
  34. package/lib/table/module/filter/mixin.js +1 -1
  35. package/lib/table/module/filter/mixin.min.js +1 -1
  36. package/lib/table/module/keyboard/mixin.js +4 -3
  37. package/lib/table/module/keyboard/mixin.min.js +1 -1
  38. package/lib/table/module/menu/mixin.js +2 -2
  39. package/lib/table/module/menu/mixin.min.js +1 -1
  40. package/lib/table/render/index.js +4 -2
  41. package/lib/table/render/index.min.js +1 -1
  42. package/lib/table/src/body.js +3 -3
  43. package/lib/table/src/body.min.js +1 -1
  44. package/lib/table/src/header.js +3 -2
  45. package/lib/table/src/header.min.js +1 -1
  46. package/lib/table/src/methods.js +36 -34
  47. package/lib/table/src/methods.min.js +1 -1
  48. package/lib/table/src/props.js +4 -0
  49. package/lib/table/src/props.min.js +1 -1
  50. package/lib/table/src/table.js +58 -45
  51. package/lib/table/src/table.min.js +1 -1
  52. package/lib/table/src/util.js +8 -2
  53. package/lib/table/src/util.min.js +1 -1
  54. package/lib/ui/index.js +9 -11
  55. package/lib/ui/index.min.js +1 -1
  56. package/lib/ui/src/log.js +1 -1
  57. package/lib/ui/src/log.min.js +1 -1
  58. package/lib/ui/src/utils.js +10 -0
  59. package/lib/ui/src/utils.min.js +1 -1
  60. package/package.json +2 -2
  61. package/packages/grid/src/grid.ts +16 -2
  62. package/packages/locale/lang/fr-FR.ts +903 -903
  63. package/packages/table/module/custom/panel.ts +3 -2
  64. package/packages/table/module/edit/mixin.ts +5 -4
  65. package/packages/table/module/export/mixin.ts +6 -4
  66. package/packages/table/module/filter/mixin.ts +2 -2
  67. package/packages/table/module/keyboard/mixin.ts +4 -3
  68. package/packages/table/module/menu/mixin.ts +3 -3
  69. package/packages/table/render/index.ts +5 -3
  70. package/packages/table/src/body.ts +4 -4
  71. package/packages/table/src/header.ts +4 -3
  72. package/packages/table/src/methods.ts +90 -57
  73. package/packages/table/src/props.ts +4 -0
  74. package/packages/table/src/table.ts +69 -43
  75. package/packages/table/src/util.ts +6 -3
  76. package/packages/ui/index.ts +8 -10
  77. package/packages/ui/src/utils.ts +10 -0
  78. /package/es/{iconfont.1791617048832.ttf → iconfont.1791954189007.ttf} +0 -0
  79. /package/es/{iconfont.1791617048832.woff → iconfont.1791954189007.woff} +0 -0
  80. /package/es/{iconfont.1791617048832.woff2 → iconfont.1791954189007.woff2} +0 -0
  81. /package/lib/{iconfont.1791617048832.ttf → iconfont.1791954189007.ttf} +0 -0
  82. /package/lib/{iconfont.1791617048832.woff → iconfont.1791954189007.woff} +0 -0
  83. /package/lib/{iconfont.1791617048832.woff2 → iconfont.1791954189007.woff2} +0 -0
@@ -1,6 +1,6 @@
1
1
  import XEUtils from 'xe-utils';
2
2
  import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, wheelScrollLeftTo, wheelScrollTopTo, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey, checkTargetElement, hasAxternalInputTarget } from '../../ui/src/dom';
3
- import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils';
3
+ import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue, hasEnableConf, getDefaultConfig } from '../../ui/src/utils';
4
4
  import { VxeUI } from '../../ui';
5
5
  import Cell from './cell';
6
6
  import { getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn, getRowMaxHeight, handleCustomStoreConfig, encodeRowid } from './util';
@@ -996,7 +996,6 @@ function updateStyle($xeTable) {
996
996
  const isHeaderRenderOptimize = $xeTable.computeIsHeaderRenderOptimize;
997
997
  const isBodyRenderOptimize = $xeTable.computeIsBodyRenderOptimize;
998
998
  const isFooterRenderOptimize = $xeTable.computeIsFooterRenderOptimize;
999
- const scrollbarOpts = $xeTable.computeScrollbarOpts;
1000
999
  const mouseOpts = $xeTable.computeMouseOpts;
1001
1000
  const bodyWrapperElem = getRefElem(elemStore['main-body-wrapper']);
1002
1001
  const bodyTableElem = getRefElem(elemStore['main-body-table']);
@@ -1004,24 +1003,26 @@ function updateStyle($xeTable) {
1004
1003
  emptyPlaceholderElem.style.top = `${tHeaderHeight}px`;
1005
1004
  emptyPlaceholderElem.style.height = bodyWrapperElem ? `${bodyWrapperElem.offsetHeight - osbHeight}px` : '';
1006
1005
  }
1007
- const scrollbarXConf = scrollbarOpts.x || {};
1008
- const scrollbarYConf = scrollbarOpts.y || {};
1006
+ const scrollbarXOpts = $xeTable.computeScrollbarXOpts;
1007
+ const scrollbarYOpts = $xeTable.computeScrollbarYOpts;
1009
1008
  const scrollbarYToLeft = $xeTable.computeScrollbarYToLeft;
1010
1009
  let xScrollbarVisible = overflowX ? 'visible' : 'hidden';
1011
- if (scrollbarXConf.visible === 'visible' || $xeGanttView) {
1010
+ const hideXScroll = scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden';
1011
+ if (!hideXScroll || $xeGanttView) {
1012
1012
  osbHeight = scrollbarHeight;
1013
1013
  xScrollbarVisible = 'visible';
1014
1014
  }
1015
- else if (scrollbarXConf.visible === 'hidden' || scrollbarXConf.visible === false) {
1015
+ else if (hideXScroll) {
1016
1016
  osbHeight = 0;
1017
1017
  xScrollbarVisible = 'hidden';
1018
1018
  }
1019
1019
  let yScrollbarVisible = overflowY ? 'visible' : 'hidden';
1020
- if ((scrollbarYConf.visible === 'hidden' || scrollbarYConf.visible === false) || (($xeGantt && $xeGanttView && $xeGantt.reactData.showRightView) && !scrollbarYToLeft)) {
1020
+ const showYScroll = !(scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden');
1021
+ if (!showYScroll || (($xeGantt && $xeGanttView && $xeGantt.reactData.showRightView) && !scrollbarYToLeft)) {
1021
1022
  osbWidth = 0;
1022
1023
  yScrollbarVisible = 'hidden';
1023
1024
  }
1024
- else if (scrollbarYConf.visible === 'visible') {
1025
+ else if (showYScroll) {
1025
1026
  osbWidth = scrollbarWidth;
1026
1027
  yScrollbarVisible = 'visible';
1027
1028
  }
@@ -1255,7 +1256,7 @@ function updateStyle($xeTable) {
1255
1256
  if (currentRow) {
1256
1257
  $xeTable.setCurrentRow(currentRow);
1257
1258
  }
1258
- if (mouseConfig && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
1259
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
1259
1260
  $xeTable.addCellSelectedClass();
1260
1261
  }
1261
1262
  if ($xeGanttView && $xeGanttView.handleUpdateStyle) {
@@ -3027,6 +3028,7 @@ function computeScrollLoad($xeTable) {
3027
3028
  });
3028
3029
  }
3029
3030
  function calcScrollbar($xeTable) {
3031
+ const scrollDefaultConf = $xeTable.scrollDefaultConf;
3030
3032
  const reactData = $xeTable;
3031
3033
  const internalData = $xeTable;
3032
3034
  const { scrollXWidth, scrollYHeight } = reactData;
@@ -3044,14 +3046,18 @@ function calcScrollbar($xeTable) {
3044
3046
  let overflowY = false;
3045
3047
  let overflowX = false;
3046
3048
  if (bodyWrapperElem) {
3049
+ const scrollbarXOpts = $xeTable.computeScrollbarXOpts;
3050
+ const scrollbarYOpts = $xeTable.computeScrollbarYOpts;
3051
+ const barWidth = XEUtils.toNumber(getDefaultConfig(getDefaultConfig(scrollbarYOpts.width, scrollbarOpts.width), scrollDefaultConf.width));
3052
+ const barHeight = XEUtils.toNumber(getDefaultConfig(getDefaultConfig(scrollbarXOpts.height, scrollbarOpts.height), scrollDefaultConf.height));
3047
3053
  overflowY = scrollYHeight > bodyWrapperElem.clientHeight;
3048
3054
  if (yHandleEl) {
3049
- reactData.scrollbarWidth = scrollbarOpts.width || (yHandleEl.offsetWidth - yHandleEl.clientWidth) || 14;
3055
+ reactData.scrollbarWidth = (barWidth || barHeight) || (yHandleEl.offsetWidth - yHandleEl.clientWidth) || 14;
3050
3056
  }
3051
3057
  reactData.overflowY = overflowY;
3052
3058
  overflowX = scrollXWidth > bodyWrapperElem.clientWidth;
3053
3059
  if (xHandleEl) {
3054
- reactData.scrollbarHeight = scrollbarOpts.height || (xHandleEl.offsetHeight - xHandleEl.clientHeight) || 14;
3060
+ reactData.scrollbarHeight = (barHeight || barWidth) || (xHandleEl.offsetHeight - xHandleEl.clientHeight) || 14;
3055
3061
  }
3056
3062
  reactData.overflowX = overflowX;
3057
3063
  const hHeight = headerTableElem ? headerTableElem.clientHeight : 0;
@@ -3455,12 +3461,13 @@ function loadTableData($xeTable, datas, isReload, isReset) {
3455
3461
  const props = $xeTable;
3456
3462
  const reactData = $xeTable;
3457
3463
  const internalData = $xeTable;
3458
- const { keepSource, treeConfig, aggregateConfig, rowGroupConfig } = props;
3464
+ const { keepSource, treeConfig, rowGroupConfig, aggregateConfig, mouseConfig } = props;
3459
3465
  const { rowGroupList, scrollYLoad: oldScrollYLoad } = reactData;
3460
3466
  const { initStatus, scrollYStore, scrollXStore, lastScrollLeft, lastScrollTop } = internalData;
3461
3467
  const rowOpts = $xeTable.computeRowOpts;
3462
3468
  const treeOpts = $xeTable.computeTreeOpts;
3463
3469
  const expandOpts = $xeTable.computeExpandOpts;
3470
+ const mouseOpts = $xeTable.computeMouseOpts;
3464
3471
  const { transform } = treeOpts;
3465
3472
  const childrenField = treeOpts.children || treeOpts.childrenField;
3466
3473
  let treeData = [];
@@ -3550,7 +3557,7 @@ function loadTableData($xeTable, datas, isReload, isReset) {
3550
3557
  if (keepSource) {
3551
3558
  $xeTable.cacheSourceMap(fullData);
3552
3559
  }
3553
- if ($xeTable.clearCellAreas && props.mouseConfig) {
3560
+ if ($xeTable.clearCellAreas && hasEnableConf(mouseConfig, mouseOpts)) {
3554
3561
  $xeTable.clearCellAreas();
3555
3562
  $xeTable.clearCopyCellArea();
3556
3563
  }
@@ -4678,9 +4685,25 @@ const tableMethods = {
4678
4685
  const $xeTable = this;
4679
4686
  const $xeGrid = $xeTable.$xeGrid;
4680
4687
  const $xeGantt = $xeTable.$xeGantt;
4681
- const $xeGGWrapper = $xeGrid || $xeGantt;
4682
- const { $el } = this;
4683
- return $xeGGWrapper ? $xeGGWrapper.$el.parentNode : $el.parentNode;
4688
+ const el = $xeTable.$refs.refElem;
4689
+ if (!el) {
4690
+ return null;
4691
+ }
4692
+ const parentEl = el.parentElement;
4693
+ if (!parentEl) {
4694
+ return null;
4695
+ }
4696
+ if ($xeGantt && hasClass(parentEl, 'vxe-gantt--table-wrapper')) {
4697
+ return $xeGantt.getParentElem();
4698
+ }
4699
+ else if ($xeGrid && hasClass(parentEl, 'vxe-grid--table-wrapper')) {
4700
+ return $xeGrid.getParentElem();
4701
+ }
4702
+ // 如果是虚拟滚动条
4703
+ if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
4704
+ return parentEl.parentElement;
4705
+ }
4706
+ return parentEl;
4684
4707
  },
4685
4708
  /**
4686
4709
  * 获取父容器的高度
@@ -4692,24 +4715,32 @@ const tableMethods = {
4692
4715
  const props = $xeTable;
4693
4716
  const { height } = props;
4694
4717
  const el = $xeTable.$refs.refElem;
4695
- if (el) {
4696
- const parentElem = el.parentNode;
4697
- const parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentElem) : 0;
4698
- let parentWrapperHeight = 0;
4699
- if (parentElem) {
4700
- if ($xeGantt && hasClass(parentElem, 'vxe-gantt--table-wrapper')) {
4701
- parentWrapperHeight = $xeGantt.getParentHeight();
4702
- }
4703
- else if ($xeGrid && hasClass(parentElem, 'vxe-grid--table-wrapper')) {
4704
- parentWrapperHeight = $xeGrid.getParentHeight();
4705
- }
4706
- else {
4707
- parentWrapperHeight = parentElem.clientHeight;
4708
- }
4718
+ if (!el) {
4719
+ return 0;
4720
+ }
4721
+ let parentEl = el.parentElement;
4722
+ let parentPaddingSize = 0;
4723
+ let parentWrapperHeight = 0;
4724
+ if (!parentEl) {
4725
+ return 0;
4726
+ }
4727
+ if ($xeGantt && hasClass(parentEl, 'vxe-gantt--table-wrapper')) {
4728
+ parentWrapperHeight = $xeGantt.getParentHeight();
4729
+ }
4730
+ else if ($xeGrid && hasClass(parentEl, 'vxe-grid--table-wrapper')) {
4731
+ parentWrapperHeight = $xeGrid.getParentHeight();
4732
+ }
4733
+ else {
4734
+ // 如果是虚拟滚动条
4735
+ if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
4736
+ parentEl = parentEl.parentElement;
4737
+ }
4738
+ if (parentEl) {
4739
+ parentWrapperHeight = parentEl.clientHeight;
4740
+ parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentEl) : 0;
4709
4741
  }
4710
- return Math.floor(parentWrapperHeight - parentPaddingSize);
4711
4742
  }
4712
- return 0;
4743
+ return Math.floor(parentWrapperHeight - parentPaddingSize);
4713
4744
  },
4714
4745
  /**
4715
4746
  * 获取需要排除的高度
@@ -6443,7 +6474,8 @@ const tableMethods = {
6443
6474
  const $xeTable = this;
6444
6475
  const props = $xeTable;
6445
6476
  const { mouseConfig } = props;
6446
- if (mouseConfig) {
6477
+ const mouseOpts = $xeTable.computeMouseOpts;
6478
+ if (hasEnableConf(mouseConfig, mouseOpts)) {
6447
6479
  if ($xeTable.clearSelected) {
6448
6480
  $xeTable.clearSelected();
6449
6481
  }
@@ -7505,6 +7537,7 @@ const tableMethods = {
7505
7537
  const editOpts = $xeTable.computeEditOpts;
7506
7538
  const validOpts = $xeTable.computeValidOpts;
7507
7539
  const areaOpts = $xeTable.computeAreaOpts;
7540
+ const mouseOpts = $xeTable.computeMouseOpts;
7508
7541
  const { actived } = editStore;
7509
7542
  const tableFilter = $xeTable.$refs.refTableFilter;
7510
7543
  const tableMenu = $xeTable.$refs.refTableMenu;
@@ -7600,7 +7633,7 @@ const tableMethods = {
7600
7633
  }
7601
7634
  }
7602
7635
  }
7603
- else if (mouseConfig) {
7636
+ else if (hasEnableConf(mouseConfig, mouseOpts)) {
7604
7637
  if (!getEventTargetNode(evnt, el).flag && !($xeGGWrapper && getEventTargetNode(evnt, $xeGGWrapper.$el).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.$el).flag) && !(this.$toolbar && getEventTargetNode(evnt, this.$toolbar.$el).flag)) {
7605
7638
  if ($xeTable.clearSelected) {
7606
7639
  $xeTable.clearSelected();
@@ -7677,7 +7710,7 @@ const tableMethods = {
7677
7710
  if (isEsc) {
7678
7711
  $xeTable.preventEvent(evnt, 'event.keydown', null, () => {
7679
7712
  $xeTable.dispatchEvent('keydown-start', {}, evnt);
7680
- if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
7713
+ if (hasEnableConf(keyboardConfig, keyboardOpts) && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
7681
7714
  $xeTable.handleKdClAreaEvent(evnt);
7682
7715
  }
7683
7716
  else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
@@ -7685,13 +7718,13 @@ const tableMethods = {
7685
7718
  // 如果按下了 Esc 键,关闭快捷菜单、筛选
7686
7719
  $xeTable.closeFilter();
7687
7720
  $xeTable.closeMenu();
7688
- if (keyboardConfig && keyboardOpts.isEsc) {
7721
+ if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEsc) {
7689
7722
  // 如果是激活编辑状态,则取消编辑
7690
7723
  if (actived.row) {
7691
7724
  const params = actived.args;
7692
7725
  $xeTable.handleClearEdit(evnt);
7693
7726
  // 如果配置了选中功能,则为选中状态
7694
- if (mouseConfig && mouseOpts.selected) {
7727
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
7695
7728
  $xeTable.$nextTick(() => $xeTable.handleSelected(params, evnt));
7696
7729
  }
7697
7730
  }
@@ -7769,7 +7802,7 @@ const tableMethods = {
7769
7802
  $xeTable.moveCtxMenu(evnt, ctxMenuStore, 'selected', isRightArrow, true, menuList);
7770
7803
  }
7771
7804
  }
7772
- else if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
7805
+ else if (hasEnableConf(keyboardConfig, keyboardOpts) && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
7773
7806
  $xeTable.handleKdClAreaEvent(evnt);
7774
7807
  }
7775
7808
  else if (isEsc) {
@@ -7778,7 +7811,7 @@ const tableMethods = {
7778
7811
  $xeTable.closeMenu();
7779
7812
  }
7780
7813
  $xeTable.closeFilter();
7781
- if (keyboardConfig && keyboardOpts.isEsc) {
7814
+ if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEsc) {
7782
7815
  // 如果是激活编辑状态,则取消编辑
7783
7816
  if (actived.row) {
7784
7817
  const params = actived.args;
@@ -7790,7 +7823,7 @@ const tableMethods = {
7790
7823
  }
7791
7824
  }
7792
7825
  }
7793
- else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selectRow && selectColumn && (selectColumn.type === 'checkbox' || selectColumn.type === 'radio')) {
7826
+ else if (hasEnableConf(keyboardConfig, keyboardOpts) && isSpacebar && keyboardOpts.isChecked && selectRow && selectColumn && (selectColumn.type === 'checkbox' || selectColumn.type === 'radio')) {
7794
7827
  // 空格键支持选中复选框
7795
7828
  evnt.preventDefault();
7796
7829
  if (selectColumn.type === 'checkbox') {
@@ -7817,7 +7850,7 @@ const tableMethods = {
7817
7850
  internalData._keyCtx = false;
7818
7851
  }, 1000);
7819
7852
  }
7820
- else if (isEnter && !hasAltKey && keyboardConfig && keyboardOpts.isEnter && (selectRow || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
7853
+ else if (isEnter && !hasAltKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEnter && (selectRow || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
7821
7854
  // 退出选中
7822
7855
  if (isControlKey) {
7823
7856
  // 如果是激活编辑状态,则取消编辑
@@ -7825,7 +7858,7 @@ const tableMethods = {
7825
7858
  const params = actived.args;
7826
7859
  $xeTable.handleClearEdit(evnt);
7827
7860
  // 如果配置了选中功能,则为选中状态
7828
- if (mouseConfig && mouseOpts.selected) {
7861
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
7829
7862
  $xeTable.$nextTick(() => $xeTable.handleSelected(params, evnt));
7830
7863
  }
7831
7864
  }
@@ -7943,7 +7976,7 @@ const tableMethods = {
7943
7976
  }
7944
7977
  }
7945
7978
  }
7946
- else if (operArrow && keyboardConfig && keyboardOpts.isArrow) {
7979
+ else if (operArrow && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow) {
7947
7980
  if (!isEditStatus) {
7948
7981
  // 如果按下了方向键
7949
7982
  if (mouseOpts.selected && selectRow && selectColumn) {
@@ -7961,7 +7994,7 @@ const tableMethods = {
7961
7994
  }
7962
7995
  }
7963
7996
  }
7964
- else if (isTab && keyboardConfig && keyboardOpts.isTab) {
7997
+ else if (isTab && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isTab) {
7965
7998
  // 如果按下了 Tab 键切换
7966
7999
  if (selectRow || actived.row) {
7967
8000
  const activeRow = selectRow || actived.row;
@@ -8011,7 +8044,7 @@ const tableMethods = {
8011
8044
  }
8012
8045
  }
8013
8046
  }
8014
- else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selectRow || selectColumn)) {
8047
+ else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selectRow || selectColumn)) {
8015
8048
  // 如果是删除键
8016
8049
  if (!isEditStatus) {
8017
8050
  const { delMethod } = keyboardOpts;
@@ -8042,7 +8075,7 @@ const tableMethods = {
8042
8075
  }
8043
8076
  }
8044
8077
  }
8045
- else if (hasBackspaceKey && keyboardConfig && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
8078
+ else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
8046
8079
  if (!isEditStatus) {
8047
8080
  const { backMethod } = keyboardOpts;
8048
8081
  // 如果是删除键
@@ -8075,7 +8108,7 @@ const tableMethods = {
8075
8108
  }
8076
8109
  }
8077
8110
  }
8078
- else if (hasBackspaceKey && keyboardConfig && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
8111
+ else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
8079
8112
  // 如果树形表格回退键关闭当前行返回父节点
8080
8113
  const { parent: parentRow } = XEUtils.findTree(internalData.afterTreeFullData, item => item === currentRow, { children: childrenField });
8081
8114
  if (parentRow) {
@@ -8093,7 +8126,7 @@ const tableMethods = {
8093
8126
  .then(() => $xeTable.triggerCurrentRowEvent(evnt, params));
8094
8127
  }
8095
8128
  }
8096
- else if (keyboardConfig && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasAxternalInputTarget(evnt.target)) {
8129
+ else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasAxternalInputTarget(evnt.target)) {
8097
8130
  if (isY || (hasShiftKey && isZ)) {
8098
8131
  // 恢复被撤销的操作:Ctrl + Y 或 Ctrl + Shift + Z
8099
8132
  evnt.preventDefault();
@@ -8105,7 +8138,7 @@ const tableMethods = {
8105
8138
  $xeTable.handleUndoStackEvent(evnt);
8106
8139
  }
8107
8140
  }
8108
- else if (keyboardConfig && keyboardOpts.isEdit && !isControlKey && (isSpacebar || isProcess || (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || (keyCode >= 186 && keyCode <= 192) || (keyCode >= 219 && keyCode <= 222))) {
8141
+ else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEdit && !isControlKey && (isSpacebar || isProcess || (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || (keyCode >= 186 && keyCode <= 192) || (keyCode >= 219 && keyCode <= 222))) {
8109
8142
  const { editMode, editMethod } = keyboardOpts;
8110
8143
  // 启用编辑后,空格键功能将失效
8111
8144
  // if (isSpacebar) {
@@ -8161,7 +8194,7 @@ const tableMethods = {
8161
8194
  const { actived } = editStore;
8162
8195
  if (isActivated && !filterStore.visible) {
8163
8196
  if (!(actived.row || actived.column)) {
8164
- if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handlePeClAreaEvent) {
8197
+ if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handlePeClAreaEvent) {
8165
8198
  $xeTable.handlePeClAreaEvent(evnt);
8166
8199
  }
8167
8200
  }
@@ -8181,7 +8214,7 @@ const tableMethods = {
8181
8214
  const { actived } = editStore;
8182
8215
  if (isActivated && !filterStore.visible) {
8183
8216
  if (!(actived.row || actived.column)) {
8184
- if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handleCyClAreaEvent) {
8217
+ if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleCyClAreaEvent) {
8185
8218
  $xeTable.handleCyClAreaEvent(evnt);
8186
8219
  }
8187
8220
  }
@@ -8201,7 +8234,7 @@ const tableMethods = {
8201
8234
  const { actived } = editStore;
8202
8235
  if (isActivated && !filterStore.visible) {
8203
8236
  if (!(actived.row || actived.column)) {
8204
- if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handleCutCellAreaEvent) {
8237
+ if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleCutCellAreaEvent) {
8205
8238
  $xeTable.handleCutCellAreaEvent(evnt);
8206
8239
  }
8207
8240
  }
@@ -9645,7 +9678,7 @@ const tableMethods = {
9645
9678
  const internalData = $xeTable;
9646
9679
  const { mouseConfig } = props;
9647
9680
  const mouseOpts = $xeTable.computeMouseOpts;
9648
- const isMouseSelected = mouseConfig && mouseOpts.selected;
9681
+ const isMouseSelected = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected;
9649
9682
  const column = handleFieldOrColumn($xeTable, fieldOrColumn);
9650
9683
  if (column) {
9651
9684
  $xeTable.clearCurrentColumn();
@@ -9859,7 +9892,7 @@ const tableMethods = {
9859
9892
  const { field, sortable, order } = column;
9860
9893
  if (sortable) {
9861
9894
  const params = { $table: $xeTable, $event: evnt, column, field, property: field, order, sortList: $xeTable.getSortColumns(), sortTime: column.sortTime };
9862
- if (mouseConfig && mouseOpts.area && $xeTable.handleSortEvent) {
9895
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleSortEvent) {
9863
9896
  $xeTable.handleSortEvent(evnt, params);
9864
9897
  }
9865
9898
  if (!order) {
@@ -9941,7 +9974,7 @@ const tableMethods = {
9941
9974
  $xeTable.handleHeaderCellDragMousedownEvent(evnt, params);
9942
9975
  }
9943
9976
  }
9944
- if (!triggerDrag && mouseConfig && mouseOpts.area && $xeTable.handleHeaderCellAreaMouseDnEvent) {
9977
+ if (!triggerDrag && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleHeaderCellAreaMouseDnEvent) {
9945
9978
  $xeTable.handleHeaderCellAreaMouseDnEvent(evnt, Object.assign({ cell, triggerSort, triggerFilter }, params));
9946
9979
  }
9947
9980
  $xeTable.focus();
@@ -10723,6 +10756,7 @@ const tableMethods = {
10723
10756
  const internalData = $xeTable;
10724
10757
  const { mouseConfig } = props;
10725
10758
  const columnDragOpts = $xeTable.computeColumnDragOpts;
10759
+ const mouseOpts = $xeTable.computeMouseOpts;
10726
10760
  const { animation, isPeerDrag, isCrossDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod, dragToChildMethod } = columnDragOpts;
10727
10761
  const { collectColumn, fullColumnIdData } = internalData;
10728
10762
  const el = $xeTable.$refs.refElem;
@@ -10885,7 +10919,7 @@ const tableMethods = {
10885
10919
  }
10886
10920
  });
10887
10921
  $xeTable.handleClearStack();
10888
- if (mouseConfig) {
10922
+ if (hasEnableConf(mouseConfig, mouseOpts)) {
10889
10923
  if ($xeTable.clearSelected) {
10890
10924
  $xeTable.clearSelected();
10891
10925
  }
@@ -12551,14 +12585,14 @@ const tableMethods = {
12551
12585
  const isRollY = overflowY && scrollTop !== lastScrollTop;
12552
12586
  if (isRollX) {
12553
12587
  // 如果禁用滚动
12554
- if (scrollbarXOpts.visible === 'hidden') {
12588
+ if (scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden') {
12555
12589
  evnt.preventDefault();
12556
12590
  return;
12557
12591
  }
12558
12592
  }
12559
12593
  if (isRollY) {
12560
12594
  // 如果禁用滚动
12561
- if (scrollbarYOpts.visible === 'hidden') {
12595
+ if (scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden') {
12562
12596
  evnt.preventDefault();
12563
12597
  return;
12564
12598
  }
@@ -13490,7 +13524,7 @@ const tableMethods = {
13490
13524
  const props = $xeTable;
13491
13525
  const { mouseConfig } = props;
13492
13526
  const mouseOpts = $xeTable.computeMouseOpts;
13493
- if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
13527
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
13494
13528
  return $xeTable.handleRecalculateCellAreaEvent();
13495
13529
  }
13496
13530
  return $xeTable.$nextTick();
@@ -292,6 +292,10 @@ export const tableProps = {
292
292
  virtualXConfig: Object,
293
293
  // 纵向虚拟滚动配置项
294
294
  virtualYConfig: Object,
295
+ useScrollbar: {
296
+ type: Boolean,
297
+ default: () => getConfig().table.useScrollbar
298
+ },
295
299
  // 滚动条配置项
296
300
  scrollbarConfig: Object,
297
301
  // 撤销/恢复历史配置项