vxe-table 4.14.0-beta.0 → 4.14.0-beta.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.
Files changed (81) hide show
  1. package/README.en.md +2 -1
  2. package/README.ja-JP.md +2 -1
  3. package/README.md +4 -2
  4. package/README.zh-TW.md +2 -1
  5. package/es/grid/src/grid.js +127 -94
  6. package/es/index.css +1 -1
  7. package/es/index.min.css +1 -1
  8. package/es/style.css +1 -1
  9. package/es/style.min.css +1 -1
  10. package/es/table/module/custom/hook.js +0 -4
  11. package/es/table/module/custom/panel.js +0 -1
  12. package/es/table/module/keyboard/hook.js +2 -2
  13. package/es/table/src/anime.js +46 -0
  14. package/es/table/src/body.js +9 -24
  15. package/es/table/src/columnInfo.js +5 -0
  16. package/es/table/src/footer.js +5 -22
  17. package/es/table/src/header.js +4 -21
  18. package/es/table/src/table.js +562 -358
  19. package/es/table/src/util.js +1 -1
  20. package/es/table/style.css +8 -8
  21. package/es/table/style.min.css +1 -1
  22. package/es/ui/index.js +3 -2
  23. package/es/ui/src/log.js +1 -1
  24. package/es/vxe-table/style.css +8 -8
  25. package/es/vxe-table/style.min.css +1 -1
  26. package/lib/grid/src/grid.js +143 -98
  27. package/lib/grid/src/grid.min.js +1 -1
  28. package/lib/index.css +1 -1
  29. package/lib/index.min.css +1 -1
  30. package/lib/index.umd.js +255 -208
  31. package/lib/index.umd.min.js +1 -1
  32. package/lib/style.css +1 -1
  33. package/lib/style.min.css +1 -1
  34. package/lib/table/module/custom/hook.js +0 -4
  35. package/lib/table/module/custom/hook.min.js +1 -1
  36. package/lib/table/module/custom/panel.js +0 -1
  37. package/lib/table/module/custom/panel.min.js +1 -1
  38. package/lib/table/module/keyboard/hook.js +2 -2
  39. package/lib/table/module/keyboard/hook.min.js +1 -1
  40. package/lib/table/src/anime.js +56 -0
  41. package/lib/table/src/anime.min.js +1 -0
  42. package/lib/table/src/body.js +3 -26
  43. package/lib/table/src/body.min.js +1 -1
  44. package/lib/table/src/columnInfo.js +5 -0
  45. package/lib/table/src/columnInfo.min.js +1 -1
  46. package/lib/table/src/footer.js +2 -20
  47. package/lib/table/src/footer.min.js +1 -1
  48. package/lib/table/src/header.js +2 -19
  49. package/lib/table/src/header.min.js +1 -1
  50. package/lib/table/src/table.js +47 -34
  51. package/lib/table/src/table.min.js +1 -1
  52. package/lib/table/src/util.js +2 -2
  53. package/lib/table/src/util.min.js +1 -1
  54. package/lib/table/style/style.css +8 -8
  55. package/lib/table/style/style.min.css +1 -1
  56. package/lib/ui/index.js +3 -2
  57. package/lib/ui/index.min.js +1 -1
  58. package/lib/ui/src/log.js +1 -1
  59. package/lib/ui/src/log.min.js +1 -1
  60. package/lib/vxe-table/style/style.css +8 -8
  61. package/lib/vxe-table/style/style.min.css +1 -1
  62. package/package.json +1 -1
  63. package/packages/grid/src/grid.ts +136 -101
  64. package/packages/table/module/custom/hook.ts +0 -4
  65. package/packages/table/module/custom/panel.ts +0 -1
  66. package/packages/table/module/keyboard/hook.ts +2 -2
  67. package/packages/table/src/anime.ts +52 -0
  68. package/packages/table/src/body.ts +15 -38
  69. package/packages/table/src/columnInfo.ts +5 -0
  70. package/packages/table/src/footer.ts +5 -22
  71. package/packages/table/src/header.ts +4 -21
  72. package/packages/table/src/table.ts +570 -361
  73. package/packages/table/src/util.ts +1 -1
  74. package/packages/ui/index.ts +2 -1
  75. package/styles/components/table.scss +9 -9
  76. /package/es/{iconfont.1750770364548.ttf → iconfont.1751195167653.ttf} +0 -0
  77. /package/es/{iconfont.1750770364548.woff → iconfont.1751195167653.woff} +0 -0
  78. /package/es/{iconfont.1750770364548.woff2 → iconfont.1751195167653.woff2} +0 -0
  79. /package/lib/{iconfont.1750770364548.ttf → iconfont.1751195167653.ttf} +0 -0
  80. /package/lib/{iconfont.1750770364548.woff → iconfont.1751195167653.woff} +0 -0
  81. /package/lib/{iconfont.1750770364548.woff2 → iconfont.1751195167653.woff2} +0 -0
@@ -47,6 +47,11 @@ export class ColumnInfo {
47
47
  }
48
48
  }
49
49
  }
50
+ if (_vm.aggFunc) {
51
+ if (!$xeTable.handlePivotTableAggregateData && _vm.aggFunc !== true) {
52
+ errLog('vxe.error.errProp', [`column.agg-func=${_vm.aggFunc}`, 'column.agg-func=true'])
53
+ }
54
+ }
50
55
 
51
56
  Object.assign(this, {
52
57
  // 基本属性
@@ -1,9 +1,9 @@
1
- import { TransitionGroup, h, ref, Ref, PropType, inject, nextTick, onMounted, onUnmounted } from 'vue'
1
+ import { h, ref, Ref, PropType, inject, nextTick, onMounted, onUnmounted } from 'vue'
2
2
  import { defineVxeComponent } from '../../ui/src/comp'
3
3
  import XEUtils from 'xe-utils'
4
4
  import { VxeUI } from '../../ui'
5
5
  import { updateCellTitle, getPropClass } from '../../ui/src/dom'
6
- import { getCellHeight } from './util'
6
+ import { getCalcHeight } from './util'
7
7
 
8
8
  import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeTableDefines } from '../../../types'
9
9
 
@@ -35,7 +35,7 @@ export default defineVxeComponent({
35
35
  const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
36
36
 
37
37
  const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable
38
- const { computeTooltipOpts, computeColumnOpts, computeColumnDragOpts, computeCellOpts, computeFooterCellOpts, computeDefaultRowHeight, computeResizableOpts, computeVirtualXOpts } = $xeTable.getComputeMaps()
38
+ const { computeTooltipOpts, computeColumnOpts, computeCellOpts, computeFooterCellOpts, computeDefaultRowHeight, computeResizableOpts, computeVirtualXOpts } = $xeTable.getComputeMaps()
39
39
 
40
40
  const refElem = ref() as Ref<HTMLDivElement>
41
41
  const refFooterScroll = ref() as Ref<HTMLDivElement>
@@ -59,7 +59,7 @@ export default defineVxeComponent({
59
59
  const defaultRowHeight = computeDefaultRowHeight.value
60
60
  const cellOpts = computeCellOpts.value
61
61
  const footerCellOpts = computeFooterCellOpts.value
62
- const currCellHeight = getCellHeight(footerCellOpts.height) || defaultRowHeight
62
+ const currCellHeight = getCalcHeight(footerCellOpts.height) || defaultRowHeight
63
63
 
64
64
  return tableColumn.map((column, $columnIndex) => {
65
65
  const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column
@@ -173,7 +173,7 @@ export default defineVxeComponent({
173
173
  }
174
174
 
175
175
  return h('td', {
176
- class: ['vxe-footer--column', column.id, {
176
+ class: ['vxe-table--column vxe-footer--column', column.id, {
177
177
  [`col--${footAlign}`]: footAlign,
178
178
  [`col--${type}`]: type,
179
179
  'col--last': isLastColumn,
@@ -222,28 +222,11 @@ export default defineVxeComponent({
222
222
  const renderHeads = (isOptimizeMode: boolean, renderColumnList: VxeTableDefines.ColumnInfo[]) => {
223
223
  const { fixedType, footerTableData } = props
224
224
  const { footerRowClassName, footerRowStyle } = tableProps
225
- const { isColLoading, isDragColMove } = tableReactData
226
- const columnOpts = computeColumnOpts.value
227
- const columnDragOpts = computeColumnDragOpts.value
228
225
 
229
226
  return footerTableData.map((row, $rowIndex) => {
230
227
  const _rowIndex = $rowIndex
231
228
  const rowParams = { $table: $xeTable, row, _rowIndex, $rowIndex, fixed: fixedType, type: renderType }
232
229
 
233
- if (!isColLoading && columnOpts.drag && columnDragOpts.animation) {
234
- return h(TransitionGroup, {
235
- key: $rowIndex,
236
- name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
237
- tag: 'tr',
238
- class: [
239
- 'vxe-footer--row',
240
- footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''
241
- ],
242
- style: footerRowStyle ? (XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle) : null
243
- }, {
244
- default: () => renderRows(isOptimizeMode, renderColumnList, footerTableData, row, $rowIndex, _rowIndex)
245
- })
246
- }
247
230
  return h('tr', {
248
231
  key: $rowIndex,
249
232
  class: [
@@ -1,8 +1,8 @@
1
- import { TransitionGroup, h, ref, Ref, PropType, inject, nextTick, watch, onMounted, onUnmounted } from 'vue'
1
+ import { h, ref, Ref, PropType, inject, nextTick, watch, onMounted, onUnmounted } from 'vue'
2
2
  import { defineVxeComponent } from '../../ui/src/comp'
3
3
  import XEUtils from 'xe-utils'
4
4
  import { VxeUI } from '../../ui'
5
- import { getCellHeight, convertHeaderColumnToRows } from './util'
5
+ import { getCalcHeight, convertHeaderColumnToRows } from './util'
6
6
 
7
7
  import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeTableDefines, VxeColumnPropTypes } from '../../../types'
8
8
 
@@ -56,7 +56,7 @@ export default defineVxeComponent({
56
56
  const cellOpts = computeCellOpts.value
57
57
  const defaultRowHeight = computeDefaultRowHeight.value
58
58
  const headerCellOpts = computeHeaderCellOpts.value
59
- const currCellHeight = getCellHeight(headerCellOpts.height) || defaultRowHeight
59
+ const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight
60
60
  const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts
61
61
 
62
62
  return cols.map((column, $columnIndex) => {
@@ -146,7 +146,7 @@ export default defineVxeComponent({
146
146
  }
147
147
 
148
148
  return h('th', {
149
- class: ['vxe-header--column', colid, {
149
+ class: ['vxe-table--column vxe-header--column', colid, {
150
150
  [`col--${headAlign}`]: headAlign,
151
151
  [`col--${type}`]: type,
152
152
  'col--last': isLastColumn,
@@ -203,27 +203,10 @@ export default defineVxeComponent({
203
203
  const renderHeads = (isGroup: boolean, isOptimizeMode: boolean, headerGroups: VxeTableDefines.ColumnInfo[][]) => {
204
204
  const { fixedType } = props
205
205
  const { headerRowClassName, headerRowStyle } = tableProps
206
- const { isColLoading, isDragColMove } = tableReactData
207
- const columnOpts = computeColumnOpts.value
208
- const columnDragOpts = computeColumnDragOpts.value
209
206
 
210
207
  return headerGroups.map((cols, $rowIndex) => {
211
208
  const params = { $table: $xeTable, $rowIndex, fixed: fixedType, type: renderType }
212
209
 
213
- if (!isColLoading && columnOpts.drag && columnDragOpts.animation) {
214
- return h(TransitionGroup, {
215
- key: $rowIndex,
216
- name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
217
- tag: 'tr',
218
- class: [
219
- 'vxe-header--row',
220
- headerRowClassName ? (XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName) : ''
221
- ],
222
- style: headerRowStyle ? (XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle) : null
223
- }, {
224
- default: () => renderRows(isGroup, isOptimizeMode, cols, $rowIndex)
225
- })
226
- }
227
210
  return h('tr', {
228
211
  key: $rowIndex,
229
212
  class: [