vxe-table 3.19.17 → 3.19.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/mixin.js +1 -1
  28. package/es/table/src/header.js +6 -22
  29. package/es/table/src/table.js +4 -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 +46 -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/mixin.js +1 -1
  110. package/lib/table/module/menu/mixin.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 +4 -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/mixin.ts +1 -1
  149. package/packages/table/src/header.ts +6 -24
  150. package/packages/table/src/table.ts +4 -1
  151. package/packages/ui/src/dom.ts +2 -2
  152. package/styles/components/table.scss +2 -1
  153. /package/es/{iconfont.1763515356812.ttf → iconfont.1764033994654.ttf} +0 -0
  154. /package/es/{iconfont.1763515356812.woff → iconfont.1764033994654.woff} +0 -0
  155. /package/es/{iconfont.1763515356812.woff2 → iconfont.1764033994654.woff2} +0 -0
  156. /package/lib/{iconfont.1763515356812.ttf → iconfont.1764033994654.ttf} +0 -0
  157. /package/lib/{iconfont.1763515356812.woff → iconfont.1764033994654.woff} +0 -0
  158. /package/lib/{iconfont.1763515356812.woff2 → iconfont.1764033994654.woff2} +0 -0
@@ -143,7 +143,7 @@ export default {
143
143
  $xeTable.dispatchEvent(eventType, params, evnt)
144
144
  }
145
145
  return
146
- } else if (getEventTargetNode(evnt, $xeTable.$el, `vxe-table--${layout}-wrapper`, target => target.getAttribute('xid') === xID).flag) {
146
+ } 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)) {
147
147
  if (menuOpts.trigger === 'cell') {
148
148
  evnt.preventDefault()
149
149
  } else {
@@ -12,22 +12,6 @@ const { renderer, renderEmptyElement } = VxeUI
12
12
  const sourceType = 'table'
13
13
  const renderType = 'header'
14
14
 
15
- function getColumnFirstChild (column: VxeTableDefines.ColumnInfo): VxeTableDefines.ColumnInfo {
16
- const { children } = column
17
- if (children && children.length) {
18
- return getColumnFirstChild(children[0])
19
- }
20
- return column
21
- }
22
-
23
- function getColumnLastChild (column: VxeTableDefines.ColumnInfo): VxeTableDefines.ColumnInfo {
24
- const { children } = column
25
- if (children && children.length) {
26
- return getColumnLastChild(children[children.length - 1])
27
- }
28
- return column
29
- }
30
-
31
15
  function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode: boolean, headerGroups: VxeTableDefines.ColumnInfo[][], $rowIndex: number, cols: VxeTableDefines.ColumnInfo[]) {
32
16
  const props = _vm
33
17
  const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
@@ -164,15 +148,13 @@ function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMod
164
148
  if (showCustomHeader) {
165
149
  // custom
166
150
  } else if (isColGroup && !isLastRow) {
167
- const firstCol = getColumnFirstChild(column)
168
- const lastCol = getColumnLastChild(column)
169
- if (firstCol && lastCol && firstCol.id !== lastCol.id) {
170
- const firstColRest = fullColumnIdData[firstCol.id]
171
- const lastColRest = fullColumnIdData[lastCol.id]
172
- if (firstColRest && lastColRest) {
173
- tcStyle.width = `${lastColRest.oLeft - firstColRest.oLeft + lastCol.renderWidth}px`
151
+ let childWidth = 0
152
+ XEUtils.eachTree(column.children, (childRow) => {
153
+ if (childRow.visible && (!childRow.children || !childRow.children.length)) {
154
+ childWidth += childRow.renderWidth
174
155
  }
175
- }
156
+ })
157
+ tcStyle.width = `${childWidth}px`
176
158
  }
177
159
 
178
160
  return h('th', {
@@ -2302,7 +2302,10 @@ export default {
2302
2302
  h('div', {
2303
2303
  key: 'tn',
2304
2304
  ref: 'refEmptyPlaceholder',
2305
- class: 'vxe-table--empty-place-wrapper'
2305
+ class: 'vxe-table--empty-place-wrapper',
2306
+ attrs: {
2307
+ xid: xID
2308
+ }
2306
2309
  }, [
2307
2310
  h('div', {
2308
2311
  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;