vxe-table 4.17.17 → 4.17.19

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 (158) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/locale/lang/ar-EG.js +29 -2
  4. package/es/locale/lang/de-DE.js +29 -2
  5. package/es/locale/lang/en-US.js +33 -6
  6. package/es/locale/lang/es-ES.js +29 -2
  7. package/es/locale/lang/fr-FR.js +29 -2
  8. package/es/locale/lang/hu-HU.js +29 -2
  9. package/es/locale/lang/hy-AM.js +29 -2
  10. package/es/locale/lang/id-ID.js +29 -2
  11. package/es/locale/lang/it-IT.js +29 -2
  12. package/es/locale/lang/ja-JP.js +29 -2
  13. package/es/locale/lang/ko-KR.js +29 -2
  14. package/es/locale/lang/ms-MY.js +29 -2
  15. package/es/locale/lang/nb-NO.js +29 -2
  16. package/es/locale/lang/pt-BR.js +29 -2
  17. package/es/locale/lang/ru-RU.js +29 -2
  18. package/es/locale/lang/th-TH.js +29 -2
  19. package/es/locale/lang/ug-CN.js +29 -2
  20. package/es/locale/lang/uk-UA.js +29 -2
  21. package/es/locale/lang/uz-UZ.js +29 -2
  22. package/es/locale/lang/vi-VN.js +29 -2
  23. package/es/locale/lang/zh-CHT.js +31 -4
  24. package/es/locale/lang/zh-CN.js +31 -4
  25. package/es/style.css +1 -1
  26. package/es/style.min.css +1 -1
  27. package/es/table/module/menu/hook.js +1 -1
  28. package/es/table/src/header.js +6 -22
  29. package/es/table/src/table.js +2 -1
  30. package/es/table/style.css +2 -1
  31. package/es/table/style.min.css +1 -1
  32. package/es/ui/index.js +1 -1
  33. package/es/ui/src/dom.js +2 -2
  34. package/es/ui/src/log.js +1 -1
  35. package/es/vxe-table/style.css +2 -1
  36. package/es/vxe-table/style.min.css +1 -1
  37. package/lib/index.css +1 -1
  38. package/lib/index.min.css +1 -1
  39. package/lib/index.umd.js +43 -36
  40. package/lib/index.umd.min.js +1 -1
  41. package/lib/locale/lang/ar-EG.js +29 -2
  42. package/lib/locale/lang/ar-EG.min.js +1 -1
  43. package/lib/locale/lang/ar-EG.umd.js +29 -2
  44. package/lib/locale/lang/de-DE.js +29 -2
  45. package/lib/locale/lang/de-DE.min.js +1 -1
  46. package/lib/locale/lang/de-DE.umd.js +29 -2
  47. package/lib/locale/lang/en-US.js +33 -6
  48. package/lib/locale/lang/en-US.min.js +1 -1
  49. package/lib/locale/lang/en-US.umd.js +33 -6
  50. package/lib/locale/lang/es-ES.js +29 -2
  51. package/lib/locale/lang/es-ES.min.js +1 -1
  52. package/lib/locale/lang/es-ES.umd.js +29 -2
  53. package/lib/locale/lang/fr-FR.js +29 -2
  54. package/lib/locale/lang/fr-FR.min.js +1 -1
  55. package/lib/locale/lang/fr-FR.umd.js +29 -2
  56. package/lib/locale/lang/hu-HU.js +29 -2
  57. package/lib/locale/lang/hu-HU.min.js +1 -1
  58. package/lib/locale/lang/hu-HU.umd.js +29 -2
  59. package/lib/locale/lang/hy-AM.js +29 -2
  60. package/lib/locale/lang/hy-AM.min.js +1 -1
  61. package/lib/locale/lang/hy-AM.umd.js +29 -2
  62. package/lib/locale/lang/id-ID.js +29 -2
  63. package/lib/locale/lang/id-ID.min.js +1 -1
  64. package/lib/locale/lang/id-ID.umd.js +29 -2
  65. package/lib/locale/lang/it-IT.js +29 -2
  66. package/lib/locale/lang/it-IT.min.js +1 -1
  67. package/lib/locale/lang/it-IT.umd.js +29 -2
  68. package/lib/locale/lang/ja-JP.js +29 -2
  69. package/lib/locale/lang/ja-JP.min.js +1 -1
  70. package/lib/locale/lang/ja-JP.umd.js +29 -2
  71. package/lib/locale/lang/ko-KR.js +29 -2
  72. package/lib/locale/lang/ko-KR.min.js +1 -1
  73. package/lib/locale/lang/ko-KR.umd.js +29 -2
  74. package/lib/locale/lang/ms-MY.js +29 -2
  75. package/lib/locale/lang/ms-MY.min.js +1 -1
  76. package/lib/locale/lang/ms-MY.umd.js +29 -2
  77. package/lib/locale/lang/nb-NO.js +29 -2
  78. package/lib/locale/lang/nb-NO.min.js +1 -1
  79. package/lib/locale/lang/nb-NO.umd.js +29 -2
  80. package/lib/locale/lang/pt-BR.js +29 -2
  81. package/lib/locale/lang/pt-BR.min.js +1 -1
  82. package/lib/locale/lang/pt-BR.umd.js +29 -2
  83. package/lib/locale/lang/ru-RU.js +29 -2
  84. package/lib/locale/lang/ru-RU.min.js +1 -1
  85. package/lib/locale/lang/ru-RU.umd.js +29 -2
  86. package/lib/locale/lang/th-TH.js +29 -2
  87. package/lib/locale/lang/th-TH.min.js +1 -1
  88. package/lib/locale/lang/th-TH.umd.js +29 -2
  89. package/lib/locale/lang/ug-CN.js +29 -2
  90. package/lib/locale/lang/ug-CN.min.js +1 -1
  91. package/lib/locale/lang/ug-CN.umd.js +29 -2
  92. package/lib/locale/lang/uk-UA.js +29 -2
  93. package/lib/locale/lang/uk-UA.min.js +1 -1
  94. package/lib/locale/lang/uk-UA.umd.js +29 -2
  95. package/lib/locale/lang/uz-UZ.js +29 -2
  96. package/lib/locale/lang/uz-UZ.min.js +1 -1
  97. package/lib/locale/lang/uz-UZ.umd.js +29 -2
  98. package/lib/locale/lang/vi-VN.js +29 -2
  99. package/lib/locale/lang/vi-VN.min.js +1 -1
  100. package/lib/locale/lang/vi-VN.umd.js +29 -2
  101. package/lib/locale/lang/zh-CHT.js +31 -4
  102. package/lib/locale/lang/zh-CHT.min.js +1 -1
  103. package/lib/locale/lang/zh-CHT.umd.js +31 -4
  104. package/lib/locale/lang/zh-CN.js +31 -4
  105. package/lib/locale/lang/zh-CN.min.js +1 -1
  106. package/lib/locale/lang/zh-CN.umd.js +31 -4
  107. package/lib/style.css +1 -1
  108. package/lib/style.min.css +1 -1
  109. package/lib/table/module/menu/hook.js +1 -1
  110. package/lib/table/module/menu/hook.min.js +1 -1
  111. package/lib/table/src/header.js +6 -26
  112. package/lib/table/src/header.min.js +1 -1
  113. package/lib/table/src/table.js +1 -1
  114. package/lib/table/src/table.min.js +1 -1
  115. package/lib/table/style/style.css +2 -1
  116. package/lib/table/style/style.min.css +1 -1
  117. package/lib/ui/index.js +1 -1
  118. package/lib/ui/index.min.js +1 -1
  119. package/lib/ui/src/dom.js +2 -2
  120. package/lib/ui/src/dom.min.js +1 -1
  121. package/lib/ui/src/log.js +1 -1
  122. package/lib/ui/src/log.min.js +1 -1
  123. package/lib/vxe-table/style/style.css +2 -1
  124. package/lib/vxe-table/style/style.min.css +1 -1
  125. package/package.json +1 -1
  126. package/packages/locale/lang/ar-EG.ts +29 -2
  127. package/packages/locale/lang/de-DE.ts +29 -2
  128. package/packages/locale/lang/en-US.ts +33 -6
  129. package/packages/locale/lang/es-ES.ts +29 -2
  130. package/packages/locale/lang/fr-FR.ts +29 -2
  131. package/packages/locale/lang/hu-HU.ts +29 -2
  132. package/packages/locale/lang/hy-AM.ts +29 -2
  133. package/packages/locale/lang/id-ID.ts +29 -2
  134. package/packages/locale/lang/it-IT.ts +29 -2
  135. package/packages/locale/lang/ja-JP.ts +29 -2
  136. package/packages/locale/lang/ko-KR.ts +29 -2
  137. package/packages/locale/lang/ms-MY.ts +29 -2
  138. package/packages/locale/lang/nb-NO.ts +29 -2
  139. package/packages/locale/lang/pt-BR.ts +29 -2
  140. package/packages/locale/lang/ru-RU.ts +29 -2
  141. package/packages/locale/lang/th-TH.ts +29 -2
  142. package/packages/locale/lang/ug-CN.ts +29 -2
  143. package/packages/locale/lang/uk-UA.ts +29 -2
  144. package/packages/locale/lang/uz-UZ.ts +29 -2
  145. package/packages/locale/lang/vi-VN.ts +29 -2
  146. package/packages/locale/lang/zh-CHT.ts +31 -4
  147. package/packages/locale/lang/zh-CN.ts +31 -4
  148. package/packages/table/module/menu/hook.ts +1 -1
  149. package/packages/table/src/header.ts +6 -24
  150. package/packages/table/src/table.ts +2 -1
  151. package/packages/ui/src/dom.ts +2 -2
  152. package/styles/components/table.scss +2 -1
  153. /package/es/{iconfont.1763515386491.ttf → iconfont.1764038290918.ttf} +0 -0
  154. /package/es/{iconfont.1763515386491.woff → iconfont.1764038290918.woff} +0 -0
  155. /package/es/{iconfont.1763515386491.woff2 → iconfont.1764038290918.woff2} +0 -0
  156. /package/lib/{iconfont.1763515386491.ttf → iconfont.1764038290918.ttf} +0 -0
  157. /package/lib/{iconfont.1763515386491.woff → iconfont.1764038290918.woff} +0 -0
  158. /package/lib/{iconfont.1763515386491.woff2 → iconfont.1764038290918.woff2} +0 -0
@@ -232,7 +232,7 @@ hooks.add('tableMenuModule', {
232
232
  handleOpenMenuEvent(evnt, layout, params)
233
233
  $xeTable.dispatchEvent(eventType, params, evnt)
234
234
  return
235
- } else if (getEventTargetNode(evnt, el, `vxe-table--${layout}-wrapper`, target => target.getAttribute('xid') === xID).flag) {
235
+ } else if (getEventTargetNode(evnt, el, `vxe-table--${layout}-wrapper`, target => target.getAttribute('xid') === xID).flag || (layout === 'body' && getEventTargetNode(evnt, el, 'vxe-table--empty-place-wrapper', target => target.getAttribute('xid') === xID).flag)) {
236
236
  if (menuOpts.trigger === 'cell') {
237
237
  evnt.preventDefault()
238
238
  } else {
@@ -13,22 +13,6 @@ const { renderer, renderEmptyElement } = VxeUI
13
13
  const sourceType = 'table'
14
14
  const renderType = 'header'
15
15
 
16
- function getColumnFirstChild (column: VxeTableDefines.ColumnInfo): VxeTableDefines.ColumnInfo {
17
- const { children } = column
18
- if (children && children.length) {
19
- return getColumnFirstChild(children[0])
20
- }
21
- return column
22
- }
23
-
24
- function getColumnLastChild (column: VxeTableDefines.ColumnInfo): VxeTableDefines.ColumnInfo {
25
- const { children } = column
26
- if (children && children.length) {
27
- return getColumnLastChild(children[children.length - 1])
28
- }
29
- return column
30
- }
31
-
32
16
  export default defineVxeComponent({
33
17
  name: 'VxeTableHeader',
34
18
  props: {
@@ -203,15 +187,13 @@ export default defineVxeComponent({
203
187
  if (showCustomHeader) {
204
188
  // custom
205
189
  } else if (isColGroup && !isLastRow) {
206
- const firstCol = getColumnFirstChild(column)
207
- const lastCol = getColumnLastChild(column)
208
- if (firstCol && lastCol && firstCol.id !== lastCol.id) {
209
- const firstColRest = fullColumnIdData[firstCol.id]
210
- const lastColRest = fullColumnIdData[lastCol.id]
211
- if (firstColRest && lastColRest) {
212
- tcStyle.width = `${lastColRest.oLeft - firstColRest.oLeft + lastCol.renderWidth}px`
190
+ let childWidth = 0
191
+ XEUtils.eachTree(column.children, (childRow) => {
192
+ if (childRow.visible && (!childRow.children || !childRow.children.length)) {
193
+ childWidth += childRow.renderWidth
213
194
  }
214
- }
195
+ })
196
+ tcStyle.width = `${childWidth}px`
215
197
  }
216
198
 
217
199
  return h('th', {
@@ -12868,7 +12868,8 @@ export default defineVxeComponent({
12868
12868
  h('div', {
12869
12869
  key: 'tn',
12870
12870
  ref: refEmptyPlaceholder,
12871
- class: 'vxe-table--empty-place-wrapper'
12871
+ class: 'vxe-table--empty-place-wrapper',
12872
+ xid: xID
12872
12873
  }, [
12873
12874
  h('div', {
12874
12875
  class: 'vxe-table--empty-placeholder'
@@ -47,11 +47,11 @@ function getNodeOffset (elem: any, container: any, rest: any): any {
47
47
  }
48
48
 
49
49
  export function isPx (val: any) {
50
- return val && /^\d+(px)?$/.test(val)
50
+ return val && /^\d+(\.\d+)?px?$/.test(val)
51
51
  }
52
52
 
53
53
  export function isScale (val: any) {
54
- return val && /^\d+%$/.test(val)
54
+ return val && /^\d+(\.\d+)?%$/.test(val)
55
55
  }
56
56
 
57
57
  export function hasClass (elem: any, cls: any) {
@@ -2179,12 +2179,12 @@ $btnThemeList: (
2179
2179
  text-align: center;
2180
2180
  overflow: hidden;
2181
2181
  width: 100%;
2182
- pointer-events: none;
2183
2182
  outline: 0;
2184
2183
  }
2185
2184
  .vxe-table--empty-block {
2186
2185
  display: none;
2187
2186
  visibility: hidden;
2187
+ pointer-events: none;
2188
2188
  }
2189
2189
  .vxe-table--empty-place-wrapper {
2190
2190
  display: none;
@@ -2193,6 +2193,7 @@ $btnThemeList: (
2193
2193
  top: 0;
2194
2194
  z-index: 5;
2195
2195
  overflow: hidden;
2196
+ pointer-events: none;
2196
2197
  }
2197
2198
  .vxe-table--empty-placeholder {
2198
2199
  display: flex;