vxe-table 3.21.0 → 3.21.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 (151) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/locale/lang/ar-EG.js +4 -2
  4. package/es/locale/lang/de-DE.js +4 -2
  5. package/es/locale/lang/en-US.js +4 -2
  6. package/es/locale/lang/es-ES.js +4 -2
  7. package/es/locale/lang/fr-FR.js +4 -2
  8. package/es/locale/lang/hu-HU.js +4 -2
  9. package/es/locale/lang/hy-AM.js +4 -2
  10. package/es/locale/lang/id-ID.js +4 -2
  11. package/es/locale/lang/it-IT.js +4 -2
  12. package/es/locale/lang/ja-JP.js +4 -2
  13. package/es/locale/lang/ko-KR.js +4 -2
  14. package/es/locale/lang/ms-MY.js +4 -2
  15. package/es/locale/lang/nb-NO.js +4 -2
  16. package/es/locale/lang/pt-BR.js +4 -2
  17. package/es/locale/lang/ru-RU.js +4 -2
  18. package/es/locale/lang/th-TH.js +4 -2
  19. package/es/locale/lang/ug-CN.js +4 -2
  20. package/es/locale/lang/uk-UA.js +4 -2
  21. package/es/locale/lang/uz-UZ.js +4 -2
  22. package/es/locale/lang/vi-VN.js +4 -2
  23. package/es/locale/lang/zh-CHT.js +4 -2
  24. package/es/locale/lang/zh-CN.js +4 -2
  25. package/es/style.css +1 -1
  26. package/es/style.min.css +1 -1
  27. package/es/table/module/custom/panel.js +45 -31
  28. package/es/table/src/table.js +1 -1
  29. package/es/table/style.css +4 -1
  30. package/es/table/style.min.css +1 -1
  31. package/es/ui/index.js +2 -1
  32. package/es/ui/src/log.js +1 -1
  33. package/es/vxe-table/style.css +4 -1
  34. package/es/vxe-table/style.min.css +1 -1
  35. package/lib/index.css +1 -1
  36. package/lib/index.min.css +1 -1
  37. package/lib/index.umd.js +34 -18
  38. package/lib/index.umd.min.js +1 -1
  39. package/lib/locale/lang/ar-EG.js +4 -2
  40. package/lib/locale/lang/ar-EG.min.js +1 -1
  41. package/lib/locale/lang/ar-EG.umd.js +4 -2
  42. package/lib/locale/lang/de-DE.js +4 -2
  43. package/lib/locale/lang/de-DE.min.js +1 -1
  44. package/lib/locale/lang/de-DE.umd.js +4 -2
  45. package/lib/locale/lang/en-US.js +4 -2
  46. package/lib/locale/lang/en-US.min.js +1 -1
  47. package/lib/locale/lang/en-US.umd.js +4 -2
  48. package/lib/locale/lang/es-ES.js +4 -2
  49. package/lib/locale/lang/es-ES.min.js +1 -1
  50. package/lib/locale/lang/es-ES.umd.js +4 -2
  51. package/lib/locale/lang/fr-FR.js +4 -2
  52. package/lib/locale/lang/fr-FR.min.js +1 -1
  53. package/lib/locale/lang/fr-FR.umd.js +4 -2
  54. package/lib/locale/lang/hu-HU.js +4 -2
  55. package/lib/locale/lang/hu-HU.min.js +1 -1
  56. package/lib/locale/lang/hu-HU.umd.js +4 -2
  57. package/lib/locale/lang/hy-AM.js +4 -2
  58. package/lib/locale/lang/hy-AM.min.js +1 -1
  59. package/lib/locale/lang/hy-AM.umd.js +4 -2
  60. package/lib/locale/lang/id-ID.js +4 -2
  61. package/lib/locale/lang/id-ID.min.js +1 -1
  62. package/lib/locale/lang/id-ID.umd.js +4 -2
  63. package/lib/locale/lang/it-IT.js +4 -2
  64. package/lib/locale/lang/it-IT.min.js +1 -1
  65. package/lib/locale/lang/it-IT.umd.js +4 -2
  66. package/lib/locale/lang/ja-JP.js +4 -2
  67. package/lib/locale/lang/ja-JP.min.js +1 -1
  68. package/lib/locale/lang/ja-JP.umd.js +4 -2
  69. package/lib/locale/lang/ko-KR.js +4 -2
  70. package/lib/locale/lang/ko-KR.min.js +1 -1
  71. package/lib/locale/lang/ko-KR.umd.js +4 -2
  72. package/lib/locale/lang/ms-MY.js +4 -2
  73. package/lib/locale/lang/ms-MY.min.js +1 -1
  74. package/lib/locale/lang/ms-MY.umd.js +4 -2
  75. package/lib/locale/lang/nb-NO.js +4 -2
  76. package/lib/locale/lang/nb-NO.min.js +1 -1
  77. package/lib/locale/lang/nb-NO.umd.js +4 -2
  78. package/lib/locale/lang/pt-BR.js +4 -2
  79. package/lib/locale/lang/pt-BR.min.js +1 -1
  80. package/lib/locale/lang/pt-BR.umd.js +4 -2
  81. package/lib/locale/lang/ru-RU.js +4 -2
  82. package/lib/locale/lang/ru-RU.min.js +1 -1
  83. package/lib/locale/lang/ru-RU.umd.js +4 -2
  84. package/lib/locale/lang/th-TH.js +4 -2
  85. package/lib/locale/lang/th-TH.min.js +1 -1
  86. package/lib/locale/lang/th-TH.umd.js +4 -2
  87. package/lib/locale/lang/ug-CN.js +4 -2
  88. package/lib/locale/lang/ug-CN.min.js +1 -1
  89. package/lib/locale/lang/ug-CN.umd.js +4 -2
  90. package/lib/locale/lang/uk-UA.js +4 -2
  91. package/lib/locale/lang/uk-UA.min.js +1 -1
  92. package/lib/locale/lang/uk-UA.umd.js +4 -2
  93. package/lib/locale/lang/uz-UZ.js +4 -2
  94. package/lib/locale/lang/uz-UZ.min.js +1 -1
  95. package/lib/locale/lang/uz-UZ.umd.js +4 -2
  96. package/lib/locale/lang/vi-VN.js +4 -2
  97. package/lib/locale/lang/vi-VN.min.js +1 -1
  98. package/lib/locale/lang/vi-VN.umd.js +4 -2
  99. package/lib/locale/lang/zh-CHT.js +4 -2
  100. package/lib/locale/lang/zh-CHT.min.js +1 -1
  101. package/lib/locale/lang/zh-CHT.umd.js +4 -2
  102. package/lib/locale/lang/zh-CN.js +4 -2
  103. package/lib/locale/lang/zh-CN.min.js +1 -1
  104. package/lib/locale/lang/zh-CN.umd.js +4 -2
  105. package/lib/style.css +1 -1
  106. package/lib/style.min.css +1 -1
  107. package/lib/table/module/custom/panel.js +26 -13
  108. package/lib/table/module/custom/panel.min.js +1 -1
  109. package/lib/table/src/table.js +1 -1
  110. package/lib/table/src/table.min.js +1 -1
  111. package/lib/table/style/style.css +4 -1
  112. package/lib/table/style/style.min.css +1 -1
  113. package/lib/ui/index.js +2 -1
  114. package/lib/ui/index.min.js +1 -1
  115. package/lib/ui/src/log.js +1 -1
  116. package/lib/ui/src/log.min.js +1 -1
  117. package/lib/vxe-table/style/style.css +4 -1
  118. package/lib/vxe-table/style/style.min.css +1 -1
  119. package/package.json +2 -2
  120. package/packages/locale/lang/ar-EG.ts +4 -2
  121. package/packages/locale/lang/de-DE.ts +4 -2
  122. package/packages/locale/lang/en-US.ts +4 -2
  123. package/packages/locale/lang/es-ES.ts +4 -2
  124. package/packages/locale/lang/fr-FR.ts +4 -2
  125. package/packages/locale/lang/hu-HU.ts +4 -2
  126. package/packages/locale/lang/hy-AM.ts +4 -2
  127. package/packages/locale/lang/id-ID.ts +4 -2
  128. package/packages/locale/lang/it-IT.ts +4 -2
  129. package/packages/locale/lang/ja-JP.ts +4 -2
  130. package/packages/locale/lang/ko-KR.ts +4 -2
  131. package/packages/locale/lang/ms-MY.ts +4 -2
  132. package/packages/locale/lang/nb-NO.ts +4 -2
  133. package/packages/locale/lang/pt-BR.ts +4 -2
  134. package/packages/locale/lang/ru-RU.ts +4 -2
  135. package/packages/locale/lang/th-TH.ts +4 -2
  136. package/packages/locale/lang/ug-CN.ts +4 -2
  137. package/packages/locale/lang/uk-UA.ts +4 -2
  138. package/packages/locale/lang/uz-UZ.ts +4 -2
  139. package/packages/locale/lang/vi-VN.ts +4 -2
  140. package/packages/locale/lang/zh-CHT.ts +4 -2
  141. package/packages/locale/lang/zh-CN.ts +4 -2
  142. package/packages/table/module/custom/panel.ts +71 -53
  143. package/packages/table/src/table.ts +1 -1
  144. package/packages/ui/index.ts +1 -0
  145. package/styles/components/table-module/custom.scss +5 -1
  146. /package/es/{iconfont.1779330830416.ttf → iconfont.1779447236462.ttf} +0 -0
  147. /package/es/{iconfont.1779330830416.woff → iconfont.1779447236462.woff} +0 -0
  148. /package/es/{iconfont.1779330830416.woff2 → iconfont.1779447236462.woff2} +0 -0
  149. /package/lib/{iconfont.1779330830416.ttf → iconfont.1779447236462.ttf} +0 -0
  150. /package/lib/{iconfont.1779330830416.woff → iconfont.1779447236462.woff} +0 -0
  151. /package/lib/{iconfont.1779330830416.woff2 → iconfont.1779447236462.woff2} +0 -0
@@ -614,7 +614,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
614
614
 
615
615
  const { dragCol } = customPanelReactData
616
616
  const customOpts = $xeTable.computeCustomOpts
617
- const { immediate } = customOpts
617
+ const { showSortDragButton, allowSort, immediate } = customOpts
618
618
  const columnDragOpts = $xeTable.computeColumnDragOpts
619
619
  const { isCrossDrag, isToChildDrag } = columnDragOpts
620
620
  const optEl = evnt.currentTarget as HTMLElement
@@ -630,9 +630,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
630
630
  const dragPos = offsetY < optEl.clientHeight / 2 ? 'top' : 'bottom'
631
631
  if (
632
632
  !dragCol ||
633
+ !(showSortDragButton && allowSort) ||
633
634
  (dragCol && dragCol.id === column.id) ||
634
635
  (!isCrossDrag && column.level > 1) ||
635
- (!immediate && column.level > 1)
636
+ (!immediate && column.level > 1) ||
637
+ (!isCrossDrag && dragCol.level > 1) ||
638
+ (!immediate && dragCol.level > 1)
636
639
  ) {
637
640
  showDropTip($xeTableCustomPanel, evnt, optEl, false, dragPos)
638
641
  return
@@ -799,7 +802,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
799
802
  const { immediate } = customOpts
800
803
  const columnDragOpts = $xeTable.computeColumnDragOpts
801
804
  const { popupStyle } = customStore
802
- const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts
805
+ const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts
803
806
  const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn
804
807
  const vSize = $xeTable.computeSize
805
808
  const { isCrossDrag } = columnDragOpts
@@ -879,29 +882,33 @@ export default /* define-vxe-component start */ defineVxeComponent({
879
882
  h('div', {
880
883
  class: 'vxe-table-custom--name-option'
881
884
  }, [
882
- allowSort && showSortDragButton && showSortBtn
883
- ? h('div', {
884
- class: 'vxe-table-custom--sort-option'
885
- }, [
886
- h('span', {
887
- class: ['vxe-table-custom--sort-btn', {
888
- 'is--disabled': isHidden
889
- }],
890
- attrs: {
891
- title: getI18n('vxe.custom.setting.sortHelpTip')
892
- },
893
- on: isHidden
894
- ? {}
895
- : {
896
- mousedown: $xeTableCustomPanel.sortMousedownEvent,
897
- mouseup: $xeTableCustomPanel.sortMouseupEvent
898
- }
899
- }, [
900
- h('i', {
901
- class: getIcon().TABLE_CUSTOM_SORT
902
- })
903
- ])
904
- ])
885
+ (allowSort && showSortDragButton) || (allowGroup || allowValues)
886
+ ? (
887
+ showSortBtn || ((allowGroup || allowValues) && !isColGroup)
888
+ ? h('div', {
889
+ class: 'vxe-table-custom--sort-option'
890
+ }, [
891
+ h('span', {
892
+ class: ['vxe-table-custom--sort-btn', {
893
+ 'is--disabled': isHidden
894
+ }],
895
+ attrs: {
896
+ title: getI18n('vxe.custom.setting.sortHelpTip')
897
+ },
898
+ on: isHidden
899
+ ? {}
900
+ : {
901
+ mousedown: $xeTableCustomPanel.sortMousedownEvent,
902
+ mouseup: $xeTableCustomPanel.sortMouseupEvent
903
+ }
904
+ }, [
905
+ h('i', {
906
+ class: getIcon().TABLE_CUSTOM_SORT
907
+ })
908
+ ])
909
+ ])
910
+ : renderEmptyElement($xeTable)
911
+ )
905
912
  : renderEmptyElement($xeTable),
906
913
  column.type === 'html'
907
914
  ? h('div', {
@@ -1190,9 +1197,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
1190
1197
  const { treeConfig, rowGroupConfig, aggregateConfig, resizable: allResizable } = tableProps
1191
1198
  const { isCustomStatus, customColumnList } = tableReactData
1192
1199
  const customOpts = $xeTable.computeCustomOpts
1193
- const { immediate, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts
1194
1200
  const columnDragOpts = $xeTable.computeColumnDragOpts
1195
- const { mode, modalOptions, drawerOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts
1201
+ const aggregateOpts = $xeTable.computeAggregateOpts
1202
+ const { placement: aggPlacement } = aggregateOpts
1203
+ const { mode, immediate, showSortDragButton, showSortMoveButton, showSortPutButton, modalOptions, drawerOptions, allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts
1196
1204
  const columnOpts = $xeTable.computeColumnOpts
1197
1205
  const { maxFixedSize } = columnOpts
1198
1206
  const resizableOpts = $xeTable.computeResizableOpts
@@ -1210,6 +1218,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
1210
1218
  const trVNs: VNode[] = []
1211
1219
  const isAllChecked = customStore.isAll
1212
1220
  const isAllIndeterminate = customStore.isIndeterminate
1221
+ const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom'
1213
1222
  const params = {
1214
1223
  $table: $xeTable,
1215
1224
  $grid: $xeGrid,
@@ -1296,29 +1305,31 @@ export default /* define-vxe-component start */ defineVxeComponent({
1296
1305
  h('div', {
1297
1306
  class: 'vxe-table-custom-popup--name'
1298
1307
  }, [
1299
- allowSort
1300
- ? showSortDragButton && (showSortBtn
1301
- ? h('div', {
1302
- class: ['vxe-table-custom-popup--column-sort-btn', {
1303
- 'is--disabled': isHidden
1304
- }],
1305
- attrs: {
1306
- title: getI18n('vxe.custom.setting.sortHelpTip')
1307
- },
1308
- on: (isHidden
1309
- ? {}
1310
- : {
1311
- mousedown: $xeTableCustomPanel.sortMousedownEvent,
1312
- mouseup: $xeTableCustomPanel.sortMouseupEvent
1308
+ (allowSort && showSortDragButton) || (allowGroup || allowValues)
1309
+ ? (
1310
+ showSortBtn || ((allowGroup || allowValues) && !isColGroup)
1311
+ ? h('div', {
1312
+ class: ['vxe-table-custom-popup--column-sort-btn', {
1313
+ 'is--disabled': isHidden
1314
+ }],
1315
+ attrs: {
1316
+ title: getI18n('vxe.custom.setting.sortHelpTip')
1317
+ },
1318
+ on: (isHidden
1319
+ ? {}
1320
+ : {
1321
+ mousedown: $xeTableCustomPanel.sortMousedownEvent,
1322
+ mouseup: $xeTableCustomPanel.sortMouseupEvent
1323
+ })
1324
+ }, [
1325
+ h('i', {
1326
+ class: getIcon().TABLE_CUSTOM_SORT
1313
1327
  })
1314
- }, [
1315
- h('i', {
1316
- class: getIcon().TABLE_CUSTOM_SORT
1317
- })
1318
- ])
1319
- : h('div', {
1320
- class: 'vxe-table-custom-popup--column-sort-placeholder'
1321
- }))
1328
+ ])
1329
+ : h('div', {
1330
+ class: 'vxe-table-custom-popup--column-sort-placeholder'
1331
+ })
1332
+ )
1322
1333
  : renderEmptyElement($xeTable),
1323
1334
  column.type === 'html'
1324
1335
  ? h('div', {
@@ -1471,11 +1482,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
1471
1482
  default: () => {
1472
1483
  return h('div', {
1473
1484
  ref: 'refBodyWrapperElem',
1474
- class: 'vxe-table-custom-popup--body-wrapper'
1485
+ class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}`]
1475
1486
  }, defaultSlot
1476
1487
  ? $xeTable.callSlot(defaultSlot, params, h)
1477
1488
  : [
1478
- !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel
1489
+ !isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel
1479
1490
  ? h($xeTable.getPivotTableAggregatePopupPanel(), {
1480
1491
  props: {
1481
1492
  customStore
@@ -1565,7 +1576,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
1565
1576
  }, $xeTable.callSlot(bottomSlot, params, h))
1566
1577
  : renderEmptyElement($xeTable),
1567
1578
  $xeTableCustomPanel.renderDragTip(h)
1568
- ])
1579
+ ]),
1580
+ isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel
1581
+ ? h($xeTable.getPivotTableAggregatePopupPanel(), {
1582
+ props: {
1583
+ customStore
1584
+ }
1585
+ })
1586
+ : renderEmptyElement($xeTable)
1569
1587
  ])
1570
1588
  },
1571
1589
  footer: () => {
@@ -1839,7 +1839,7 @@ export default {
1839
1839
  warnLog('vxe.error.errConflicts', ['mouse-config.area', 'mouse-config.selected'])
1840
1840
  }
1841
1841
  if (mouseOpts.area && (props.treeConfig && !treeOpts.transform)) {
1842
- errLog('vxe.error.noTree', ['mouse-config.area'])
1842
+ errLog('vxe.error.notSupportProp', ['mouse-config.area', 'tree-config.transform=false', 'tree-config.transform=true'])
1843
1843
  }
1844
1844
  if (props.editConfig && editOpts.activeMethod) {
1845
1845
  warnLog('vxe.error.delProp', ['table.edit-config.activeMethod', 'table.edit-config.beforeEditMethod'])
@@ -171,6 +171,7 @@ VxeUI.setConfig({
171
171
  },
172
172
  aggregateConfig: {
173
173
  padding: true,
174
+ placement: 'left',
174
175
  rowField: 'id',
175
176
  parentField: '_X_ROW_PARENT_KEY',
176
177
  childrenField: '_X_ROW_CHILDREN',
@@ -225,10 +225,14 @@
225
225
  .vxe-table-custom-popup--body-wrapper {
226
226
  position: relative;
227
227
  display: flex;
228
- flex-direction: column;
228
+ flex-direction: row;
229
229
  overflow: hidden;
230
230
  height: 100%;
231
231
  outline: 0;
232
+ &.agg-layout--top,
233
+ &.agg-layout--bottom {
234
+ flex-direction: column;
235
+ }
232
236
  }
233
237
  .vxe-table-custom-popup--handle-wrapper {
234
238
  flex-grow: 1;