vxe-table 4.10.6-beta.25 → 4.10.6-beta.27

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 (69) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/locale/lang/en-US.js +2 -2
  4. package/es/style.css +1 -1
  5. package/es/style.min.css +1 -1
  6. package/es/table/src/body.js +21 -19
  7. package/es/table/src/cell.js +25 -39
  8. package/es/table/src/column.js +10 -0
  9. package/es/table/src/columnInfo.js +2 -0
  10. package/es/table/src/footer.js +2 -1
  11. package/es/table/src/header.js +2 -2
  12. package/es/table/src/table.js +111 -81
  13. package/es/table/src/util.js +9 -3
  14. package/es/table/style.css +51 -26
  15. package/es/table/style.min.css +1 -1
  16. package/es/ui/index.js +1 -1
  17. package/es/ui/src/log.js +1 -1
  18. package/es/vxe-table/style.css +51 -26
  19. package/es/vxe-table/style.min.css +1 -1
  20. package/lib/index.css +1 -1
  21. package/lib/index.min.css +1 -1
  22. package/lib/index.umd.js +189 -150
  23. package/lib/index.umd.min.js +1 -1
  24. package/lib/locale/lang/en-US.js +2 -2
  25. package/lib/locale/lang/en-US.min.js +1 -1
  26. package/lib/locale/lang/en-US.umd.js +2 -2
  27. package/lib/style.css +1 -1
  28. package/lib/style.min.css +1 -1
  29. package/lib/table/src/body.js +17 -18
  30. package/lib/table/src/body.min.js +1 -1
  31. package/lib/table/src/cell.js +24 -33
  32. package/lib/table/src/cell.min.js +1 -1
  33. package/lib/table/src/column.js +10 -0
  34. package/lib/table/src/column.min.js +1 -1
  35. package/lib/table/src/columnInfo.js +2 -0
  36. package/lib/table/src/columnInfo.min.js +1 -1
  37. package/lib/table/src/footer.js +2 -1
  38. package/lib/table/src/footer.min.js +1 -1
  39. package/lib/table/src/header.js +1 -1
  40. package/lib/table/src/header.min.js +1 -1
  41. package/lib/table/src/table.js +122 -92
  42. package/lib/table/src/table.min.js +1 -1
  43. package/lib/table/src/util.js +10 -3
  44. package/lib/table/src/util.min.js +1 -1
  45. package/lib/table/style/style.css +51 -26
  46. package/lib/table/style/style.min.css +1 -1
  47. package/lib/ui/index.js +1 -1
  48. package/lib/ui/index.min.js +1 -1
  49. package/lib/ui/src/log.js +1 -1
  50. package/lib/ui/src/log.min.js +1 -1
  51. package/lib/vxe-table/style/style.css +51 -26
  52. package/lib/vxe-table/style/style.min.css +1 -1
  53. package/package.json +2 -2
  54. package/packages/locale/lang/en-US.ts +2 -2
  55. package/packages/table/src/body.ts +21 -19
  56. package/packages/table/src/cell.ts +25 -47
  57. package/packages/table/src/column.ts +10 -0
  58. package/packages/table/src/columnInfo.ts +2 -0
  59. package/packages/table/src/footer.ts +2 -1
  60. package/packages/table/src/header.ts +2 -2
  61. package/packages/table/src/table.ts +116 -83
  62. package/packages/table/src/util.ts +10 -3
  63. package/styles/components/table.scss +63 -31
  64. /package/es/{iconfont.1737356819937.ttf → iconfont.1737446773545.ttf} +0 -0
  65. /package/es/{iconfont.1737356819937.woff → iconfont.1737446773545.woff} +0 -0
  66. /package/es/{iconfont.1737356819937.woff2 → iconfont.1737446773545.woff2} +0 -0
  67. /package/lib/{iconfont.1737356819937.ttf → iconfont.1737446773545.ttf} +0 -0
  68. /package/lib/{iconfont.1737356819937.woff → iconfont.1737446773545.woff} +0 -0
  69. /package/lib/{iconfont.1737356819937.woff2 → iconfont.1737446773545.woff2} +0 -0
@@ -937,13 +937,13 @@ export default defineComponent({
937
937
  }
938
938
 
939
939
  const computeRowHeight = () => {
940
- const { showOverflow } = props
940
+ const { isAllOverflow } = reactData
941
941
  const tableHeader = refTableHeader.value
942
942
  const tableBody = refTableBody.value
943
943
  const tableBodyElem = tableBody ? tableBody.$el as HTMLDivElement : null
944
944
  const defaultRowHeight = computeDefaultRowHeight.value
945
945
  let rowHeight = 0
946
- if (showOverflow) {
946
+ if (isAllOverflow) {
947
947
  if (tableBodyElem) {
948
948
  const tableHeaderElem = tableHeader ? tableHeader.$el as HTMLDivElement : null
949
949
  let firstTrElem
@@ -966,7 +966,7 @@ export default defineComponent({
966
966
  }
967
967
 
968
968
  const handleVirtualYVisible = (currScrollTop?: number) => {
969
- const { showOverflow } = props
969
+ const { isAllOverflow } = reactData
970
970
  const { elemStore, isResizeCellHeight, afterFullData, fullAllDataRowIdData } = internalData
971
971
  const rowOpts = computeRowOpts.value
972
972
  const cellOpts = computeCellOpts.value
@@ -980,15 +980,15 @@ export default defineComponent({
980
980
  let offsetTop = 0
981
981
  let visibleSize = 0
982
982
  const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height
983
- if (!isCustomCellHeight && showOverflow) {
983
+ if (!isCustomCellHeight && isAllOverflow) {
984
984
  toVisibleIndex = Math.floor(scrollTop / defaultRowHeight)
985
985
  visibleSize = Math.ceil(clientHeight / defaultRowHeight) + 1
986
986
  } else {
987
987
  for (let rIndex = 0, rLen = afterFullData.length; rIndex < rLen; rIndex++) {
988
988
  const row = afterFullData[rIndex]
989
989
  const rowid = getRowid($xeTable, row)
990
- const rowRest = fullAllDataRowIdData[rowid]
991
- offsetTop += rowRest ? (rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight) : defaultRowHeight
990
+ const rowRest = fullAllDataRowIdData[rowid] || {}
991
+ offsetTop += rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight
992
992
  if (toVisibleIndex === -1 && scrollTop < offsetTop) {
993
993
  toVisibleIndex = rIndex
994
994
  }
@@ -1495,35 +1495,32 @@ export default defineComponent({
1495
1495
 
1496
1496
  const calcCellAutoHeight = (rowRest: VxeTableDefines.RowCacheItem, wrapperEl: HTMLDivElement) => {
1497
1497
  const cellElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`)
1498
- let topBottomPadding = 0
1499
- const firstCellEl = cellElemList[0]
1500
- if (firstCellEl && firstCellEl.parentElement) {
1501
- const cellStyle = getComputedStyle(firstCellEl.parentElement)
1502
- topBottomPadding = Math.ceil(XEUtils.toNumber(cellStyle.paddingTop) + XEUtils.toNumber(cellStyle.paddingBottom))
1503
- }
1504
- let colHeight = rowRest.height - topBottomPadding
1498
+ let colHeight = rowRest.height
1505
1499
  for (let i = 0; i < cellElemList.length; i++) {
1506
1500
  const cellElem = cellElemList[i] as HTMLElement
1501
+ const tdEl = cellElem.parentElement as HTMLTableCellElement
1502
+ const topBottomPadding = Math.ceil(XEUtils.toNumber(tdEl.style.paddingTop) + XEUtils.toNumber(tdEl.style.paddingBottom))
1507
1503
  const cellHeight = cellElem ? cellElem.clientHeight : 0
1508
- colHeight = Math.max(colHeight, Math.ceil(cellHeight))
1504
+ colHeight = Math.max(colHeight - topBottomPadding, Math.ceil(cellHeight))
1509
1505
  }
1510
- return colHeight + topBottomPadding
1506
+ return colHeight
1511
1507
  }
1512
1508
 
1513
1509
  const calcCellHeight = () => {
1514
- const { showOverflow } = props
1515
- const { tableData, scrollYLoad, scrollXLoad } = reactData
1510
+ const { tableData, isAllOverflow, scrollYLoad, scrollXLoad } = reactData
1516
1511
  const { fullAllDataRowIdData } = internalData
1517
1512
  const defaultRowHeight = computeDefaultRowHeight.value
1518
1513
  const el = refElem.value
1519
- if (!showOverflow && scrollYLoad && el) {
1514
+ if (!isAllOverflow && scrollYLoad && el) {
1515
+ el.setAttribute('data-calc-row', 'Y')
1520
1516
  tableData.forEach(row => {
1521
1517
  const rowid = getRowid($xeTable, row)
1522
1518
  const rowRest = fullAllDataRowIdData[rowid]
1523
1519
  if (rowRest) {
1524
- const height = calcCellAutoHeight(rowRest, el)
1525
- rowRest.height = Math.max(defaultRowHeight, scrollXLoad ? Math.max(rowRest.height, height) : height)
1520
+ const reHeight = calcCellAutoHeight(rowRest, el)
1521
+ rowRest.height = Math.max(defaultRowHeight, scrollXLoad ? Math.max(rowRest.height, reHeight) : reHeight)
1526
1522
  }
1523
+ el.removeAttribute('data-calc-row')
1527
1524
  })
1528
1525
  reactData.calcCellHeightFlag++
1529
1526
  }
@@ -1778,7 +1775,7 @@ export default defineComponent({
1778
1775
  }
1779
1776
 
1780
1777
  const updateStyle = () => {
1781
- const { border, showOverflow: allColumnOverflow, showHeaderOverflow: allColumnHeaderOverflow, showFooterOverflow: allColumnFooterOverflow, mouseConfig, spanMethod, footerSpanMethod } = props
1778
+ const { border, showHeaderOverflow: allColumnHeaderOverflow, showFooterOverflow: allColumnFooterOverflow, mouseConfig, spanMethod, footerSpanMethod } = props
1782
1779
  const { isGroup, currentRow, tableColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, overflowY, scrollbarHeight, columnStore, editStore, isAllOverflow, expandColumn } = reactData
1783
1780
  const { visibleColumn, fullColumnIdData, tableHeight, tableWidth, headerHeight, footerHeight, elemStore, customHeight, customMinHeight, customMaxHeight } = internalData
1784
1781
  const el = refElem.value
@@ -1980,7 +1977,7 @@ export default defineComponent({
1980
1977
 
1981
1978
  let isOptimizeMode = false
1982
1979
  // 如果是使用优化模式
1983
- if (scrollXLoad || scrollYLoad || (allColumnOverflow && isAllOverflow)) {
1980
+ if (scrollXLoad || scrollYLoad || isAllOverflow) {
1984
1981
  if (expandColumn || spanMethod || footerSpanMethod) {
1985
1982
  // 如果不支持优化模式
1986
1983
  } else {
@@ -2069,7 +2066,7 @@ export default defineComponent({
2069
2066
  } else if (layout === 'footer') {
2070
2067
  cellOverflow = XEUtils.isUndefined(showFooterOverflow) || XEUtils.isNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow
2071
2068
  } else {
2072
- cellOverflow = XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow) ? allColumnOverflow : showOverflow
2069
+ cellOverflow = XEUtils.isUndefined(showOverflow) || XEUtils.isNull(showOverflow) ? isAllOverflow : showOverflow
2073
2070
  }
2074
2071
  const showEllipsis = cellOverflow === 'ellipsis'
2075
2072
  const showTitle = cellOverflow === 'title'
@@ -2663,11 +2660,10 @@ export default defineComponent({
2663
2660
  * @param {Array} datas 数据
2664
2661
  */
2665
2662
  const loadTableData = (datas: any[], isReset: boolean) => {
2666
- const { keepSource, treeConfig, showOverflow } = props
2663
+ const { keepSource, treeConfig } = props
2667
2664
  const { editStore, scrollYLoad: oldScrollYLoad } = reactData
2668
2665
  const { scrollYStore, scrollXStore, lastScrollLeft, lastScrollTop } = internalData
2669
2666
  const treeOpts = computeTreeOpts.value
2670
- const rowOpts = computeRowOpts.value
2671
2667
  const { transform } = treeOpts
2672
2668
  const childrenField = treeOpts.children || treeOpts.childrenField
2673
2669
  let treeData = []
@@ -2726,33 +2722,15 @@ export default defineComponent({
2726
2722
  internalData.tableSynchData = datas
2727
2723
  if (isReset) {
2728
2724
  internalData.isResizeCellHeight = false
2725
+ reactData.rowExpandedMaps = {}
2726
+ reactData.rowExpandLazyLoadedMaps = {}
2727
+ reactData.treeExpandedMaps = {}
2728
+ reactData.treeExpandLazyLoadedMaps = {}
2729
2729
  }
2730
2730
  // 克隆原数据,用于显示编辑状态,与编辑值做对比
2731
2731
  if (keepSource) {
2732
2732
  tablePrivateMethods.cacheSourceMap(fullData)
2733
2733
  }
2734
- if (sYLoad) {
2735
- if (showOverflow) {
2736
- if (!rowOpts.height) {
2737
- const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false)
2738
- if (errColumn) {
2739
- errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true'])
2740
- }
2741
- }
2742
- }
2743
-
2744
- if (process.env.VUE_APP_VXE_ENV === 'development') {
2745
- if (!(props.height || props.maxHeight)) {
2746
- errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}'])
2747
- }
2748
- // if (!props.showOverflow) {
2749
- // warnLog('vxe.error.reqProp', ['table.show-overflow'])
2750
- // }
2751
- if (props.spanMethod) {
2752
- warnLog('vxe.error.scrollErrProp', ['table.span-method'])
2753
- }
2754
- }
2755
- }
2756
2734
  if ($xeTable.clearCellAreas && props.mouseConfig) {
2757
2735
  $xeTable.clearCellAreas()
2758
2736
  $xeTable.clearCopyCellArea()
@@ -2771,6 +2749,30 @@ export default defineComponent({
2771
2749
  if (sYLoad) {
2772
2750
  scrollYStore.endIndex = scrollYStore.visibleSize
2773
2751
  }
2752
+
2753
+ if (sYLoad) {
2754
+ // if (showOverflow) {
2755
+ // if (!rowOpts.height) {
2756
+ // const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false)
2757
+ // if (errColumn) {
2758
+ // errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true'])
2759
+ // }
2760
+ // }
2761
+ // }
2762
+
2763
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
2764
+ if (!(props.height || props.maxHeight)) {
2765
+ errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}'])
2766
+ }
2767
+ // if (!props.showOverflow) {
2768
+ // warnLog('vxe.error.reqProp', ['table.show-overflow'])
2769
+ // }
2770
+ if (props.spanMethod) {
2771
+ warnLog('vxe.error.scrollErrProp', ['table.span-method'])
2772
+ }
2773
+ }
2774
+ }
2775
+
2774
2776
  handleReserveStatus()
2775
2777
  tablePrivateMethods.checkSelectionStatus()
2776
2778
  return new Promise<void>(resolve => {
@@ -3173,11 +3175,10 @@ export default defineComponent({
3173
3175
  * 纵向 Y 可视渲染处理
3174
3176
  */
3175
3177
  const loadScrollYData = (scrollTop?: number) => {
3176
- const { showOverflow } = props
3177
- const { mergeList } = reactData
3178
+ const { mergeList, isAllOverflow } = reactData
3178
3179
  const { scrollYStore } = internalData
3179
3180
  const { preloadSize, startIndex, endIndex, offsetSize } = scrollYStore
3180
- const autoOffsetYSize = showOverflow ? offsetSize : offsetSize + 1
3181
+ const autoOffsetYSize = isAllOverflow ? offsetSize : offsetSize + 1
3181
3182
  const { toVisibleIndex, visibleSize } = handleVirtualYVisible(scrollTop)
3182
3183
  const offsetItem = {
3183
3184
  startIndex: Math.max(0, toVisibleIndex - 1 - offsetSize - preloadSize),
@@ -4279,7 +4280,7 @@ export default defineComponent({
4279
4280
  if (rowRest) {
4280
4281
  const resizeHeight = rowRest.resizeHeight
4281
4282
  if (resizeHeight || isFull) {
4282
- const currCellHeight = resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight
4283
+ const currCellHeight = resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight
4283
4284
  rest[rowid] = currCellHeight
4284
4285
  }
4285
4286
  }
@@ -4324,8 +4325,10 @@ export default defineComponent({
4324
4325
  const defaultRowHeight = computeDefaultRowHeight.value
4325
4326
  const rowid = XEUtils.isString(rowOrId) || XEUtils.isNumber(rowOrId) ? rowOrId : getRowid($xeTable, rowOrId)
4326
4327
  const rowRest = fullAllDataRowIdData[rowid]
4327
- const currCellHeight = rowRest ? rowRest.resizeHeight : (cellOpts.height || rowOpts.height || defaultRowHeight)
4328
- return currCellHeight
4328
+ if (rowRest) {
4329
+ return rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight
4330
+ }
4331
+ return 0
4329
4332
  },
4330
4333
  /**
4331
4334
  * 刷新滚动操作,手动同步滚动相关位置(对于某些特殊的操作,比如滚动条错位、固定列不同步)
@@ -5403,8 +5406,7 @@ export default defineComponent({
5403
5406
  * @param {ColumnInfo} fieldOrColumn 列配置
5404
5407
  */
5405
5408
  scrollToRow (row, fieldOrColumn) {
5406
- const { showOverflow } = props
5407
- const { scrollYLoad, scrollXLoad } = reactData
5409
+ const { isAllOverflow, scrollYLoad, scrollXLoad } = reactData
5408
5410
  const rest = []
5409
5411
  if (row) {
5410
5412
  if (props.treeConfig) {
@@ -5418,7 +5420,7 @@ export default defineComponent({
5418
5420
  }
5419
5421
  return Promise.all(rest).then(() => {
5420
5422
  if (row) {
5421
- if (!showOverflow && (scrollYLoad || scrollXLoad)) {
5423
+ if (!isAllOverflow && (scrollYLoad || scrollXLoad)) {
5422
5424
  calcCellHeight()
5423
5425
  calcCellWidth()
5424
5426
  }
@@ -6834,6 +6836,7 @@ export default defineComponent({
6834
6836
  resizeTipElem.style.left = `${resizeTipLeft}px`
6835
6837
  resizeTipElem.style.top = `${Math.min(tableHeight - resizeTipHeight, Math.max(0, evnt.clientY - wrapperRect.y - resizeTipHeight / 2))}px`
6836
6838
  }
6839
+ reactData.isDragResize = true
6837
6840
  }
6838
6841
 
6839
6842
  reactData.isDragResize = true
@@ -6844,9 +6847,12 @@ export default defineComponent({
6844
6847
  document.onmousemove = null
6845
6848
  document.onmouseup = null
6846
6849
  resizeBarElem.style.display = 'none'
6847
- reactData.isDragResize = false
6848
6850
  internalData._lastResizeTime = Date.now()
6849
6851
 
6852
+ setTimeout(() => {
6853
+ reactData.isDragResize = false
6854
+ }, 50)
6855
+
6850
6856
  const resizeWidth = resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)
6851
6857
  const resizeParams = { ...params, resizeWidth, resizeColumn }
6852
6858
  if (resizableOpts.dragMode === 'fixed') {
@@ -6877,6 +6883,8 @@ export default defineComponent({
6877
6883
  const { isDblclickAutoWidth } = resizableOpts
6878
6884
  const el = refElem.value
6879
6885
  if (isDblclickAutoWidth && el) {
6886
+ evnt.stopPropagation()
6887
+ evnt.preventDefault()
6880
6888
  const { fullColumnIdData } = internalData
6881
6889
  const { column } = params
6882
6890
  let resizeColumn = column
@@ -6943,7 +6951,7 @@ export default defineComponent({
6943
6951
  return
6944
6952
  }
6945
6953
  const defaultRowHeight = computeDefaultRowHeight.value
6946
- const currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight
6954
+ const currCellHeight = rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight
6947
6955
  const tableRect = tableEl.getBoundingClientRect()
6948
6956
  const trRect = trEl.getBoundingClientRect()
6949
6957
  const targetOffsetY = dragClientY - trRect.y - trEl.clientHeight
@@ -6985,6 +6993,7 @@ export default defineComponent({
6985
6993
  resizeTipElem.style.left = `${resizeBarLeft}px`
6986
6994
  resizeTipElem.style.top = `${resizeBarTop}px`
6987
6995
  }
6996
+ reactData.isDragResize = true
6988
6997
  }
6989
6998
 
6990
6999
  reactData.isDragResize = true
@@ -6995,8 +7004,12 @@ export default defineComponent({
6995
7004
  document.onmousemove = null
6996
7005
  document.onmouseup = null
6997
7006
  resizeBarElem.style.display = 'none'
6998
- reactData.isDragResize = false
6999
7007
  internalData._lastResizeTime = Date.now()
7008
+
7009
+ setTimeout(() => {
7010
+ reactData.isDragResize = false
7011
+ }, 50)
7012
+
7000
7013
  if (resizeHeight !== currCellHeight) {
7001
7014
  const resizeParams = { ...params, resizeHeight, resizeRow: row }
7002
7015
  internalData.isResizeCellHeight = true
@@ -7016,22 +7029,35 @@ export default defineComponent({
7016
7029
  const { isDblclickAutoHeight } = resizableOpts
7017
7030
  const el = refElem.value
7018
7031
  if (isDblclickAutoHeight && el) {
7032
+ evnt.stopPropagation()
7033
+ evnt.preventDefault()
7034
+ const { editStore } = reactData
7019
7035
  const { fullAllDataRowIdData } = internalData
7036
+ const { actived } = editStore
7020
7037
  const { row } = params
7021
7038
  const rowid = getRowid($xeTable, row)
7022
7039
  const rowRest = fullAllDataRowIdData[rowid]
7023
7040
  if (!rowRest) {
7024
7041
  return
7025
7042
  }
7026
- const resizeHeight = calcCellAutoHeight(rowRest, el)
7027
- const resizeParams = { ...params, resizeHeight, resizeRow: row }
7028
- reactData.isDragResize = false
7029
- internalData._lastResizeTime = Date.now()
7030
- if ($xeTable.handleRowResizeDblclickCellAreaEvent) {
7031
- $xeTable.handleRowResizeDblclickCellAreaEvent(evnt, resizeParams)
7043
+ const handleRsHeight = () => {
7044
+ el.setAttribute('data-calc-row', 'Y')
7045
+ const resizeHeight = calcCellAutoHeight(rowRest, el)
7046
+ el.removeAttribute('data-calc-row')
7047
+ const resizeParams = { ...params, resizeHeight, resizeRow: row }
7048
+ reactData.isDragResize = false
7049
+ internalData._lastResizeTime = Date.now()
7050
+ if ($xeTable.handleRowResizeDblclickCellAreaEvent) {
7051
+ $xeTable.handleRowResizeDblclickCellAreaEvent(evnt, resizeParams)
7052
+ } else {
7053
+ rowRest.resizeHeight = resizeHeight
7054
+ handleUpdateRowResize(evnt, resizeParams)
7055
+ }
7056
+ }
7057
+ if (actived.row || actived.column) {
7058
+ $xeTable.clearEdit().then(handleRsHeight)
7032
7059
  } else {
7033
- rowRest.resizeHeight = resizeHeight
7034
- handleUpdateRowResize(evnt, resizeParams)
7060
+ handleRsHeight()
7035
7061
  }
7036
7062
  }
7037
7063
  },
@@ -7445,11 +7471,11 @@ export default defineComponent({
7445
7471
  internalData.tooltipTimeout = setTimeout(() => {
7446
7472
  $tooltip = refTooltip.value
7447
7473
  if ($tooltip && $tooltip.isActived && !$tooltip.isActived()) {
7448
- tableMethods.closeTooltip()
7474
+ $xeTable.closeTooltip()
7449
7475
  }
7450
7476
  }, tooltipOpts.leaveDelay)
7451
7477
  } else {
7452
- tableMethods.closeTooltip()
7478
+ $xeTable.closeTooltip()
7453
7479
  }
7454
7480
  },
7455
7481
  triggerHeaderCellClickEvent (evnt, params) {
@@ -7479,7 +7505,10 @@ export default defineComponent({
7479
7505
  */
7480
7506
  triggerCellClickEvent (evnt, params) {
7481
7507
  const { highlightCurrentRow, editConfig } = props
7482
- const { editStore } = reactData
7508
+ const { editStore, isDragResize } = reactData
7509
+ if (isDragResize) {
7510
+ return
7511
+ }
7483
7512
  const expandOpts = computeExpandOpts.value
7484
7513
  const editOpts = computeEditOpts.value
7485
7514
  const treeOpts = computeTreeOpts.value
@@ -7571,7 +7600,10 @@ export default defineComponent({
7571
7600
  */
7572
7601
  triggerCellDblclickEvent (evnt, params) {
7573
7602
  const { editConfig } = props
7574
- const { editStore } = reactData
7603
+ const { editStore, isDragResize } = reactData
7604
+ if (isDragResize) {
7605
+ return
7606
+ }
7575
7607
  const editOpts = computeEditOpts.value
7576
7608
  const { actived } = editStore
7577
7609
  const cell = evnt.currentTarget as HTMLDivElement
@@ -8702,7 +8734,10 @@ export default defineComponent({
8702
8734
  })
8703
8735
  },
8704
8736
  triggerBodyWheelEvent (evnt) {
8705
- const { deltaY, deltaX } = evnt
8737
+ const { target, deltaY, deltaX } = evnt
8738
+ if (target && /^textarea$/i.test((target as HTMLElement).tagName)) {
8739
+ return
8740
+ }
8706
8741
  const { highlightHoverRow } = tableProps
8707
8742
  const { elemStore, lastScrollTop, lastScrollLeft } = internalData
8708
8743
  const rowOpts = computeRowOpts.value
@@ -8721,7 +8756,6 @@ export default defineComponent({
8721
8756
  if (!bodyScrollElem) {
8722
8757
  return
8723
8758
  }
8724
-
8725
8759
  const wheelSpeed = getWheelSpeed(reactData.lastScrollTime)
8726
8760
  const deltaTop = deltaY * wheelSpeed
8727
8761
  const deltaLeft = deltaX * wheelSpeed
@@ -8908,8 +8942,7 @@ export default defineComponent({
8908
8942
  },
8909
8943
  // 更新纵向 Y 可视渲染上下剩余空间大小
8910
8944
  updateScrollYSpace () {
8911
- const { showOverflow } = props
8912
- const { scrollYLoad } = reactData
8945
+ const { isAllOverflow, scrollYLoad } = reactData
8913
8946
  const { scrollYStore, elemStore, isResizeCellHeight, afterFullData, fullAllDataRowIdData } = internalData
8914
8947
  const { startIndex } = scrollYStore
8915
8948
  const rowOpts = computeRowOpts.value
@@ -8922,21 +8955,21 @@ export default defineComponent({
8922
8955
 
8923
8956
  if (scrollYLoad) {
8924
8957
  const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height
8925
- if (!isCustomCellHeight && showOverflow) {
8958
+ if (!isCustomCellHeight && isAllOverflow) {
8926
8959
  ySpaceHeight = afterFullData.length * defaultRowHeight
8927
8960
  topSpaceHeight = Math.max(0, startIndex * defaultRowHeight)
8928
8961
  } else {
8929
8962
  for (let i = 0; i < afterFullData.length; i++) {
8930
8963
  const row = afterFullData[i]
8931
8964
  const rowid = getRowid($xeTable, row)
8932
- const rowRest = fullAllDataRowIdData[rowid]
8933
- ySpaceHeight += rowRest ? (rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight) : defaultRowHeight
8965
+ const rowRest = fullAllDataRowIdData[rowid] || {}
8966
+ ySpaceHeight += rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight
8934
8967
  }
8935
8968
  for (let i = 0; i < startIndex; i++) {
8936
8969
  const row = afterFullData[i]
8937
8970
  const rowid = getRowid($xeTable, row)
8938
- const rowRest = fullAllDataRowIdData[rowid]
8939
- topSpaceHeight += rowRest ? (rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight) : defaultRowHeight
8971
+ const rowRest = fullAllDataRowIdData[rowid] || {}
8972
+ topSpaceHeight += rowRest.resizeHeight || rowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight
8940
8973
  }
8941
8974
  }
8942
8975
  } else {
@@ -8966,12 +8999,12 @@ export default defineComponent({
8966
8999
  })
8967
9000
  },
8968
9001
  updateScrollXData () {
8969
- const { showOverflow } = props
9002
+ const { isAllOverflow } = reactData
8970
9003
  handleTableColumn()
8971
9004
  return nextTick().then(() => {
8972
9005
  handleTableColumn()
8973
9006
  $xeTable.updateScrollXSpace()
8974
- if (!showOverflow) {
9007
+ if (!isAllOverflow) {
8975
9008
  $xeTable.updateScrollYSpace()
8976
9009
  }
8977
9010
  })
@@ -9594,7 +9627,7 @@ export default defineComponent({
9594
9627
  if (value && value.length >= 50000) {
9595
9628
  warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)'])
9596
9629
  }
9597
- loadTableData(value, false).then(() => {
9630
+ loadTableData(value, true).then(() => {
9598
9631
  const { scrollXLoad, scrollYLoad, expandColumn } = reactData
9599
9632
  internalData.inited = true
9600
9633
  internalData.initStatus = true
@@ -178,6 +178,13 @@ export function getRefElem (refEl: any) {
178
178
  return null
179
179
  }
180
180
 
181
+ export function getCellHeight (height: number | 'unset' | undefined | null) {
182
+ if (height === 'unset') {
183
+ return 0
184
+ }
185
+ return height || 0
186
+ }
187
+
181
188
  /**
182
189
  * 列宽拖动最大宽度
183
190
  * @param params
@@ -483,7 +490,7 @@ export function rowToVisible ($xeTable: VxeTableConstructor & VxeTablePrivateMet
483
490
  return $xeTable.scrollTo(null, ($xeTable.findRowIndexOf(afterFullData, row) - 1) * defaultRowHeight)
484
491
  }
485
492
  let scrollTop = 0
486
- const rowRest = fullAllDataRowIdData[rowid]
493
+ const rowRest = fullAllDataRowIdData[rowid] || {}
487
494
  const rHeight = rowRest ? (rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight) : defaultRowHeight
488
495
  for (let i = 0; i < afterFullData.length; i++) {
489
496
  const currRow = afterFullData[i]
@@ -491,8 +498,8 @@ export function rowToVisible ($xeTable: VxeTableConstructor & VxeTablePrivateMet
491
498
  if (currRow === row || currRowid === rowid) {
492
499
  break
493
500
  }
494
- const rowRest = fullAllDataRowIdData[currRowid]
495
- scrollTop += rowRest ? (rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight) : defaultRowHeight
501
+ const currRowRest = fullAllDataRowIdData[currRowid] || {}
502
+ scrollTop += currRowRest.resizeHeight || currRowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight
496
503
  }
497
504
  if (scrollTop < bodyScrollTop) {
498
505
  return $xeTable.scrollTo(null, scrollTop - leftFixedWidth - 1)
@@ -155,8 +155,8 @@
155
155
  .vxe-default-input,
156
156
  .vxe-default-textarea,
157
157
  .vxe-default-select {
158
+ font-family: var(--vxe-ui-font-family);
158
159
  outline: 0;
159
- padding: 0 2px;
160
160
  color: var(--vxe-ui-font-color);
161
161
  border-radius: var(--vxe-ui-border-radius);
162
162
  border: 1px solid var(--vxe-ui-input-border-color);
@@ -186,11 +186,9 @@
186
186
  }
187
187
  }
188
188
  .vxe-default-textarea {
189
+ font-size: 1em;
189
190
  resize: none;
190
191
  vertical-align: middle;
191
- &:not([rows]) {
192
- height: var(--vxe-ui-input-height-default);
193
- }
194
192
  }
195
193
  & > .vxe-input > .vxe-input--inner,
196
194
  & > .vxe-textarea > .vxe-textarea--inner {
@@ -213,9 +211,30 @@
213
211
  }
214
212
  .vxe-body--column {
215
213
  &.col--vertical-top {
216
- & > .vxe-cell {
217
- & > .vxe-cell--wrapper {
218
- height: 100%;
214
+ &.col--active {
215
+ & > .vxe-cell {
216
+ & > .vxe-cell--wrapper {
217
+ height: 100%;
218
+ & > .vxe-default-textarea {
219
+ height: 100%;
220
+ }
221
+ }
222
+ }
223
+ }
224
+ }
225
+ }
226
+ /*行高*/
227
+ .vxe-table {
228
+ &:not([data-calc-row]) {
229
+ .vxe-body--column {
230
+ &.col--vertical-top {
231
+ &:not(.col--active) {
232
+ & > .vxe-cell {
233
+ & > .vxe-cell--wrapper {
234
+ min-height: 100%;
235
+ }
236
+ }
237
+ }
219
238
  }
220
239
  }
221
240
  }
@@ -1198,6 +1217,9 @@
1198
1217
  &.is--padding {
1199
1218
  .vxe-cell {
1200
1219
  padding: var(--vxe-ui-table-cell-padding-medium);
1220
+ .vxe-default-textarea {
1221
+ padding: var(--vxe-ui-table-cell-padding-medium);
1222
+ }
1201
1223
  }
1202
1224
  }
1203
1225
  }
@@ -1226,6 +1248,9 @@
1226
1248
  &.is--padding {
1227
1249
  .vxe-cell {
1228
1250
  padding: var(--vxe-ui-table-cell-padding-small);
1251
+ .vxe-default-textarea {
1252
+ padding: var(--vxe-ui-table-cell-padding-small);
1253
+ }
1229
1254
  }
1230
1255
  }
1231
1256
  }
@@ -1254,6 +1279,9 @@
1254
1279
  &.is--padding {
1255
1280
  .vxe-cell {
1256
1281
  padding: var(--vxe-ui-table-cell-padding-mini);
1282
+ .vxe-default-textarea {
1283
+ padding: var(--vxe-ui-table-cell-padding-mini);
1284
+ }
1257
1285
  }
1258
1286
  }
1259
1287
  }
@@ -1277,6 +1305,9 @@
1277
1305
  &.is--padding {
1278
1306
  .vxe-cell {
1279
1307
  padding: var(--vxe-ui-table-cell-padding-default);
1308
+ .vxe-default-textarea {
1309
+ padding: var(--vxe-ui-table-cell-padding-default);
1310
+ }
1280
1311
  }
1281
1312
  }
1282
1313
  }
@@ -1523,6 +1554,31 @@
1523
1554
  align-items: center;
1524
1555
  }
1525
1556
  }
1557
+ /*溢出列*/
1558
+ .vxe-header--column,
1559
+ .vxe-body--column,
1560
+ .vxe-footer--column {
1561
+ &:not(.col--active) {
1562
+ &.col--ellipsis {
1563
+ & > .vxe-cell {
1564
+ overflow: hidden;
1565
+ & > .vxe-cell--wrapper {
1566
+ overflow: hidden;
1567
+ text-overflow: ellipsis;
1568
+ white-space: nowrap;
1569
+ }
1570
+ }
1571
+ }
1572
+ &.vxe-tree-cell,
1573
+ &.col--vertical-top {
1574
+ & > .vxe-cell {
1575
+ & > .vxe-cell--wrapper {
1576
+ white-space: pre-line;
1577
+ }
1578
+ }
1579
+ }
1580
+ }
1581
+ }
1526
1582
  .vxe-header--column,
1527
1583
  .vxe-footer--column {
1528
1584
  &.col--ellipsis {
@@ -1760,30 +1816,6 @@
1760
1816
  white-space: nowrap;
1761
1817
  }
1762
1818
 
1763
- /*溢出列*/
1764
- .vxe-header--column,
1765
- .vxe-body--column,
1766
- .vxe-footer--column {
1767
- &.col--ellipsis {
1768
- &:not(.col--active) {
1769
- & > .vxe-cell {
1770
- overflow: hidden;
1771
- text-overflow: ellipsis;
1772
- white-space: nowrap;
1773
- & > .vxe-cell--wrapper {
1774
- overflow: hidden;
1775
- text-overflow: ellipsis;
1776
- white-space: nowrap;
1777
- }
1778
- }
1779
- &.col--vertical-top {
1780
- & > .vxe-cell {
1781
- white-space: pre-line;
1782
- }
1783
- }
1784
- }
1785
- }
1786
- }
1787
1819
  &.size--medium {
1788
1820
  .vxe-cell--checkbox {
1789
1821
  font-size: var(--vxe-checkbox-font-size-medium);