vxe-table 4.19.0-beta.9 → 4.19.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 (154) hide show
  1. package/README.md +2 -2
  2. package/es/index.css +1 -1
  3. package/es/index.min.css +1 -1
  4. package/es/locale/lang/ar-EG.js +5 -3
  5. package/es/locale/lang/de-DE.js +5 -3
  6. package/es/locale/lang/en-US.js +5 -3
  7. package/es/locale/lang/es-ES.js +5 -3
  8. package/es/locale/lang/fr-FR.js +5 -3
  9. package/es/locale/lang/hu-HU.js +5 -3
  10. package/es/locale/lang/hy-AM.js +5 -3
  11. package/es/locale/lang/id-ID.js +5 -3
  12. package/es/locale/lang/it-IT.js +5 -3
  13. package/es/locale/lang/ja-JP.js +5 -3
  14. package/es/locale/lang/ko-KR.js +5 -3
  15. package/es/locale/lang/ms-MY.js +5 -3
  16. package/es/locale/lang/nb-NO.js +5 -3
  17. package/es/locale/lang/pt-BR.js +5 -3
  18. package/es/locale/lang/ru-RU.js +5 -3
  19. package/es/locale/lang/th-TH.js +5 -3
  20. package/es/locale/lang/ug-CN.js +5 -3
  21. package/es/locale/lang/uk-UA.js +5 -3
  22. package/es/locale/lang/uz-UZ.js +5 -3
  23. package/es/locale/lang/vi-VN.js +5 -3
  24. package/es/locale/lang/zh-CHT.js +5 -3
  25. package/es/locale/lang/zh-CN.js +5 -3
  26. package/es/style.css +1 -1
  27. package/es/style.min.css +1 -1
  28. package/es/table/module/custom/panel.js +39 -27
  29. package/es/table/src/table.js +10 -9
  30. package/es/table/style.css +4 -1
  31. package/es/table/style.min.css +1 -1
  32. package/es/ui/index.js +2 -1
  33. package/es/ui/src/log.js +1 -1
  34. package/es/vxe-table/style.css +4 -1
  35. package/es/vxe-table/style.min.css +1 -1
  36. package/helper/vetur/attributes.json +1 -1
  37. package/helper/vetur/tags.json +1 -1
  38. package/lib/index.css +1 -1
  39. package/lib/index.min.css +1 -1
  40. package/lib/index.umd.js +39 -24
  41. package/lib/index.umd.min.js +1 -1
  42. package/lib/locale/lang/ar-EG.js +5 -3
  43. package/lib/locale/lang/ar-EG.min.js +1 -1
  44. package/lib/locale/lang/ar-EG.umd.js +5 -3
  45. package/lib/locale/lang/de-DE.js +5 -3
  46. package/lib/locale/lang/de-DE.min.js +1 -1
  47. package/lib/locale/lang/de-DE.umd.js +5 -3
  48. package/lib/locale/lang/en-US.js +5 -3
  49. package/lib/locale/lang/en-US.min.js +1 -1
  50. package/lib/locale/lang/en-US.umd.js +5 -3
  51. package/lib/locale/lang/es-ES.js +5 -3
  52. package/lib/locale/lang/es-ES.min.js +1 -1
  53. package/lib/locale/lang/es-ES.umd.js +5 -3
  54. package/lib/locale/lang/fr-FR.js +5 -3
  55. package/lib/locale/lang/fr-FR.min.js +1 -1
  56. package/lib/locale/lang/fr-FR.umd.js +5 -3
  57. package/lib/locale/lang/hu-HU.js +5 -3
  58. package/lib/locale/lang/hu-HU.min.js +1 -1
  59. package/lib/locale/lang/hu-HU.umd.js +5 -3
  60. package/lib/locale/lang/hy-AM.js +5 -3
  61. package/lib/locale/lang/hy-AM.min.js +1 -1
  62. package/lib/locale/lang/hy-AM.umd.js +5 -3
  63. package/lib/locale/lang/id-ID.js +5 -3
  64. package/lib/locale/lang/id-ID.min.js +1 -1
  65. package/lib/locale/lang/id-ID.umd.js +5 -3
  66. package/lib/locale/lang/it-IT.js +5 -3
  67. package/lib/locale/lang/it-IT.min.js +1 -1
  68. package/lib/locale/lang/it-IT.umd.js +5 -3
  69. package/lib/locale/lang/ja-JP.js +5 -3
  70. package/lib/locale/lang/ja-JP.min.js +1 -1
  71. package/lib/locale/lang/ja-JP.umd.js +5 -3
  72. package/lib/locale/lang/ko-KR.js +5 -3
  73. package/lib/locale/lang/ko-KR.min.js +1 -1
  74. package/lib/locale/lang/ko-KR.umd.js +5 -3
  75. package/lib/locale/lang/ms-MY.js +5 -3
  76. package/lib/locale/lang/ms-MY.min.js +1 -1
  77. package/lib/locale/lang/ms-MY.umd.js +5 -3
  78. package/lib/locale/lang/nb-NO.js +5 -3
  79. package/lib/locale/lang/nb-NO.min.js +1 -1
  80. package/lib/locale/lang/nb-NO.umd.js +5 -3
  81. package/lib/locale/lang/pt-BR.js +5 -3
  82. package/lib/locale/lang/pt-BR.min.js +1 -1
  83. package/lib/locale/lang/pt-BR.umd.js +5 -3
  84. package/lib/locale/lang/ru-RU.js +5 -3
  85. package/lib/locale/lang/ru-RU.min.js +1 -1
  86. package/lib/locale/lang/ru-RU.umd.js +5 -3
  87. package/lib/locale/lang/th-TH.js +5 -3
  88. package/lib/locale/lang/th-TH.min.js +1 -1
  89. package/lib/locale/lang/th-TH.umd.js +5 -3
  90. package/lib/locale/lang/ug-CN.js +5 -3
  91. package/lib/locale/lang/ug-CN.min.js +1 -1
  92. package/lib/locale/lang/ug-CN.umd.js +5 -3
  93. package/lib/locale/lang/uk-UA.js +5 -3
  94. package/lib/locale/lang/uk-UA.min.js +1 -1
  95. package/lib/locale/lang/uk-UA.umd.js +5 -3
  96. package/lib/locale/lang/uz-UZ.js +5 -3
  97. package/lib/locale/lang/uz-UZ.min.js +1 -1
  98. package/lib/locale/lang/uz-UZ.umd.js +5 -3
  99. package/lib/locale/lang/vi-VN.js +5 -3
  100. package/lib/locale/lang/vi-VN.min.js +1 -1
  101. package/lib/locale/lang/vi-VN.umd.js +5 -3
  102. package/lib/locale/lang/zh-CHT.js +5 -3
  103. package/lib/locale/lang/zh-CHT.min.js +1 -1
  104. package/lib/locale/lang/zh-CHT.umd.js +5 -3
  105. package/lib/locale/lang/zh-CN.js +5 -3
  106. package/lib/locale/lang/zh-CN.min.js +1 -1
  107. package/lib/locale/lang/zh-CN.umd.js +5 -3
  108. package/lib/style.css +1 -1
  109. package/lib/style.min.css +1 -1
  110. package/lib/table/module/custom/panel.js +26 -14
  111. package/lib/table/module/custom/panel.min.js +1 -1
  112. package/lib/table/src/table.js +5 -5
  113. package/lib/table/src/table.min.js +1 -1
  114. package/lib/table/style/style.css +4 -1
  115. package/lib/table/style/style.min.css +1 -1
  116. package/lib/ui/index.js +2 -1
  117. package/lib/ui/index.min.js +1 -1
  118. package/lib/ui/src/log.js +1 -1
  119. package/lib/ui/src/log.min.js +1 -1
  120. package/lib/vxe-table/style/style.css +4 -1
  121. package/lib/vxe-table/style/style.min.css +1 -1
  122. package/package.json +2 -2
  123. package/packages/locale/lang/ar-EG.ts +5 -3
  124. package/packages/locale/lang/de-DE.ts +5 -3
  125. package/packages/locale/lang/en-US.ts +5 -3
  126. package/packages/locale/lang/es-ES.ts +5 -3
  127. package/packages/locale/lang/fr-FR.ts +5 -3
  128. package/packages/locale/lang/hu-HU.ts +5 -3
  129. package/packages/locale/lang/hy-AM.ts +5 -3
  130. package/packages/locale/lang/id-ID.ts +5 -3
  131. package/packages/locale/lang/it-IT.ts +5 -3
  132. package/packages/locale/lang/ja-JP.ts +5 -3
  133. package/packages/locale/lang/ko-KR.ts +5 -3
  134. package/packages/locale/lang/ms-MY.ts +5 -3
  135. package/packages/locale/lang/nb-NO.ts +5 -3
  136. package/packages/locale/lang/pt-BR.ts +5 -3
  137. package/packages/locale/lang/ru-RU.ts +5 -3
  138. package/packages/locale/lang/th-TH.ts +5 -3
  139. package/packages/locale/lang/ug-CN.ts +5 -3
  140. package/packages/locale/lang/uk-UA.ts +5 -3
  141. package/packages/locale/lang/uz-UZ.ts +5 -3
  142. package/packages/locale/lang/vi-VN.ts +5 -3
  143. package/packages/locale/lang/zh-CHT.ts +5 -3
  144. package/packages/locale/lang/zh-CN.ts +5 -3
  145. package/packages/table/module/custom/panel.ts +66 -50
  146. package/packages/table/src/table.ts +10 -9
  147. package/packages/ui/index.ts +1 -0
  148. package/styles/components/table-module/custom.scss +5 -1
  149. /package/es/{iconfont.1779070669656.ttf → iconfont.1779447258442.ttf} +0 -0
  150. /package/es/{iconfont.1779070669656.woff → iconfont.1779447258442.woff} +0 -0
  151. /package/es/{iconfont.1779070669656.woff2 → iconfont.1779447258442.woff2} +0 -0
  152. /package/lib/{iconfont.1779070669656.ttf → iconfont.1779447258442.ttf} +0 -0
  153. /package/lib/{iconfont.1779070669656.woff → iconfont.1779447258442.woff} +0 -0
  154. /package/lib/{iconfont.1779070669656.woff2 → iconfont.1779447258442.woff2} +0 -0
@@ -34,7 +34,7 @@ export default defineVxeComponent({
34
34
  const VxeUIRadioGroupComponent = VxeUI.getComponent('VxeRadioGroup');
35
35
  const $xeTable = inject('$xeTable', {});
36
36
  const { props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
37
- const { computeSize, computeCustomOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts } = $xeTable.getComputeMaps();
37
+ const { computeSize, computeCustomOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts, computeAggregateOpts } = $xeTable.getComputeMaps();
38
38
  const refElem = ref();
39
39
  const refBodyWrapperElem = ref();
40
40
  const refCustomBodyElem = ref();
@@ -498,7 +498,7 @@ export default defineVxeComponent({
498
498
  };
499
499
  const sortDragoverEvent = (evnt) => {
500
500
  const customOpts = computeCustomOpts.value;
501
- const { immediate } = customOpts;
501
+ const { showSortDragButton, allowSort, immediate } = customOpts;
502
502
  const columnDragOpts = computeColumnDragOpts.value;
503
503
  const { isCrossDrag, isToChildDrag } = columnDragOpts;
504
504
  const optEl = evnt.currentTarget;
@@ -514,9 +514,12 @@ export default defineVxeComponent({
514
514
  const offsetY = evnt.clientY - optEl.getBoundingClientRect().y;
515
515
  const dragPos = offsetY < optEl.clientHeight / 2 ? 'top' : 'bottom';
516
516
  if (!dragCol ||
517
+ !(showSortDragButton && allowSort) ||
517
518
  (dragCol && dragCol.id === column.id) ||
518
519
  (!isCrossDrag && column.level > 1) ||
519
- (!immediate && column.level > 1)) {
520
+ (!immediate && column.level > 1) ||
521
+ (!isCrossDrag && dragCol.level > 1) ||
522
+ (!immediate && dragCol.level > 1)) {
520
523
  showDropTip(evnt, optEl, false, dragPos);
521
524
  return;
522
525
  }
@@ -648,7 +651,7 @@ export default defineVxeComponent({
648
651
  const { immediate } = customOpts;
649
652
  const columnDragOpts = computeColumnDragOpts.value;
650
653
  const { popupStyle } = customStore;
651
- const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
654
+ const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
652
655
  const isMaxFixedColumn = computeIsMaxFixedColumn.value;
653
656
  const vSize = computeSize.value;
654
657
  const { isCrossDrag } = columnDragOpts;
@@ -719,23 +722,25 @@ export default defineVxeComponent({
719
722
  h('div', {
720
723
  class: 'vxe-table-custom--name-option'
721
724
  }, [
722
- allowSort && showSortDragButton && showSortBtn
723
- ? h('div', {
724
- class: 'vxe-table-custom--sort-option'
725
- }, [
726
- h('span', Object.assign({ class: ['vxe-table-custom--sort-btn', {
727
- 'is--disabled': isHidden
728
- }], title: getI18n('vxe.custom.setting.sortHelpTip') }, (isHidden
729
- ? {}
730
- : {
731
- onMousedown: sortMousedownEvent,
732
- onMouseup: sortMouseupEvent
733
- })), [
734
- h('i', {
735
- class: getIcon().TABLE_CUSTOM_SORT
736
- })
725
+ (allowSort && showSortDragButton) || (allowGroup || allowValues)
726
+ ? (showSortBtn || ((allowGroup || allowValues) && !isColGroup)
727
+ ? h('div', {
728
+ class: 'vxe-table-custom--sort-option'
729
+ }, [
730
+ h('span', Object.assign({ class: ['vxe-table-custom--sort-btn', {
731
+ 'is--disabled': isHidden
732
+ }], title: getI18n('vxe.custom.setting.sortHelpTip') }, (isHidden
733
+ ? {}
734
+ : {
735
+ onMousedown: sortMousedownEvent,
736
+ onMouseup: sortMouseupEvent
737
+ })), [
738
+ h('i', {
739
+ class: getIcon().TABLE_CUSTOM_SORT
740
+ })
741
+ ])
737
742
  ])
738
- ])
743
+ : renderEmptyElement($xeTable))
739
744
  : renderEmptyElement($xeTable),
740
745
  column.type === 'html'
741
746
  ? h('div', {
@@ -968,9 +973,10 @@ export default defineVxeComponent({
968
973
  const { treeConfig, rowGroupConfig, aggregateConfig, resizable: allResizable } = tableProps;
969
974
  const { isCustomStatus, customColumnList } = tableReactData;
970
975
  const customOpts = computeCustomOpts.value;
971
- const { immediate, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
972
976
  const columnDragOpts = computeColumnDragOpts.value;
973
- const { mode, modalOptions, drawerOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts;
977
+ const aggregateOpts = computeAggregateOpts.value;
978
+ const { placement: aggPlacement } = aggregateOpts;
979
+ const { mode, immediate, showSortDragButton, showSortMoveButton, showSortPutButton, modalOptions, drawerOptions, allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts;
974
980
  const columnOpts = computeColumnOpts.value;
975
981
  const { maxFixedSize } = columnOpts;
976
982
  const resizableOpts = computeResizableOpts.value;
@@ -988,6 +994,7 @@ export default defineVxeComponent({
988
994
  const trVNs = [];
989
995
  const isAllChecked = customStore.isAll;
990
996
  const isAllIndeterminate = customStore.isIndeterminate;
997
+ const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
991
998
  const params = {
992
999
  $table: $xeTable,
993
1000
  $grid: $xeGrid,
@@ -1064,8 +1071,8 @@ export default defineVxeComponent({
1064
1071
  h('div', {
1065
1072
  class: 'vxe-table-custom-popup--name'
1066
1073
  }, [
1067
- allowSort
1068
- ? showSortDragButton && (showSortBtn
1074
+ (allowSort && showSortDragButton) || (allowGroup || allowValues)
1075
+ ? (showSortBtn || ((allowGroup || allowValues) && !isColGroup)
1069
1076
  ? h('div', Object.assign({ class: ['vxe-table-custom-popup--column-sort-btn', {
1070
1077
  'is--disabled': isHidden
1071
1078
  }], title: getI18n('vxe.custom.setting.sortHelpTip') }, (isHidden
@@ -1204,11 +1211,11 @@ export default defineVxeComponent({
1204
1211
  default: () => {
1205
1212
  return h('div', {
1206
1213
  ref: refBodyWrapperElem,
1207
- class: 'vxe-table-custom-popup--body-wrapper'
1214
+ class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}`]
1208
1215
  }, defaultSlot
1209
1216
  ? $xeTable.callSlot(defaultSlot, params)
1210
1217
  : [
1211
- !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel
1218
+ !isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel
1212
1219
  ? h($xeTable.getPivotTableAggregatePopupPanel(), {
1213
1220
  customStore
1214
1221
  })
@@ -1291,7 +1298,12 @@ export default defineVxeComponent({
1291
1298
  }, $xeTable.callSlot(bottomSlot, params))
1292
1299
  : renderEmptyElement($xeTable),
1293
1300
  renderDragTip()
1294
- ])
1301
+ ]),
1302
+ isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel
1303
+ ? h($xeTable.getPivotTableAggregatePopupPanel(), {
1304
+ customStore
1305
+ })
1306
+ : renderEmptyElement($xeTable)
1295
1307
  ]);
1296
1308
  },
1297
1309
  footer: () => {
@@ -1755,6 +1755,7 @@ export default defineVxeComponent({
1755
1755
  * 计算自适应列宽
1756
1756
  */
1757
1757
  const calcColumnAutoWidth = (column, wrapperEl) => {
1758
+ const { scrollYLoad } = reactData;
1758
1759
  const columnOpts = computeColumnOpts.value;
1759
1760
  const { autoOptions } = columnOpts;
1760
1761
  const { isCalcHeader, isCalcBody, isCalcFooter } = autoOptions || {};
@@ -1775,7 +1776,7 @@ export default defineVxeComponent({
1775
1776
  const cellStyle = getComputedStyle(firstCellEl.parentElement);
1776
1777
  leftRightPadding = Math.ceil(XEUtils.toNumber(cellStyle.paddingLeft) + XEUtils.toNumber(cellStyle.paddingRight));
1777
1778
  }
1778
- let colWidth = column.renderAutoWidth - leftRightPadding;
1779
+ let colWidth = (scrollYLoad ? column.renderAutoWidth : 0) - leftRightPadding;
1779
1780
  for (let i = 0; i < cellElemList.length; i++) {
1780
1781
  const celEl = cellElemList[i];
1781
1782
  colWidth = Math.max(colWidth, celEl ? Math.ceil(celEl.scrollWidth) + 4 : 0);
@@ -4372,7 +4373,7 @@ export default defineVxeComponent({
4372
4373
  });
4373
4374
  }
4374
4375
  });
4375
- }, 200);
4376
+ }, 240);
4376
4377
  };
4377
4378
  const getWheelSpeed = (lastScrollTime) => {
4378
4379
  let multiple = 1;
@@ -12106,7 +12107,7 @@ export default defineVxeComponent({
12106
12107
  return;
12107
12108
  }
12108
12109
  const { highlightHoverRow } = tableProps;
12109
- const { scrollXLoad, scrollYLoad, expandColumn } = reactData;
12110
+ const { scrollXLoad, scrollYLoad, overflowX, overflowY, expandColumn } = reactData;
12110
12111
  const leftFixedWidth = computeLeftFixedWidth.value;
12111
12112
  const rightFixedWidth = computeRightFixedWidth.value;
12112
12113
  const { elemStore, lastScrollTop, lastScrollLeft } = internalData;
@@ -12129,10 +12130,10 @@ export default defineVxeComponent({
12129
12130
  const deltaLeft = (shiftKey ? (deltaX || deltaY) : deltaX) * wheelSpeed;
12130
12131
  const currScrollTop = bodyScrollElem.scrollTop;
12131
12132
  const currScrollLeft = bodyScrollElem.scrollLeft;
12132
- const scrollTop = currScrollTop + deltaTop;
12133
- const scrollLeft = currScrollLeft + deltaLeft;
12134
- const isRollX = scrollLeft !== lastScrollLeft;
12135
- const isRollY = scrollTop !== lastScrollTop;
12133
+ const scrollTop = Math.max(0, currScrollTop + deltaTop);
12134
+ const scrollLeft = Math.max(0, currScrollLeft + deltaLeft);
12135
+ const isRollX = overflowX && scrollLeft !== lastScrollLeft;
12136
+ const isRollY = overflowY && scrollTop !== lastScrollTop;
12136
12137
  if (isRollX) {
12137
12138
  // 如果禁用滚动
12138
12139
  if (scrollbarXOpts.visible === 'hidden') {
@@ -12167,7 +12168,7 @@ export default defineVxeComponent({
12167
12168
  }
12168
12169
  }
12169
12170
  }
12170
- if (!(leftFixedWidth || rightFixedWidth || expandColumn)) {
12171
+ if (!(isRollX || leftFixedWidth || rightFixedWidth || expandColumn)) {
12171
12172
  return;
12172
12173
  }
12173
12174
  if (rowOpts.isHover || highlightHoverRow) {
@@ -13885,7 +13886,7 @@ export default defineVxeComponent({
13885
13886
  warnLog('vxe.error.errConflicts', ['mouse-config.area', 'mouse-config.selected']);
13886
13887
  }
13887
13888
  if (mouseOpts.area && (props.treeConfig && !treeOpts.transform)) {
13888
- errLog('vxe.error.noTree', ['mouse-config.area']);
13889
+ errLog('vxe.error.notSupportProp', ['mouse-config.area', 'tree-config.transform=false', 'tree-config.transform=true']);
13889
13890
  }
13890
13891
  if (props.editConfig && editOpts.activeMethod) {
13891
13892
  warnLog('vxe.error.delProp', ['edit-config.activeMethod', 'edit-config.beforeEditMethod']);
@@ -1006,11 +1006,14 @@
1006
1006
  .vxe-table-custom-popup--body-wrapper {
1007
1007
  position: relative;
1008
1008
  display: flex;
1009
- flex-direction: column;
1009
+ flex-direction: row;
1010
1010
  overflow: hidden;
1011
1011
  height: 100%;
1012
1012
  outline: 0;
1013
1013
  }
1014
+ .vxe-table-custom-popup--body-wrapper.agg-layout--top, .vxe-table-custom-popup--body-wrapper.agg-layout--bottom {
1015
+ flex-direction: column;
1016
+ }
1014
1017
 
1015
1018
  .vxe-table-custom-popup--handle-wrapper {
1016
1019
  flex-grow: 1;