vxe-table 4.10.6-beta.3 → 4.10.6-beta.31

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 (178) hide show
  1. package/es/grid/src/grid.js +1 -1
  2. package/es/index.css +1 -1
  3. package/es/index.min.css +1 -1
  4. package/es/locale/lang/ar-EG.js +2 -1
  5. package/es/locale/lang/de-DE.js +2 -1
  6. package/es/locale/lang/en-US.js +4 -3
  7. package/es/locale/lang/es-ES.js +2 -1
  8. package/es/locale/lang/fr-FR.js +2 -1
  9. package/es/locale/lang/hu-HU.js +2 -1
  10. package/es/locale/lang/hy-AM.js +2 -1
  11. package/es/locale/lang/it-IT.js +2 -1
  12. package/es/locale/lang/ja-JP.js +2 -1
  13. package/es/locale/lang/ko-KR.js +2 -1
  14. package/es/locale/lang/nb-NO.js +2 -1
  15. package/es/locale/lang/pt-BR.js +2 -1
  16. package/es/locale/lang/ru-RU.js +4 -3
  17. package/es/locale/lang/th-TH.js +2 -1
  18. package/es/locale/lang/ug-CN.js +2 -1
  19. package/es/locale/lang/uk-UA.js +518 -517
  20. package/es/locale/lang/vi-VN.js +2 -1
  21. package/es/locale/lang/zh-CHT.js +2 -1
  22. package/es/locale/lang/zh-CN.js +2 -1
  23. package/es/style.css +1 -1
  24. package/es/style.min.css +1 -1
  25. package/es/table/module/edit/hook.js +7 -7
  26. package/es/table/module/export/hook.js +97 -62
  27. package/es/table/module/keyboard/hook.js +63 -27
  28. package/es/table/src/body.js +112 -77
  29. package/es/table/src/cell.js +41 -55
  30. package/es/table/src/column.js +13 -1
  31. package/es/table/src/columnInfo.js +3 -0
  32. package/es/table/src/emits.js +2 -0
  33. package/es/table/src/footer.js +32 -8
  34. package/es/table/src/header.js +73 -158
  35. package/es/table/src/props.js +14 -4
  36. package/es/table/src/table.js +1179 -634
  37. package/es/table/src/util.js +77 -62
  38. package/es/table/style.css +357 -213
  39. package/es/table/style.min.css +1 -1
  40. package/es/ui/index.js +26 -11
  41. package/es/ui/src/log.js +1 -1
  42. package/es/vxe-table/style.css +357 -213
  43. package/es/vxe-table/style.min.css +1 -1
  44. package/lib/grid/src/grid.js +1 -1
  45. package/lib/grid/src/grid.min.js +1 -1
  46. package/lib/index.css +1 -1
  47. package/lib/index.min.css +1 -1
  48. package/lib/index.umd.js +1852 -1165
  49. package/lib/index.umd.min.js +1 -1
  50. package/lib/locale/lang/ar-EG.js +2 -1
  51. package/lib/locale/lang/ar-EG.min.js +1 -1
  52. package/lib/locale/lang/de-DE.js +2 -1
  53. package/lib/locale/lang/de-DE.min.js +1 -1
  54. package/lib/locale/lang/en-US.js +4 -3
  55. package/lib/locale/lang/en-US.min.js +1 -1
  56. package/lib/locale/lang/en-US.umd.js +4 -3
  57. package/lib/locale/lang/es-ES.js +2 -1
  58. package/lib/locale/lang/es-ES.min.js +1 -1
  59. package/lib/locale/lang/es-ES.umd.js +2 -1
  60. package/lib/locale/lang/fr-FR.js +2 -1
  61. package/lib/locale/lang/fr-FR.min.js +1 -1
  62. package/lib/locale/lang/hu-HU.js +2 -1
  63. package/lib/locale/lang/hu-HU.min.js +1 -1
  64. package/lib/locale/lang/hu-HU.umd.js +2 -1
  65. package/lib/locale/lang/hy-AM.js +2 -1
  66. package/lib/locale/lang/hy-AM.min.js +1 -1
  67. package/lib/locale/lang/it-IT.js +2 -1
  68. package/lib/locale/lang/it-IT.min.js +1 -1
  69. package/lib/locale/lang/ja-JP.js +2 -1
  70. package/lib/locale/lang/ja-JP.min.js +1 -1
  71. package/lib/locale/lang/ja-JP.umd.js +2 -1
  72. package/lib/locale/lang/ko-KR.js +2 -1
  73. package/lib/locale/lang/ko-KR.min.js +1 -1
  74. package/lib/locale/lang/ko-KR.umd.js +2 -1
  75. package/lib/locale/lang/nb-NO.js +2 -1
  76. package/lib/locale/lang/nb-NO.min.js +1 -1
  77. package/lib/locale/lang/pt-BR.js +2 -1
  78. package/lib/locale/lang/pt-BR.min.js +1 -1
  79. package/lib/locale/lang/pt-BR.umd.js +2 -1
  80. package/lib/locale/lang/ru-RU.js +4 -3
  81. package/lib/locale/lang/ru-RU.min.js +1 -1
  82. package/lib/locale/lang/ru-RU.umd.js +4 -3
  83. package/lib/locale/lang/th-TH.js +2 -1
  84. package/lib/locale/lang/th-TH.min.js +1 -1
  85. package/lib/locale/lang/ug-CN.js +2 -1
  86. package/lib/locale/lang/ug-CN.min.js +1 -1
  87. package/lib/locale/lang/uk-UA.js +518 -517
  88. package/lib/locale/lang/uk-UA.min.js +1 -1
  89. package/lib/locale/lang/uk-UA.umd.js +518 -517
  90. package/lib/locale/lang/vi-VN.js +2 -1
  91. package/lib/locale/lang/vi-VN.min.js +1 -1
  92. package/lib/locale/lang/zh-CHT.js +2 -1
  93. package/lib/locale/lang/zh-CHT.min.js +1 -1
  94. package/lib/locale/lang/zh-CN.js +2 -1
  95. package/lib/locale/lang/zh-CN.min.js +1 -1
  96. package/lib/locale/lang/zh-CN.umd.js +2 -1
  97. package/lib/style.css +1 -1
  98. package/lib/style.min.css +1 -1
  99. package/lib/table/module/edit/hook.js +12 -2
  100. package/lib/table/module/edit/hook.min.js +1 -1
  101. package/lib/table/module/export/hook.js +97 -57
  102. package/lib/table/module/export/hook.min.js +1 -1
  103. package/lib/table/module/keyboard/hook.js +71 -28
  104. package/lib/table/module/keyboard/hook.min.js +1 -1
  105. package/lib/table/src/body.js +104 -76
  106. package/lib/table/src/body.min.js +1 -1
  107. package/lib/table/src/cell.js +32 -42
  108. package/lib/table/src/cell.min.js +1 -1
  109. package/lib/table/src/column.js +13 -1
  110. package/lib/table/src/column.min.js +1 -1
  111. package/lib/table/src/columnInfo.js +3 -0
  112. package/lib/table/src/columnInfo.min.js +1 -1
  113. package/lib/table/src/emits.js +1 -1
  114. package/lib/table/src/emits.min.js +1 -1
  115. package/lib/table/src/footer.js +30 -8
  116. package/lib/table/src/footer.min.js +1 -1
  117. package/lib/table/src/header.js +57 -169
  118. package/lib/table/src/header.min.js +1 -1
  119. package/lib/table/src/props.js +14 -4
  120. package/lib/table/src/props.min.js +1 -1
  121. package/lib/table/src/table.js +1234 -626
  122. package/lib/table/src/table.min.js +1 -1
  123. package/lib/table/src/util.js +100 -82
  124. package/lib/table/src/util.min.js +1 -1
  125. package/lib/table/style/style.css +357 -213
  126. package/lib/table/style/style.min.css +1 -1
  127. package/lib/ui/index.js +26 -11
  128. package/lib/ui/index.min.js +1 -1
  129. package/lib/ui/src/log.js +1 -1
  130. package/lib/ui/src/log.min.js +1 -1
  131. package/lib/vxe-table/style/style.css +357 -213
  132. package/lib/vxe-table/style/style.min.css +1 -1
  133. package/package.json +2 -2
  134. package/packages/grid/src/grid.ts +1 -1
  135. package/packages/locale/lang/ar-EG.ts +2 -1
  136. package/packages/locale/lang/de-DE.ts +2 -1
  137. package/packages/locale/lang/en-US.ts +4 -3
  138. package/packages/locale/lang/es-ES.ts +2 -1
  139. package/packages/locale/lang/fr-FR.ts +2 -1
  140. package/packages/locale/lang/hu-HU.ts +2 -1
  141. package/packages/locale/lang/hy-AM.ts +2 -1
  142. package/packages/locale/lang/it-IT.ts +2 -1
  143. package/packages/locale/lang/ja-JP.ts +2 -1
  144. package/packages/locale/lang/ko-KR.ts +2 -1
  145. package/packages/locale/lang/nb-NO.ts +2 -1
  146. package/packages/locale/lang/pt-BR.ts +2 -1
  147. package/packages/locale/lang/ru-RU.ts +4 -3
  148. package/packages/locale/lang/th-TH.ts +2 -1
  149. package/packages/locale/lang/ug-CN.ts +2 -1
  150. package/packages/locale/lang/uk-UA.ts +518 -517
  151. package/packages/locale/lang/vi-VN.ts +2 -1
  152. package/packages/locale/lang/zh-CHT.ts +2 -1
  153. package/packages/locale/lang/zh-CN.ts +2 -1
  154. package/packages/table/module/edit/hook.ts +7 -7
  155. package/packages/table/module/export/hook.ts +118 -65
  156. package/packages/table/module/keyboard/hook.ts +59 -25
  157. package/packages/table/src/body.ts +122 -80
  158. package/packages/table/src/cell.ts +41 -63
  159. package/packages/table/src/column.ts +13 -1
  160. package/packages/table/src/columnInfo.ts +3 -0
  161. package/packages/table/src/emits.ts +5 -1
  162. package/packages/table/src/footer.ts +32 -8
  163. package/packages/table/src/header.ts +73 -158
  164. package/packages/table/src/props.ts +14 -5
  165. package/packages/table/src/table.ts +1183 -632
  166. package/packages/table/src/util.ts +81 -62
  167. package/packages/ui/index.ts +25 -10
  168. package/styles/components/table.scss +428 -290
  169. package/styles/theme/base.scss +4 -6
  170. package/styles/theme/dark.scss +1 -0
  171. package/styles/theme/light.scss +1 -0
  172. package/styles/variable.scss +1 -1
  173. /package/es/{iconfont.1736748534420.ttf → iconfont.1737526556258.ttf} +0 -0
  174. /package/es/{iconfont.1736748534420.woff → iconfont.1737526556258.woff} +0 -0
  175. /package/es/{iconfont.1736748534420.woff2 → iconfont.1737526556258.woff2} +0 -0
  176. /package/lib/{iconfont.1736748534420.ttf → iconfont.1737526556258.ttf} +0 -0
  177. /package/lib/{iconfont.1736748534420.woff → iconfont.1737526556258.woff} +0 -0
  178. /package/lib/{iconfont.1736748534420.woff2 → iconfont.1737526556258.woff2} +0 -0
@@ -118,7 +118,7 @@ export interface XEColumnInstance {
118
118
 
119
119
  export const handleFieldOrColumn = ($xeTable: VxeTableConstructor, fieldOrColumn: string | VxeTableDefines.ColumnInfo | null) => {
120
120
  if (fieldOrColumn) {
121
- return XEUtils.isString(fieldOrColumn) ? $xeTable.getColumnByField(fieldOrColumn) : fieldOrColumn
121
+ return XEUtils.isString(fieldOrColumn) || XEUtils.isNumber(fieldOrColumn) ? $xeTable.getColumnByField(`${fieldOrColumn}`) : fieldOrColumn
122
122
  }
123
123
  return null
124
124
  }
@@ -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
@@ -219,7 +226,8 @@ export function getColReMinWidth (params: {
219
226
  cell: HTMLTableCellElement;
220
227
  }) {
221
228
  const { $table, column, cell } = params
222
- const { props: tableProps } = $table
229
+ const tableProps = $table.props
230
+ const internalData = $table.internalData
223
231
  const { computeResizableOpts } = $table.getComputeMaps()
224
232
  const resizableOpts = computeResizableOpts.value
225
233
  const { minWidth: reMinWidth } = resizableOpts
@@ -230,6 +238,7 @@ export function getColReMinWidth (params: {
230
238
  return Math.max(1, XEUtils.toNumber(customMinWidth))
231
239
  }
232
240
  }
241
+ const { elemStore } = internalData
233
242
  const { showHeaderOverflow: allColumnHeaderOverflow } = tableProps
234
243
  const { showHeaderOverflow, minWidth: colMinWidth } = column
235
244
  const headOverflow = XEUtils.isUndefined(showHeaderOverflow) || XEUtils.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow
@@ -254,12 +263,10 @@ export function getColReMinWidth (params: {
254
263
  }
255
264
  // 如果设置最小宽
256
265
  if (colMinWidth) {
257
- const { refTableBody } = $table.getRefMaps()
258
- const tableBody = refTableBody.value
259
- const bodyElem = tableBody ? tableBody.$el as HTMLDivElement : null
260
- if (bodyElem) {
266
+ const bodyScrollElem = getRefElem(elemStore['main-body-scroll'])
267
+ if (bodyScrollElem) {
261
268
  if (isScale(colMinWidth)) {
262
- const bodyWidth = bodyElem.clientWidth - 1
269
+ const bodyWidth = bodyScrollElem.clientWidth - 1
263
270
  const meanWidth = bodyWidth / 100
264
271
  return Math.max(mWidth, Math.floor(XEUtils.toInteger(colMinWidth) * meanWidth))
265
272
  } else if (isPx(colMinWidth)) {
@@ -368,13 +375,33 @@ export const getOffsetSize = ($xeTable: VxeTableConstructor) => {
368
375
  }
369
376
 
370
377
  export function calcTreeLine (params: VxeTableDefines.CellRenderBodyParams, prevRow: any) {
371
- const { $table } = params
378
+ const { $table, row } = params
379
+ const tableProps = $table.props
372
380
  const tableReactData = $table.reactData
381
+ const tableInternalData = $table.internalData
382
+
383
+ const { showOverflow } = tableProps
384
+ const { scrollYLoad } = tableReactData
385
+ const { fullAllDataRowIdData } = tableInternalData
386
+ const { computeRowOpts, computeCellOpts, computeDefaultRowHeight } = $table.getComputeMaps()
387
+ const rowOpts = computeRowOpts.value
388
+ const cellOpts = computeCellOpts.value
389
+ const defaultRowHeight = computeDefaultRowHeight.value
390
+ const rowid = getRowid($table, row)
391
+ const rowRest = fullAllDataRowIdData[rowid]
392
+ const currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight
373
393
  let expandSize = 1
374
394
  if (prevRow) {
375
395
  expandSize = countTreeExpand(prevRow, params)
376
396
  }
377
- return tableReactData.rowHeight * expandSize - (prevRow ? 1 : (12 - getOffsetSize($table)))
397
+ let cellHeight = currCellHeight
398
+ const vnHeight = rowRest.height
399
+ if (scrollYLoad) {
400
+ if (!showOverflow) {
401
+ cellHeight = vnHeight || currCellHeight
402
+ }
403
+ }
404
+ return cellHeight * expandSize - (prevRow ? 1 : (12 - getOffsetSize($table)))
378
405
  }
379
406
 
380
407
  export function mergeBodyMethod (mergeList: VxeTableDefines.MergeItem[], _rowIndex: number, _columnIndex: number) {
@@ -426,28 +453,25 @@ export function clearTableAllStatus ($xeTable: VxeTableConstructor & VxeTablePri
426
453
  }
427
454
 
428
455
  export function rowToVisible ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, row: any) {
429
- const { reactData, internalData } = $xeTable
430
456
  const tableProps = $xeTable.props
457
+ const reactData = $xeTable.reactData
458
+ const internalData = $xeTable.internalData
459
+
460
+ const { computeLeftFixedWidth, computeRightFixedWidth, computeRowOpts, computeCellOpts, computeDefaultRowHeight } = $xeTable.getComputeMaps()
431
461
  const { showOverflow } = tableProps
432
- const { refTableBody } = $xeTable.getRefMaps()
433
- const { columnStore, scrollYLoad, rowHeight } = reactData
434
- const { afterFullData, fullAllDataRowIdData } = internalData
435
- const tableBody = refTableBody.value
436
- const { leftList, rightList } = columnStore
437
- const bodyElem = tableBody ? tableBody.$el as HTMLDivElement : null
462
+ const { scrollYLoad } = reactData
463
+ const { elemStore, afterFullData, fullAllDataRowIdData, isResizeCellHeight } = internalData
464
+ const rowOpts = computeRowOpts.value
465
+ const cellOpts = computeCellOpts.value
466
+ const defaultRowHeight = computeDefaultRowHeight.value
467
+ const leftFixedWidth = computeLeftFixedWidth.value
468
+ const rightFixedWidth = computeRightFixedWidth.value
469
+ const bodyScrollElem = getRefElem(elemStore['main-body-scroll'])
438
470
  const rowid = getRowid($xeTable, row)
439
- let offsetFixedLeft = 0
440
- leftList.forEach(item => {
441
- offsetFixedLeft += item.renderWidth
442
- })
443
- let offsetFixedRight = 0
444
- rightList.forEach(item => {
445
- offsetFixedRight += item.renderWidth
446
- })
447
- if (bodyElem) {
448
- const bodyHeight = bodyElem.clientHeight
449
- const bodyScrollTop = bodyElem.scrollTop
450
- const trElem: HTMLTableRowElement | null = bodyElem.querySelector(`[rowid="${rowid}"]`)
471
+ if (bodyScrollElem) {
472
+ const bodyHeight = bodyScrollElem.clientHeight
473
+ const bodyScrollTop = bodyScrollElem.scrollTop
474
+ const trElem: HTMLTableRowElement | null = bodyScrollElem.querySelector(`[rowid="${rowid}"]`)
451
475
  if (trElem) {
452
476
  const trOffsetParent = trElem.offsetParent as HTMLElement
453
477
  const trOffsetTop = trElem.offsetTop + (trOffsetParent ? trOffsetParent.offsetTop : 0)
@@ -461,25 +485,26 @@ export function rowToVisible ($xeTable: VxeTableConstructor & VxeTablePrivateMet
461
485
  } else {
462
486
  // 如果是虚拟渲染滚动
463
487
  if (scrollYLoad) {
464
- if (showOverflow) {
465
- return $xeTable.scrollTo(null, ($xeTable.findRowIndexOf(afterFullData, row) - 1) * rowHeight)
488
+ const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height
489
+ if (!isCustomCellHeight && showOverflow) {
490
+ return $xeTable.scrollTo(null, ($xeTable.findRowIndexOf(afterFullData, row) - 1) * defaultRowHeight)
466
491
  }
467
492
  let scrollTop = 0
468
- const rowRest = fullAllDataRowIdData[rowid]
469
- const rHeight = rowRest ? (rowRest.height || rowHeight) : rowHeight
493
+ const rowRest = fullAllDataRowIdData[rowid] || {}
494
+ const rHeight = rowRest ? (rowRest.resizeHeight || cellOpts.height || rowOpts.height || defaultRowHeight) : defaultRowHeight
470
495
  for (let i = 0; i < afterFullData.length; i++) {
471
496
  const currRow = afterFullData[i]
472
497
  const currRowid = getRowid($xeTable, currRow)
473
498
  if (currRow === row || currRowid === rowid) {
474
499
  break
475
500
  }
476
- const rowRest = fullAllDataRowIdData[currRowid]
477
- scrollTop += rowRest ? (rowRest.height || rowHeight) : rowHeight
501
+ const currRowRest = fullAllDataRowIdData[currRowid] || {}
502
+ scrollTop += currRowRest.resizeHeight || currRowRest.height || cellOpts.height || rowOpts.height || defaultRowHeight
478
503
  }
479
504
  if (scrollTop < bodyScrollTop) {
480
- return $xeTable.scrollTo(null, scrollTop - offsetFixedLeft - 1)
505
+ return $xeTable.scrollTo(null, scrollTop - leftFixedWidth - 1)
481
506
  }
482
- return $xeTable.scrollTo(null, (scrollTop + rHeight) - (bodyHeight - offsetFixedRight - 1))
507
+ return $xeTable.scrollTo(null, (scrollTop + rHeight) - (bodyHeight - rightFixedWidth - 1))
483
508
  }
484
509
  }
485
510
  }
@@ -487,44 +512,38 @@ export function rowToVisible ($xeTable: VxeTableConstructor & VxeTablePrivateMet
487
512
  }
488
513
 
489
514
  export function colToVisible ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, column: VxeTableDefines.ColumnInfo, row?: any) {
490
- const { reactData, internalData } = $xeTable
491
- const { refTableBody } = $xeTable.getRefMaps()
492
- const { columnStore, scrollXLoad } = reactData
493
- const { visibleColumn } = internalData
494
- const { leftList, rightList } = columnStore
495
- const tableBody = refTableBody.value
496
- const bodyElem = tableBody ? tableBody.$el as HTMLDivElement : null
515
+ const reactData = $xeTable.reactData
516
+ const internalData = $xeTable.internalData
517
+
518
+ const { computeLeftFixedWidth, computeRightFixedWidth } = $xeTable.getComputeMaps()
519
+ const { scrollXLoad } = reactData
520
+ const { elemStore, visibleColumn } = internalData
521
+ const leftFixedWidth = computeLeftFixedWidth.value
522
+ const rightFixedWidth = computeRightFixedWidth.value
523
+ const bodyScrollElem = getRefElem(elemStore['main-body-scroll'])
497
524
  if (column.fixed) {
498
525
  return Promise.resolve()
499
526
  }
500
- let offsetFixedLeft = 0
501
- leftList.forEach(item => {
502
- offsetFixedLeft += item.renderWidth
503
- })
504
- let offsetFixedRight = 0
505
- rightList.forEach(item => {
506
- offsetFixedRight += item.renderWidth
507
- })
508
- if (bodyElem) {
509
- const bodyWidth = bodyElem.clientWidth
510
- const bodyScrollLeft = bodyElem.scrollLeft
527
+ if (bodyScrollElem) {
528
+ const bodyWidth = bodyScrollElem.clientWidth
529
+ const bodyScrollLeft = bodyScrollElem.scrollLeft
511
530
  let tdElem: HTMLTableCellElement | null = null
512
531
  if (row) {
513
532
  const rowid = getRowid($xeTable, row)
514
- tdElem = bodyElem.querySelector(`[rowid="${rowid}"] .${column.id}`)
533
+ tdElem = bodyScrollElem.querySelector(`[rowid="${rowid}"] .${column.id}`)
515
534
  }
516
535
  if (!tdElem) {
517
- tdElem = bodyElem.querySelector(`.${column.id}`)
536
+ tdElem = bodyScrollElem.querySelector(`.${column.id}`)
518
537
  }
519
538
  if (tdElem) {
520
539
  const tdOffsetParent = tdElem.offsetParent as HTMLElement
521
540
  const tdOffsetLeft = tdElem.offsetLeft + (tdOffsetParent ? tdOffsetParent.offsetLeft : 0)
522
541
  const cellWidth = tdElem.clientWidth
523
542
  // 检测是否在可视区中
524
- if (tdOffsetLeft < (bodyScrollLeft + offsetFixedLeft)) {
525
- return $xeTable.scrollTo(tdOffsetLeft - offsetFixedLeft - 1)
526
- } else if ((tdOffsetLeft + cellWidth - bodyScrollLeft) > (bodyWidth - offsetFixedRight)) {
527
- return $xeTable.scrollTo((tdOffsetLeft + cellWidth) - (bodyWidth - offsetFixedRight - 1))
543
+ if (tdOffsetLeft < (bodyScrollLeft + leftFixedWidth)) {
544
+ return $xeTable.scrollTo(tdOffsetLeft - leftFixedWidth - 1)
545
+ } else if ((tdOffsetLeft + cellWidth - bodyScrollLeft) > (bodyWidth - rightFixedWidth)) {
546
+ return $xeTable.scrollTo((tdOffsetLeft + cellWidth) - (bodyWidth - rightFixedWidth - 1))
528
547
  }
529
548
  } else {
530
549
  // 检测是否在虚拟渲染可视区中
@@ -539,9 +558,9 @@ export function colToVisible ($xeTable: VxeTableConstructor & VxeTablePrivateMet
539
558
  scrollLeft += currCol.renderWidth
540
559
  }
541
560
  if (scrollLeft < bodyScrollLeft) {
542
- return $xeTable.scrollTo(scrollLeft - offsetFixedLeft - 1)
561
+ return $xeTable.scrollTo(scrollLeft - leftFixedWidth - 1)
543
562
  }
544
- return $xeTable.scrollTo((scrollLeft + cellWidth) - (bodyWidth - offsetFixedRight - 1))
563
+ return $xeTable.scrollTo((scrollLeft + cellWidth) - (bodyWidth - rightFixedWidth - 1))
545
564
  }
546
565
  }
547
566
  }
@@ -17,7 +17,6 @@ VxeUI.setConfig({
17
17
  animat: true,
18
18
  delayHover: 250,
19
19
  autoResize: true,
20
- padding: true,
21
20
  minHeight: 144,
22
21
  // keepSource: false,
23
22
  // showOverflow: null,
@@ -41,7 +40,10 @@ VxeUI.setConfig({
41
40
  },
42
41
  resizableConfig: {
43
42
  dragMode: 'auto',
44
- showDragTip: true
43
+ showDragTip: true,
44
+ isSyncAutoHeight: true,
45
+ isSyncAutoWidth: true,
46
+ minHeight: 18
45
47
  },
46
48
  radioConfig: {
47
49
  // trigger: 'default'
@@ -75,6 +77,15 @@ VxeUI.setConfig({
75
77
  columnConfig: {
76
78
  maxFixedSize: 4
77
79
  },
80
+ cellConfig: {
81
+ padding: true
82
+ },
83
+ headerCellConfig: {
84
+ height: 'unset'
85
+ },
86
+ footerCellConfig: {
87
+ height: 'unset'
88
+ },
78
89
  // menuConfig: {
79
90
  // visibleMethod () {}
80
91
  // },
@@ -108,6 +119,8 @@ VxeUI.setConfig({
108
119
  // orders: ['asc', 'desc', null],
109
120
  // sortMethod: null,
110
121
  showIcon: true,
122
+ allowClear: true,
123
+ allowBtn: true,
111
124
  iconLayout: 'vertical'
112
125
  },
113
126
  filterConfig: {
@@ -180,18 +193,20 @@ VxeUI.setConfig({
180
193
  isReplace: true
181
194
  },
182
195
  virtualXConfig: {
183
- // enabled: false,
184
- gt: 60
185
- // oSize: 0
196
+ enabled: true,
197
+ gt: 60,
198
+ preSize: 0,
199
+ oSize: 1
186
200
  },
187
201
  virtualYConfig: {
188
- // enabled: false,
189
- gt: 100
190
- // oSize: 0
202
+ enabled: true,
203
+ gt: 100,
204
+ preSize: 1,
205
+ oSize: 2
191
206
  },
192
207
  scrollbarConfig: {
193
- width: 10,
194
- height: 10
208
+ // width: 0,
209
+ // height: 0
195
210
  }
196
211
  },
197
212
  // export: {