vxe-table 3.16.0-beta.4 → 3.16.0-beta.6

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 (147) hide show
  1. package/es/grid/src/grid.js +2 -2
  2. package/es/locale/lang/ar-EG.js +2 -1
  3. package/es/locale/lang/de-DE.js +2 -1
  4. package/es/locale/lang/en-US.js +2 -1
  5. package/es/locale/lang/es-ES.js +2 -1
  6. package/es/locale/lang/fr-FR.js +2 -1
  7. package/es/locale/lang/hu-HU.js +2 -1
  8. package/es/locale/lang/hy-AM.js +2 -1
  9. package/es/locale/lang/id-ID.js +2 -1
  10. package/es/locale/lang/it-IT.js +2 -1
  11. package/es/locale/lang/ja-JP.js +2 -1
  12. package/es/locale/lang/ko-KR.js +2 -1
  13. package/es/locale/lang/ms-MY.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 +2 -1
  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 +2 -1
  20. package/es/locale/lang/uz-UZ.js +2 -1
  21. package/es/locale/lang/vi-VN.js +2 -1
  22. package/es/locale/lang/zh-CHT.js +2 -1
  23. package/es/locale/lang/zh-CN.js +2 -1
  24. package/es/style.css +1 -1
  25. package/es/table/src/body.js +2 -2
  26. package/es/table/src/methods.js +7 -8
  27. package/es/table/src/table.js +11 -11
  28. package/es/table/src/util.js +5 -1
  29. package/es/ui/index.js +1 -1
  30. package/es/ui/src/log.js +1 -1
  31. package/lib/grid/src/grid.js +2 -2
  32. package/lib/grid/src/grid.min.js +1 -1
  33. package/lib/index.umd.js +34 -27
  34. package/lib/index.umd.min.js +1 -1
  35. package/lib/locale/lang/ar-EG.js +2 -1
  36. package/lib/locale/lang/ar-EG.min.js +1 -1
  37. package/lib/locale/lang/ar-EG.umd.js +2 -1
  38. package/lib/locale/lang/de-DE.js +2 -1
  39. package/lib/locale/lang/de-DE.min.js +1 -1
  40. package/lib/locale/lang/de-DE.umd.js +2 -1
  41. package/lib/locale/lang/en-US.js +2 -1
  42. package/lib/locale/lang/en-US.min.js +1 -1
  43. package/lib/locale/lang/en-US.umd.js +2 -1
  44. package/lib/locale/lang/es-ES.js +2 -1
  45. package/lib/locale/lang/es-ES.min.js +1 -1
  46. package/lib/locale/lang/es-ES.umd.js +2 -1
  47. package/lib/locale/lang/fr-FR.js +2 -1
  48. package/lib/locale/lang/fr-FR.min.js +1 -1
  49. package/lib/locale/lang/fr-FR.umd.js +2 -1
  50. package/lib/locale/lang/hu-HU.js +2 -1
  51. package/lib/locale/lang/hu-HU.min.js +1 -1
  52. package/lib/locale/lang/hu-HU.umd.js +2 -1
  53. package/lib/locale/lang/hy-AM.js +2 -1
  54. package/lib/locale/lang/hy-AM.min.js +1 -1
  55. package/lib/locale/lang/hy-AM.umd.js +2 -1
  56. package/lib/locale/lang/id-ID.js +2 -1
  57. package/lib/locale/lang/id-ID.min.js +1 -1
  58. package/lib/locale/lang/id-ID.umd.js +2 -1
  59. package/lib/locale/lang/it-IT.js +2 -1
  60. package/lib/locale/lang/it-IT.min.js +1 -1
  61. package/lib/locale/lang/it-IT.umd.js +2 -1
  62. package/lib/locale/lang/ja-JP.js +2 -1
  63. package/lib/locale/lang/ja-JP.min.js +1 -1
  64. package/lib/locale/lang/ja-JP.umd.js +2 -1
  65. package/lib/locale/lang/ko-KR.js +2 -1
  66. package/lib/locale/lang/ko-KR.min.js +1 -1
  67. package/lib/locale/lang/ko-KR.umd.js +2 -1
  68. package/lib/locale/lang/ms-MY.js +2 -1
  69. package/lib/locale/lang/ms-MY.min.js +1 -1
  70. package/lib/locale/lang/ms-MY.umd.js +2 -1
  71. package/lib/locale/lang/nb-NO.js +2 -1
  72. package/lib/locale/lang/nb-NO.min.js +1 -1
  73. package/lib/locale/lang/nb-NO.umd.js +2 -1
  74. package/lib/locale/lang/pt-BR.js +2 -1
  75. package/lib/locale/lang/pt-BR.min.js +1 -1
  76. package/lib/locale/lang/pt-BR.umd.js +2 -1
  77. package/lib/locale/lang/ru-RU.js +2 -1
  78. package/lib/locale/lang/ru-RU.min.js +1 -1
  79. package/lib/locale/lang/ru-RU.umd.js +2 -1
  80. package/lib/locale/lang/th-TH.js +2 -1
  81. package/lib/locale/lang/th-TH.min.js +1 -1
  82. package/lib/locale/lang/th-TH.umd.js +2 -1
  83. package/lib/locale/lang/ug-CN.js +2 -1
  84. package/lib/locale/lang/ug-CN.min.js +1 -1
  85. package/lib/locale/lang/ug-CN.umd.js +2 -1
  86. package/lib/locale/lang/uk-UA.js +2 -1
  87. package/lib/locale/lang/uk-UA.min.js +1 -1
  88. package/lib/locale/lang/uk-UA.umd.js +2 -1
  89. package/lib/locale/lang/uz-UZ.js +2 -1
  90. package/lib/locale/lang/uz-UZ.min.js +1 -1
  91. package/lib/locale/lang/uz-UZ.umd.js +2 -1
  92. package/lib/locale/lang/vi-VN.js +2 -1
  93. package/lib/locale/lang/vi-VN.min.js +1 -1
  94. package/lib/locale/lang/vi-VN.umd.js +2 -1
  95. package/lib/locale/lang/zh-CHT.js +2 -1
  96. package/lib/locale/lang/zh-CHT.min.js +1 -1
  97. package/lib/locale/lang/zh-CHT.umd.js +2 -1
  98. package/lib/locale/lang/zh-CN.js +2 -1
  99. package/lib/locale/lang/zh-CN.min.js +1 -1
  100. package/lib/locale/lang/zh-CN.umd.js +2 -1
  101. package/lib/style.css +1 -1
  102. package/lib/table/src/body.js +1 -2
  103. package/lib/table/src/body.min.js +1 -1
  104. package/lib/table/src/methods.js +7 -8
  105. package/lib/table/src/methods.min.js +1 -1
  106. package/lib/table/src/table.js +11 -11
  107. package/lib/table/src/table.min.js +1 -1
  108. package/lib/table/src/util.js +9 -1
  109. package/lib/table/src/util.min.js +1 -1
  110. package/lib/ui/index.js +1 -1
  111. package/lib/ui/index.min.js +1 -1
  112. package/lib/ui/src/log.js +1 -1
  113. package/lib/ui/src/log.min.js +1 -1
  114. package/package.json +1 -1
  115. package/packages/grid/src/grid.ts +2 -2
  116. package/packages/locale/lang/ar-EG.ts +2 -1
  117. package/packages/locale/lang/de-DE.ts +2 -1
  118. package/packages/locale/lang/en-US.ts +2 -1
  119. package/packages/locale/lang/es-ES.ts +2 -1
  120. package/packages/locale/lang/fr-FR.ts +2 -1
  121. package/packages/locale/lang/hu-HU.ts +2 -1
  122. package/packages/locale/lang/hy-AM.ts +2 -1
  123. package/packages/locale/lang/id-ID.ts +2 -1
  124. package/packages/locale/lang/it-IT.ts +2 -1
  125. package/packages/locale/lang/ja-JP.ts +2 -1
  126. package/packages/locale/lang/ko-KR.ts +2 -1
  127. package/packages/locale/lang/ms-MY.ts +2 -1
  128. package/packages/locale/lang/nb-NO.ts +2 -1
  129. package/packages/locale/lang/pt-BR.ts +2 -1
  130. package/packages/locale/lang/ru-RU.ts +2 -1
  131. package/packages/locale/lang/th-TH.ts +2 -1
  132. package/packages/locale/lang/ug-CN.ts +2 -1
  133. package/packages/locale/lang/uk-UA.ts +2 -1
  134. package/packages/locale/lang/uz-UZ.ts +2 -1
  135. package/packages/locale/lang/vi-VN.ts +2 -1
  136. package/packages/locale/lang/zh-CHT.ts +2 -1
  137. package/packages/locale/lang/zh-CN.ts +2 -1
  138. package/packages/table/src/body.ts +2 -2
  139. package/packages/table/src/methods.ts +7 -8
  140. package/packages/table/src/table.ts +13 -11
  141. package/packages/table/src/util.ts +5 -1
  142. /package/es/{iconfont.1751277461257.ttf → iconfont.1751422257699.ttf} +0 -0
  143. /package/es/{iconfont.1751277461257.woff → iconfont.1751422257699.woff} +0 -0
  144. /package/es/{iconfont.1751277461257.woff2 → iconfont.1751422257699.woff2} +0 -0
  145. /package/lib/{iconfont.1751277461257.ttf → iconfont.1751422257699.ttf} +0 -0
  146. /package/lib/{iconfont.1751277461257.woff → iconfont.1751422257699.woff} +0 -0
  147. /package/lib/{iconfont.1751277461257.woff2 → iconfont.1751422257699.woff2} +0 -0
@@ -355,7 +355,8 @@ export default {
355
355
  colorPicker: {
356
356
  clear: 'Aniq',
357
357
  confirm: 'tasdiqlamoq',
358
- copySuccess: "Clipboardga nusxa ko'chirish: {0}"
358
+ copySuccess: "Clipboardga nusxa ko'chirish: {0}",
359
+ hex: 'HEX'
359
360
  },
360
361
  formDesign: {
361
362
  formName: 'Forma nomi',
@@ -355,7 +355,8 @@ export default {
355
355
  colorPicker: {
356
356
  clear: 'Thông thoáng',
357
357
  confirm: 'xác nhận',
358
- copySuccess: 'Được sao chép vào bảng tạm: {0}'
358
+ copySuccess: 'Được sao chép vào bảng tạm: {0}',
359
+ hex: 'HEX'
359
360
  },
360
361
  formDesign: {
361
362
  formName: 'Tên hình thức',
@@ -355,7 +355,8 @@ export default {
355
355
  colorPicker: {
356
356
  clear: '清除',
357
357
  confirm: '確認',
358
- copySuccess: '已復製到剪貼板:{0}'
358
+ copySuccess: '已復製到剪貼板:{0}',
359
+ hex: '十六进制'
359
360
  },
360
361
  formDesign: {
361
362
  formName: '表單名稱',
@@ -355,7 +355,8 @@ export default {
355
355
  colorPicker: {
356
356
  clear: '清除',
357
357
  confirm: '确认',
358
- copySuccess: '已复制到剪贴板:{0}'
358
+ copySuccess: '已复制到剪贴板:{0}',
359
+ hex: '十六进制'
359
360
  },
360
361
  formDesign: {
361
362
  formName: '表单名称',
@@ -26,7 +26,7 @@ function renderLine (h: CreateElement, $xeTable : VxeTableConstructor & VxeTable
26
26
  const tableProps = $xeTable
27
27
  const tableInternalData = $xeTable as unknown as TableInternalData
28
28
 
29
- const { row, column } = params
29
+ const { column } = params
30
30
  const { afterFullData } = tableInternalData
31
31
  const { treeConfig } = tableProps
32
32
  const treeOpts = $xeTable.computeTreeOpts
@@ -51,7 +51,7 @@ function renderLine (h: CreateElement, $xeTable : VxeTableConstructor & VxeTable
51
51
  h('div', {
52
52
  class: 'vxe-tree--line',
53
53
  style: {
54
- height: `${$xeTable.eqRow(afterFullData[0], row) ? 1 : calcTreeLine(params, prevRow)}px`,
54
+ height: `${getRowid($xeTable, afterFullData[0]) === rowid ? 1 : calcTreeLine(params, prevRow)}px`,
55
55
  bottom: `-${Math.floor(cellHeight / 2)}px`,
56
56
  left: `${(rLevel * treeOpts.indent) + (rLevel ? 2 - getOffsetSize($xeTable) : 0) + 16}px`
57
57
  }
@@ -2740,7 +2740,7 @@ function handleLazyRecalculate ($xeTable: VxeTableConstructor & VxeTablePrivateM
2740
2740
  clearTimeout(rceTimeout)
2741
2741
  if (rceRunTime && rceRunTime + (refreshDelay - 5) < Date.now()) {
2742
2742
  resolve(
2743
- handleRecalculateStyle($xeTable, !!reFull, reWidth, reHeight)
2743
+ handleRecalculateStyle($xeTable, reFull, reWidth, reHeight)
2744
2744
  )
2745
2745
  } else {
2746
2746
  $xeTable.$nextTick(() => {
@@ -2749,12 +2749,12 @@ function handleLazyRecalculate ($xeTable: VxeTableConstructor & VxeTablePrivateM
2749
2749
  }
2750
2750
  } else {
2751
2751
  resolve(
2752
- handleRecalculateStyle($xeTable, !!reFull, reWidth, reHeight)
2752
+ handleRecalculateStyle($xeTable, reFull, reWidth, reHeight)
2753
2753
  )
2754
2754
  }
2755
2755
  internalData.rceTimeout = setTimeout(() => {
2756
2756
  internalData.rceTimeout = undefined
2757
- handleRecalculateStyle($xeTable, !!reFull, reWidth, reHeight)
2757
+ handleRecalculateStyle($xeTable, reFull, reWidth, reHeight)
2758
2758
  }, refreshDelay)
2759
2759
  })
2760
2760
  }
@@ -3052,9 +3052,8 @@ function loadTableData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods,
3052
3052
  $xeTable.$nextTick()
3053
3053
  .then(() => handleRecalculateStyle($xeTable, false, false, false))
3054
3054
  .then(() => {
3055
- calcCellHeight($xeTable)
3055
+ handleRecalculateStyle($xeTable, false, true, true)
3056
3056
  updateRowOffsetTop($xeTable)
3057
- return handleRecalculateStyle($xeTable, false, false, false)
3058
3057
  })
3059
3058
  .then(() => {
3060
3059
  let targetScrollLeft = lastScrollLeft
@@ -3074,7 +3073,7 @@ function loadTableData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods,
3074
3073
  if (oldScrollYLoad === sYLoad) {
3075
3074
  restoreScrollLocation($xeTable, targetScrollLeft, targetScrollTop)
3076
3075
  .then(() => {
3077
- calcCellHeight($xeTable)
3076
+ handleRecalculateStyle($xeTable, false, true, true)
3078
3077
  updateRowOffsetTop($xeTable)
3079
3078
  resolve()
3080
3079
  })
@@ -3082,7 +3081,7 @@ function loadTableData ($xeTable: VxeTableConstructor & VxeTablePrivateMethods,
3082
3081
  setTimeout(() => {
3083
3082
  restoreScrollLocation($xeTable, targetScrollLeft, targetScrollTop)
3084
3083
  .then(() => {
3085
- calcCellHeight($xeTable)
3084
+ handleRecalculateStyle($xeTable, false, true, true)
3086
3085
  updateRowOffsetTop($xeTable)
3087
3086
  resolve()
3088
3087
  })
@@ -3355,7 +3354,7 @@ function handleColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, c
3355
3354
  $xeTable.handleUpdateCustomColumn()
3356
3355
  }
3357
3356
  reactData.isColLoading = false
3358
- return $xeTable.recalculate()
3357
+ return handleLazyRecalculate($xeTable, false, true, true)
3359
3358
  })
3360
3359
  })
3361
3360
  }
@@ -1828,6 +1828,7 @@ export default {
1828
1828
  this.handleInitDefaults()
1829
1829
  this.updateStyle()
1830
1830
  })
1831
+
1831
1832
  globalEvents.on($xeTable, 'paste', this.handleGlobalPasteEvent)
1832
1833
  globalEvents.on($xeTable, 'copy', this.handleGlobalCopyEvent)
1833
1834
  globalEvents.on($xeTable, 'cut', this.handleGlobalCutEvent)
@@ -1897,17 +1898,18 @@ export default {
1897
1898
  errLog('vxe.error.reqComp', ['vxe-tooltip'])
1898
1899
  }
1899
1900
  }
1901
+
1902
+ if (this.autoResize) {
1903
+ const resizeObserver = globalResize.create(() => {
1904
+ if (this.autoResize) {
1905
+ this.recalculate(true)
1906
+ }
1907
+ })
1908
+ resizeObserver.observe(this.$el)
1909
+ resizeObserver.observe(this.getParentElem())
1910
+ this.$resize = resizeObserver
1911
+ }
1900
1912
  })
1901
- if (this.autoResize) {
1902
- const resizeObserver = globalResize.create(() => {
1903
- if (this.autoResize) {
1904
- this.recalculate(true)
1905
- }
1906
- })
1907
- resizeObserver.observe(this.$el)
1908
- resizeObserver.observe(this.getParentElem())
1909
- this.$resize = resizeObserver
1910
- }
1911
1913
 
1912
1914
  if (virtualYOpts.mode !== 'scroll') {
1913
1915
  const tableViewportEl = $xeTable.$refs.refTableViewportElem as HTMLDivElement
@@ -1916,7 +1918,7 @@ export default {
1916
1918
  }
1917
1919
  }
1918
1920
 
1919
- this.preventEvent(null, 'mounted')
1921
+ $xeTable.preventEvent(null, 'mounted')
1920
1922
  },
1921
1923
  activated () {
1922
1924
  this.recalculate().then(() => this.refreshScroll())
@@ -342,11 +342,15 @@ function countTreeExpand (prevRow: any, params: VxeTableDefines.CellRenderBodyPa
342
342
  return count
343
343
  }
344
344
  const { $table } = params
345
+ const reactData = $table as unknown as TableReactData
346
+ const { treeExpandedFlag } = reactData
347
+ const internalData = $table as unknown as TableInternalData
348
+ const { treeExpandedMaps } = internalData
345
349
  const treeOpts = $table.computeTreeOpts
346
350
  const { transform, mapChildrenField } = treeOpts
347
351
  const childrenField = treeOpts.children || treeOpts.childrenField
348
352
  const rowChildren = prevRow[transform ? mapChildrenField : childrenField]
349
- if (rowChildren && $table.isTreeExpandByRow(prevRow)) {
353
+ if (rowChildren && treeExpandedFlag && treeExpandedMaps[getRowid($table, prevRow)]) {
350
354
  for (let index = 0; index < rowChildren.length; index++) {
351
355
  count += countTreeExpand(rowChildren[index], params)
352
356
  }