vxe-table 4.21.0 → 4.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 (43) hide show
  1. package/dist/all.esm.js +11 -10
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/index.css +1 -1
  5. package/es/index.min.css +1 -1
  6. package/es/style.css +1 -1
  7. package/es/style.min.css +1 -1
  8. package/es/table/src/table.js +7 -6
  9. package/es/table/src/util.js +2 -2
  10. package/es/table/style.css +3 -1
  11. package/es/table/style.min.css +1 -1
  12. package/es/ui/index.js +1 -1
  13. package/es/ui/src/log.js +1 -1
  14. package/es/vxe-table/style.css +3 -1
  15. package/es/vxe-table/style.min.css +1 -1
  16. package/lib/index.css +1 -1
  17. package/lib/index.min.css +1 -1
  18. package/lib/index.umd.js +9 -9
  19. package/lib/index.umd.min.js +1 -1
  20. package/lib/style.css +1 -1
  21. package/lib/style.min.css +1 -1
  22. package/lib/table/src/table.js +5 -5
  23. package/lib/table/src/table.min.js +1 -1
  24. package/lib/table/src/util.js +2 -2
  25. package/lib/table/src/util.min.js +1 -1
  26. package/lib/table/style/style.css +3 -1
  27. package/lib/table/style/style.min.css +1 -1
  28. package/lib/ui/index.js +1 -1
  29. package/lib/ui/index.min.js +1 -1
  30. package/lib/ui/src/log.js +1 -1
  31. package/lib/ui/src/log.min.js +1 -1
  32. package/lib/vxe-table/style/style.css +3 -1
  33. package/lib/vxe-table/style/style.min.css +1 -1
  34. package/package.json +1 -1
  35. package/packages/table/src/table.ts +7 -6
  36. package/packages/table/src/util.ts +2 -2
  37. package/styles/components/table.scss +3 -1
  38. /package/es/{iconfont.1787473169817.ttf → iconfont.1787542597284.ttf} +0 -0
  39. /package/es/{iconfont.1787473169817.woff → iconfont.1787542597284.woff} +0 -0
  40. /package/es/{iconfont.1787473169817.woff2 → iconfont.1787542597284.woff2} +0 -0
  41. /package/lib/{iconfont.1787473169817.ttf → iconfont.1787542597284.ttf} +0 -0
  42. /package/lib/{iconfont.1787473169817.woff → iconfont.1787542597284.woff} +0 -0
  43. /package/lib/{iconfont.1787473169817.woff2 → iconfont.1787542597284.woff2} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vxe-table",
3
- "version": "4.21.0",
3
+ "version": "4.21.1",
4
4
  "description": "A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.",
5
5
  "scripts": {
6
6
  "update": "npm install --legacy-peer-deps",
@@ -2176,9 +2176,10 @@ export default defineVxeComponent({
2176
2176
  if (!el || !el.clientWidth) {
2177
2177
  return
2178
2178
  }
2179
+ const cellOpts = computeCellOpts.value
2179
2180
  const treeOpts = computeTreeOpts.value
2180
2181
  const defaultRowHeight = computeDefaultRowHeight.value
2181
- if (!isAllOverflow && (scrollYLoad || scrollXLoad || (treeConfig && treeOpts.showLine))) {
2182
+ if (!isAllOverflow && (scrollYLoad || scrollXLoad || cellOpts.maxHeight || (treeConfig && treeOpts.showLine))) {
2182
2183
  const { handleGetRowId } = createHandleGetRowId($xeTable)
2183
2184
  el.setAttribute('data-calc-row', 'Y')
2184
2185
  tableData.forEach(row => {
@@ -4880,7 +4881,7 @@ export default defineVxeComponent({
4880
4881
  const rowid = handleGetRowId(row)
4881
4882
  const rowRest = fullAllDataRowIdData[rowid] || {}
4882
4883
  rowRest.oTop = offsetTop
4883
- offsetTop += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight
4884
+ offsetTop += getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight)
4884
4885
  // 是否展开行
4885
4886
  if (expandColumn && rowExpandedMaps[rowid]) {
4886
4887
  offsetTop += rowRest.expandHeight || expandOpts.height || 0
@@ -4920,7 +4921,7 @@ export default defineVxeComponent({
4920
4921
  if (isScrollYBig && trEl) {
4921
4922
  offsetTop = trEl.offsetTop + trEl.offsetHeight
4922
4923
  } else {
4923
- offsetTop = rowRest.oTop + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight)
4924
+ offsetTop = rowRest.oTop + getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight)
4924
4925
  }
4925
4926
  } else {
4926
4927
  if (trEl) {
@@ -6418,7 +6419,7 @@ export default defineVxeComponent({
6418
6419
  if (rowRest) {
6419
6420
  const resizeHeight = rowRest.resizeHeight
6420
6421
  if (resizeHeight || isFull) {
6421
- const currCellHeight = resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight
6422
+ const currCellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight)
6422
6423
  rest[rowid] = currCellHeight
6423
6424
  }
6424
6425
  }
@@ -6484,7 +6485,7 @@ export default defineVxeComponent({
6484
6485
  const rowid = XEUtils.isString(rowOrId) || XEUtils.isNumber(rowOrId) ? rowOrId : getRowid($xeTable, rowOrId)
6485
6486
  const rowRest = fullAllDataRowIdData[rowid]
6486
6487
  if (rowRest) {
6487
- return rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight
6488
+ return getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight)
6488
6489
  }
6489
6490
  return 0
6490
6491
  },
@@ -10144,7 +10145,7 @@ export default defineVxeComponent({
10144
10145
  return
10145
10146
  }
10146
10147
  const defaultRowHeight = computeDefaultRowHeight.value
10147
- let currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight
10148
+ let currCellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight)
10148
10149
  if (!showOverflow) {
10149
10150
  currCellHeight = tdEl.clientHeight
10150
10151
  }
@@ -708,10 +708,10 @@ export function handleRowidOrRow ($xeTable: VxeTableConstructor, rowidOrRow: any
708
708
  export function getCellRestHeight (rowRest: VxeTableDefines.RowCacheItem, cellOpts: VxeTablePropTypes.CellConfig, rowOpts: VxeTablePropTypes.RowConfig, defaultRowHeight: number) {
709
709
  const { height, minHeight, maxHeight } = cellOpts
710
710
  let cellHeight = rowRest.resizeHeight || height || rowOpts.height || rowRest.height || defaultRowHeight
711
- if (maxHeight && maxHeight < cellHeight) {
711
+ if (maxHeight && maxHeight <= cellHeight) {
712
712
  cellHeight = maxHeight
713
713
  }
714
- if (minHeight && minHeight > cellHeight) {
714
+ if (minHeight && minHeight >= cellHeight) {
715
715
  cellHeight = minHeight
716
716
  }
717
717
  return cellHeight
@@ -2188,7 +2188,6 @@ $btnThemeList: (
2188
2188
  & > .vxe-cell {
2189
2189
  display: flex;
2190
2190
  flex-direction: row;
2191
- align-items: center;
2192
2191
  }
2193
2192
  }
2194
2193
  /*溢出列*/
@@ -2705,6 +2704,9 @@ $btnThemeList: (
2705
2704
  }
2706
2705
  }
2707
2706
 
2707
+ .vxe-cell--wrapper {
2708
+ margin: auto 0;
2709
+ }
2708
2710
  .vxe-body--row {
2709
2711
  .vxe-table--column {
2710
2712
  .vxe-cell {