vxe-table 4.16.15 → 4.16.17

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 (258) hide show
  1. package/README.md +1 -1
  2. package/README.zh-TW.md +1 -1
  3. package/es/grid/src/grid.js +7 -2
  4. package/es/index.css +1 -1
  5. package/es/index.min.css +1 -1
  6. package/es/locale/lang/en-US.js +2 -2
  7. package/es/style.css +1 -1
  8. package/es/style.min.css +1 -1
  9. package/es/table/module/filter/panel.js +2 -1
  10. package/es/table/module/menu/hook.js +9 -3
  11. package/es/table/module/menu/panel.js +113 -109
  12. package/es/table/src/header.js +4 -1
  13. package/es/table/src/table.js +58 -30
  14. package/es/table/src/util.js +19 -4
  15. package/es/ui/index.js +8 -5
  16. package/es/ui/src/log.js +1 -1
  17. package/lib/grid/src/grid.js +6 -2
  18. package/lib/grid/src/grid.min.js +1 -1
  19. package/lib/index.css +1 -1
  20. package/lib/index.min.css +1 -1
  21. package/lib/index.umd.js +89 -41
  22. package/lib/index.umd.min.js +1 -1
  23. package/lib/locale/lang/ar-EG.min.js +1 -1
  24. package/lib/locale/lang/de-DE.min.js +1 -1
  25. package/lib/locale/lang/en-US.js +2 -2
  26. package/lib/locale/lang/en-US.min.js +1 -1
  27. package/lib/locale/lang/es-ES.min.js +1 -1
  28. package/lib/locale/lang/fr-FR.min.js +1 -1
  29. package/lib/locale/lang/hu-HU.min.js +1 -1
  30. package/lib/locale/lang/hy-AM.min.js +1 -1
  31. package/lib/locale/lang/id-ID.min.js +1 -1
  32. package/lib/locale/lang/it-IT.min.js +1 -1
  33. package/lib/locale/lang/ja-JP.min.js +1 -1
  34. package/lib/locale/lang/ko-KR.min.js +1 -1
  35. package/lib/locale/lang/ms-MY.min.js +1 -1
  36. package/lib/locale/lang/nb-NO.min.js +1 -1
  37. package/lib/locale/lang/pt-BR.min.js +1 -1
  38. package/lib/locale/lang/ru-RU.min.js +1 -1
  39. package/lib/locale/lang/th-TH.min.js +1 -1
  40. package/lib/locale/lang/ug-CN.min.js +1 -1
  41. package/lib/locale/lang/uk-UA.min.js +1 -1
  42. package/lib/locale/lang/uz-UZ.min.js +1 -1
  43. package/lib/locale/lang/vi-VN.min.js +1 -1
  44. package/lib/locale/lang/zh-CHT.min.js +1 -1
  45. package/lib/locale/lang/zh-CN.min.js +1 -1
  46. package/lib/locale/lang/zh-HK.min.js +1 -1
  47. package/lib/locale/lang/zh-MO.min.js +1 -1
  48. package/lib/locale/lang/zh-TW.min.js +1 -1
  49. package/lib/style.css +1 -1
  50. package/lib/style.min.css +1 -1
  51. package/lib/table/src/header.js +3 -1
  52. package/lib/table/src/props.js +0 -318
  53. package/lib/ui/index.js +8 -5
  54. package/lib/ui/index.min.js +1 -1
  55. package/lib/ui/src/log.js +1 -1
  56. package/lib/ui/src/log.min.js +1 -1
  57. package/package.json +1 -1
  58. package/packages/grid/src/grid.ts +8 -2
  59. package/packages/locale/lang/en-US.ts +2 -2
  60. package/packages/table/module/filter/panel.ts +2 -1
  61. package/packages/table/module/menu/hook.ts +11 -3
  62. package/packages/table/module/menu/panel.ts +112 -108
  63. package/packages/table/src/header.ts +3 -1
  64. package/packages/table/src/table.ts +58 -30
  65. package/packages/table/src/util.ts +19 -2
  66. package/packages/ui/index.ts +7 -4
  67. package/styles/components/grid.scss +0 -1
  68. package/es/colgroup/style.css +0 -0
  69. package/es/colgroup/style.min.css +0 -0
  70. package/es/column/style.css +0 -0
  71. package/es/column/style.min.css +0 -0
  72. package/es/grid/style.css +0 -87
  73. package/es/grid/style.min.css +0 -1
  74. package/es/iconfont.1758246364726.ttf +0 -0
  75. package/es/iconfont.1758246364726.woff +0 -0
  76. package/es/iconfont.1758246364726.woff2 +0 -0
  77. package/es/index.esm.js +0 -3
  78. package/es/locale/lang/ar-EG.d.ts +0 -2
  79. package/es/locale/lang/de-DE.d.ts +0 -2
  80. package/es/locale/lang/en-US.d.ts +0 -2
  81. package/es/locale/lang/es-ES.d.ts +0 -2
  82. package/es/locale/lang/fr-FR.d.ts +0 -2
  83. package/es/locale/lang/hu-HU.d.ts +0 -2
  84. package/es/locale/lang/hy-AM.d.ts +0 -2
  85. package/es/locale/lang/id-ID.d.ts +0 -2
  86. package/es/locale/lang/it-IT.d.ts +0 -2
  87. package/es/locale/lang/ja-JP.d.ts +0 -2
  88. package/es/locale/lang/ko-KR.d.ts +0 -2
  89. package/es/locale/lang/ms-MY.d.ts +0 -2
  90. package/es/locale/lang/nb-NO.d.ts +0 -2
  91. package/es/locale/lang/pt-BR.d.ts +0 -2
  92. package/es/locale/lang/ru-RU.d.ts +0 -2
  93. package/es/locale/lang/th-TH.d.ts +0 -2
  94. package/es/locale/lang/ug-CN.d.ts +0 -2
  95. package/es/locale/lang/uk-UA.d.ts +0 -2
  96. package/es/locale/lang/uz-UZ.d.ts +0 -2
  97. package/es/locale/lang/vi-VN.d.ts +0 -2
  98. package/es/locale/lang/zh-CHT.d.ts +0 -2
  99. package/es/locale/lang/zh-CN.d.ts +0 -2
  100. package/es/locale/lang/zh-HK.d.ts +0 -2
  101. package/es/locale/lang/zh-MO.d.ts +0 -2
  102. package/es/locale/lang/zh-TW.d.ts +0 -2
  103. package/es/table/style.css +0 -3657
  104. package/es/table/style.min.css +0 -1
  105. package/es/toolbar/style.css +0 -90
  106. package/es/toolbar/style.min.css +0 -1
  107. package/es/ui/style.css +0 -0
  108. package/es/ui/style.min.css +0 -0
  109. package/es/v-x-e-table/style.css +0 -0
  110. package/es/v-x-e-table/style.min.css +0 -0
  111. package/es/vxe-colgroup/style.css +0 -0
  112. package/es/vxe-colgroup/style.min.css +0 -0
  113. package/es/vxe-column/style.css +0 -0
  114. package/es/vxe-column/style.min.css +0 -0
  115. package/es/vxe-grid/style.css +0 -87
  116. package/es/vxe-grid/style.min.css +0 -1
  117. package/es/vxe-table/style.css +0 -3657
  118. package/es/vxe-table/style.min.css +0 -1
  119. package/es/vxe-toolbar/style.css +0 -90
  120. package/es/vxe-toolbar/style.min.css +0 -1
  121. package/es/vxe-ui/style.css +0 -0
  122. package/es/vxe-ui/style.min.css +0 -0
  123. package/es/vxe-v-x-e-table/style.css +0 -0
  124. package/es/vxe-v-x-e-table/style.min.css +0 -0
  125. package/lib/colgroup/style/index.js +0 -1
  126. package/lib/colgroup/style/style.css +0 -0
  127. package/lib/colgroup/style/style.min.css +0 -0
  128. package/lib/column/style/index.js +0 -1
  129. package/lib/column/style/style.css +0 -0
  130. package/lib/column/style/style.min.css +0 -0
  131. package/lib/grid/style/index.js +0 -1
  132. package/lib/grid/style/style.css +0 -87
  133. package/lib/grid/style/style.min.css +0 -1
  134. package/lib/iconfont.1758246364726.ttf +0 -0
  135. package/lib/iconfont.1758246364726.woff +0 -0
  136. package/lib/iconfont.1758246364726.woff2 +0 -0
  137. package/lib/index.common.js +0 -22
  138. package/lib/locale/lang/ar-EG.d.ts +0 -2
  139. package/lib/locale/lang/ar-EG.umd.js +0 -806
  140. package/lib/locale/lang/de-DE.d.ts +0 -2
  141. package/lib/locale/lang/de-DE.umd.js +0 -806
  142. package/lib/locale/lang/en-US.d.ts +0 -2
  143. package/lib/locale/lang/en-US.umd.js +0 -806
  144. package/lib/locale/lang/es-ES.d.ts +0 -2
  145. package/lib/locale/lang/es-ES.umd.js +0 -806
  146. package/lib/locale/lang/fr-FR.d.ts +0 -2
  147. package/lib/locale/lang/fr-FR.umd.js +0 -806
  148. package/lib/locale/lang/hu-HU.d.ts +0 -2
  149. package/lib/locale/lang/hu-HU.umd.js +0 -806
  150. package/lib/locale/lang/hy-AM.d.ts +0 -2
  151. package/lib/locale/lang/hy-AM.umd.js +0 -806
  152. package/lib/locale/lang/id-ID.d.ts +0 -2
  153. package/lib/locale/lang/id-ID.umd.js +0 -806
  154. package/lib/locale/lang/it-IT.d.ts +0 -2
  155. package/lib/locale/lang/it-IT.umd.js +0 -806
  156. package/lib/locale/lang/ja-JP.d.ts +0 -2
  157. package/lib/locale/lang/ja-JP.umd.js +0 -806
  158. package/lib/locale/lang/ko-KR.d.ts +0 -2
  159. package/lib/locale/lang/ko-KR.umd.js +0 -806
  160. package/lib/locale/lang/ms-MY.d.ts +0 -2
  161. package/lib/locale/lang/ms-MY.umd.js +0 -806
  162. package/lib/locale/lang/nb-NO.d.ts +0 -2
  163. package/lib/locale/lang/nb-NO.umd.js +0 -806
  164. package/lib/locale/lang/pt-BR.d.ts +0 -2
  165. package/lib/locale/lang/pt-BR.umd.js +0 -806
  166. package/lib/locale/lang/ru-RU.d.ts +0 -2
  167. package/lib/locale/lang/ru-RU.umd.js +0 -806
  168. package/lib/locale/lang/th-TH.d.ts +0 -2
  169. package/lib/locale/lang/th-TH.umd.js +0 -806
  170. package/lib/locale/lang/ug-CN.d.ts +0 -2
  171. package/lib/locale/lang/ug-CN.umd.js +0 -806
  172. package/lib/locale/lang/uk-UA.d.ts +0 -2
  173. package/lib/locale/lang/uk-UA.umd.js +0 -806
  174. package/lib/locale/lang/uz-UZ.d.ts +0 -2
  175. package/lib/locale/lang/uz-UZ.umd.js +0 -806
  176. package/lib/locale/lang/vi-VN.d.ts +0 -2
  177. package/lib/locale/lang/vi-VN.umd.js +0 -806
  178. package/lib/locale/lang/zh-CHT.d.ts +0 -2
  179. package/lib/locale/lang/zh-CHT.umd.js +0 -806
  180. package/lib/locale/lang/zh-CN.d.ts +0 -2
  181. package/lib/locale/lang/zh-CN.umd.js +0 -808
  182. package/lib/locale/lang/zh-HK.d.ts +0 -2
  183. package/lib/locale/lang/zh-HK.umd.js +0 -23
  184. package/lib/locale/lang/zh-MO.d.ts +0 -2
  185. package/lib/locale/lang/zh-MO.umd.js +0 -23
  186. package/lib/locale/lang/zh-TW.d.ts +0 -2
  187. package/lib/locale/lang/zh-TW.umd.js +0 -23
  188. package/lib/table/module/custom/hook.js +0 -430
  189. package/lib/table/module/custom/hook.min.js +0 -1
  190. package/lib/table/module/custom/panel.js +0 -1193
  191. package/lib/table/module/custom/panel.min.js +0 -1
  192. package/lib/table/module/edit/hook.js +0 -1308
  193. package/lib/table/module/edit/hook.min.js +0 -1
  194. package/lib/table/module/export/export-panel.js +0 -467
  195. package/lib/table/module/export/export-panel.min.js +0 -1
  196. package/lib/table/module/export/hook.js +0 -1888
  197. package/lib/table/module/export/hook.min.js +0 -1
  198. package/lib/table/module/export/import-panel.js +0 -226
  199. package/lib/table/module/export/import-panel.min.js +0 -1
  200. package/lib/table/module/export/util.js +0 -20
  201. package/lib/table/module/export/util.min.js +0 -1
  202. package/lib/table/module/filter/hook.js +0 -442
  203. package/lib/table/module/filter/hook.min.js +0 -1
  204. package/lib/table/module/filter/panel.js +0 -264
  205. package/lib/table/module/filter/panel.min.js +0 -1
  206. package/lib/table/module/keyboard/hook.js +0 -579
  207. package/lib/table/module/keyboard/hook.min.js +0 -1
  208. package/lib/table/module/menu/hook.js +0 -383
  209. package/lib/table/module/menu/hook.min.js +0 -1
  210. package/lib/table/module/menu/panel.js +0 -135
  211. package/lib/table/module/menu/panel.min.js +0 -1
  212. package/lib/table/module/validator/hook.js +0 -681
  213. package/lib/table/module/validator/hook.min.js +0 -1
  214. package/lib/table/src/header.min.js +0 -1
  215. package/lib/table/src/props.min.js +0 -1
  216. package/lib/table/src/store.js +0 -15
  217. package/lib/table/src/store.min.js +0 -1
  218. package/lib/table/src/table.js +0 -902
  219. package/lib/table/src/table.min.js +0 -1
  220. package/lib/table/src/use/cell-view.js +0 -57
  221. package/lib/table/src/use/cell-view.min.js +0 -1
  222. package/lib/table/src/use/index.js +0 -16
  223. package/lib/table/src/use/index.min.js +0 -1
  224. package/lib/table/src/util.js +0 -896
  225. package/lib/table/src/util.min.js +0 -1
  226. package/lib/table/style/index.js +0 -1
  227. package/lib/table/style/style.css +0 -3657
  228. package/lib/table/style/style.min.css +0 -1
  229. package/lib/toolbar/style/index.js +0 -1
  230. package/lib/toolbar/style/style.css +0 -90
  231. package/lib/toolbar/style/style.min.css +0 -1
  232. package/lib/ui/style/index.js +0 -1
  233. package/lib/ui/style/style.css +0 -0
  234. package/lib/ui/style/style.min.css +0 -0
  235. package/lib/v-x-e-table/style/index.js +0 -1
  236. package/lib/v-x-e-table/style/style.css +0 -0
  237. package/lib/v-x-e-table/style/style.min.css +0 -0
  238. package/lib/vxe-colgroup/style/index.js +0 -1
  239. package/lib/vxe-colgroup/style/style.css +0 -0
  240. package/lib/vxe-colgroup/style/style.min.css +0 -0
  241. package/lib/vxe-column/style/index.js +0 -1
  242. package/lib/vxe-column/style/style.css +0 -0
  243. package/lib/vxe-column/style/style.min.css +0 -0
  244. package/lib/vxe-grid/style/index.js +0 -1
  245. package/lib/vxe-grid/style/style.css +0 -87
  246. package/lib/vxe-grid/style/style.min.css +0 -1
  247. package/lib/vxe-table/style/index.js +0 -1
  248. package/lib/vxe-table/style/style.css +0 -3657
  249. package/lib/vxe-table/style/style.min.css +0 -1
  250. package/lib/vxe-toolbar/style/index.js +0 -1
  251. package/lib/vxe-toolbar/style/style.css +0 -90
  252. package/lib/vxe-toolbar/style/style.min.css +0 -1
  253. package/lib/vxe-ui/style/index.js +0 -1
  254. package/lib/vxe-ui/style/style.css +0 -0
  255. package/lib/vxe-ui/style/style.min.css +0 -0
  256. package/lib/vxe-v-x-e-table/style/index.js +0 -1
  257. package/lib/vxe-v-x-e-table/style/style.css +0 -0
  258. package/lib/vxe-v-x-e-table/style/style.min.css +0 -0
@@ -1,4 +1,4 @@
1
- import { h, Teleport, inject, ref, Ref, createCommentVNode } from 'vue'
1
+ import { h, Teleport, inject, ref, Ref } from 'vue'
2
2
  import { defineVxeComponent } from '../../../ui/src/comp'
3
3
  import { VxeUI } from '../../../ui'
4
4
  import { getFuncText } from '../../../ui/src/utils'
@@ -6,7 +6,7 @@ import XEUtils from 'xe-utils'
6
6
 
7
7
  import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods } from '../../../../types'
8
8
 
9
- const { getIcon } = VxeUI
9
+ const { getIcon, renderEmptyElement } = VxeUI
10
10
 
11
11
  export default defineVxeComponent({
12
12
  name: 'VxeTableMenuPanel',
@@ -34,127 +34,131 @@ export default defineVxeComponent({
34
34
  const { ctxMenuStore } = tableReactData
35
35
  const { computeMenuOpts } = $xeTable.getComputeMaps()
36
36
  const menuOpts = computeMenuOpts.value
37
+ const { transfer, destroyOnClose } = menuOpts
38
+ const { visible, list, className } = ctxMenuStore
37
39
 
38
40
  return h(Teleport, {
39
41
  to: 'body',
40
- disabled: false
42
+ disabled: !transfer
41
43
  }, [
42
44
  h('div', {
43
45
  ref: refElem,
44
- class: ['vxe-table--context-menu-wrapper', menuOpts.className, {
45
- 'is--visible': ctxMenuStore.visible
46
+ class: ['vxe-table--context-menu-wrapper', className, {
47
+ 'is--visible': visible
46
48
  }],
47
49
  style: ctxMenuStore.style
48
- }, ctxMenuStore.list.map((options, gIndex) => {
49
- return options.every(item => item.visible === false)
50
- ? createCommentVNode()
51
- : h('ul', {
52
- class: 'vxe-context-menu--option-wrapper',
53
- key: gIndex
54
- }, options.map((item, index) => {
55
- const hasChildMenus = item.children && item.children.some((child: any) => child.visible !== false)
56
- const prefixOpts = Object.assign({}, item.prefixConfig)
57
- const suffixOpts = Object.assign({}, item.suffixConfig)
58
- const menuContent = getFuncText(item.name)
59
- return item.visible === false
60
- ? null
61
- : h('li', {
62
- class: [item.className, {
63
- 'link--disabled': item.disabled,
64
- 'link--active': item === ctxMenuStore.selected
65
- }],
66
- key: `${gIndex}_${index}`
67
- }, [
68
- h('a', {
69
- class: 'vxe-context-menu--link',
70
- onClick (evnt: Event) {
71
- $xeTable.ctxMenuLinkEvent(evnt, item)
72
- },
73
- onMouseover (evnt: Event) {
74
- $xeTable.ctxMenuMouseoverEvent(evnt, item)
75
- },
76
- onMouseout (evnt: Event) {
77
- $xeTable.ctxMenuMouseoutEvent(evnt, item)
78
- }
50
+ }, (destroyOnClose ? visible : true)
51
+ ? list.map((options, gIndex) => {
52
+ return options.every(item => item.visible === false)
53
+ ? renderEmptyElement($xeTable)
54
+ : h('ul', {
55
+ class: 'vxe-context-menu--option-wrapper',
56
+ key: gIndex
57
+ }, options.map((item, index) => {
58
+ const hasChildMenus = item.children && item.children.some((child: any) => child.visible !== false)
59
+ const prefixOpts = Object.assign({}, item.prefixConfig)
60
+ const suffixOpts = Object.assign({}, item.suffixConfig)
61
+ const menuContent = getFuncText(item.name)
62
+ return item.visible === false
63
+ ? renderEmptyElement($xeTable)
64
+ : h('li', {
65
+ class: [item.className, {
66
+ 'link--disabled': item.disabled,
67
+ 'link--active': item === ctxMenuStore.selected
68
+ }],
69
+ key: `${gIndex}_${index}`
79
70
  }, [
80
- h('div', {
81
- class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
71
+ h('a', {
72
+ class: 'vxe-context-menu--link',
73
+ onClick (evnt: Event) {
74
+ $xeTable.ctxMenuLinkEvent(evnt, item)
75
+ },
76
+ onMouseover (evnt: Event) {
77
+ $xeTable.ctxMenuMouseoverEvent(evnt, item)
78
+ },
79
+ onMouseout (evnt: Event) {
80
+ $xeTable.ctxMenuMouseoutEvent(evnt, item)
81
+ }
82
82
  }, [
83
- h('i', {
84
- class: prefixOpts.icon || item.prefixIcon
85
- }),
86
- prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : createCommentVNode()
83
+ h('div', {
84
+ class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
85
+ }, [
86
+ h('i', {
87
+ class: prefixOpts.icon || item.prefixIcon
88
+ }),
89
+ prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)
90
+ ]),
91
+ h('div', {
92
+ class: 'vxe-context-menu--link-content',
93
+ title: menuContent
94
+ }, menuContent),
95
+ h('div', {
96
+ class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
97
+ }, [
98
+ h('i', {
99
+ class: (suffixOpts.icon || item.suffixIcon) || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : '')
100
+ }),
101
+ suffixOpts.content ? h('span', `${suffixOpts.content}`) : renderEmptyElement($xeTable)
102
+ ])
87
103
  ]),
88
- h('div', {
89
- class: 'vxe-context-menu--link-content',
90
- title: menuContent
91
- }, menuContent),
92
- h('div', {
93
- class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
94
- }, [
95
- h('i', {
96
- class: (suffixOpts.icon || item.suffixIcon) || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : '')
97
- }),
98
- suffixOpts.content ? h('span', `${suffixOpts.content}`) : createCommentVNode()
99
- ])
100
- ]),
101
- hasChildMenus
102
- ? h('ul', {
103
- class: ['vxe-table--context-menu-clild-wrapper', {
104
- 'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
105
- }]
106
- }, item.children.map((child: any, cIndex: any) => {
107
- const childPrefixOpts = Object.assign({}, child.prefixConfig)
108
- const childSuffixOpts = Object.assign({}, child.suffixConfig)
109
- const childMenuContent = getFuncText(child.name)
110
- return child.visible === false
111
- ? null
112
- : h('li', {
113
- class: [child.className, {
114
- 'link--disabled': child.disabled,
115
- 'link--active': child === ctxMenuStore.selectChild
116
- }],
117
- key: `${gIndex}_${index}_${cIndex}`
118
- }, [
119
- h('a', {
120
- class: 'vxe-context-menu--link',
121
- onClick (evnt: Event) {
122
- $xeTable.ctxMenuLinkEvent(evnt, child)
123
- },
124
- onMouseover (evnt: Event) {
125
- $xeTable.ctxMenuMouseoverEvent(evnt, item, child)
126
- },
127
- onMouseout (evnt: Event) {
128
- $xeTable.ctxMenuMouseoutEvent(evnt, item)
129
- }
104
+ hasChildMenus
105
+ ? h('ul', {
106
+ class: ['vxe-table--context-menu-clild-wrapper', {
107
+ 'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
108
+ }]
109
+ }, item.children.map((child: any, cIndex: any) => {
110
+ const childPrefixOpts = Object.assign({}, child.prefixConfig)
111
+ const childSuffixOpts = Object.assign({}, child.suffixConfig)
112
+ const childMenuContent = getFuncText(child.name)
113
+ return child.visible === false
114
+ ? null
115
+ : h('li', {
116
+ class: [child.className, {
117
+ 'link--disabled': child.disabled,
118
+ 'link--active': child === ctxMenuStore.selectChild
119
+ }],
120
+ key: `${gIndex}_${index}_${cIndex}`
130
121
  }, [
131
- h('div', {
132
- class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
133
- }, [
134
- h('i', {
135
- class: childPrefixOpts.icon || child.prefixIcon
136
- }),
137
- childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : createCommentVNode()
138
- ]),
139
- h('div', {
140
- class: 'vxe-context-menu--link-content',
141
- title: childMenuContent
142
- }, childMenuContent),
143
- h('div', {
144
- class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
122
+ h('a', {
123
+ class: 'vxe-context-menu--link',
124
+ onClick (evnt: Event) {
125
+ $xeTable.ctxMenuLinkEvent(evnt, child)
126
+ },
127
+ onMouseover (evnt: Event) {
128
+ $xeTable.ctxMenuMouseoverEvent(evnt, item, child)
129
+ },
130
+ onMouseout (evnt: Event) {
131
+ $xeTable.ctxMenuMouseoutEvent(evnt, item)
132
+ }
145
133
  }, [
146
- h('i', {
147
- class: childSuffixOpts.icon
148
- }),
149
- childSuffixOpts.content ? h('span', `${childSuffixOpts.content}`) : createCommentVNode()
134
+ h('div', {
135
+ class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
136
+ }, [
137
+ h('i', {
138
+ class: childPrefixOpts.icon || child.prefixIcon
139
+ }),
140
+ childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : renderEmptyElement($xeTable)
141
+ ]),
142
+ h('div', {
143
+ class: 'vxe-context-menu--link-content',
144
+ title: childMenuContent
145
+ }, childMenuContent),
146
+ h('div', {
147
+ class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
148
+ }, [
149
+ h('i', {
150
+ class: childSuffixOpts.icon
151
+ }),
152
+ childSuffixOpts.content ? h('span', `${childSuffixOpts.content}`) : renderEmptyElement($xeTable)
153
+ ])
150
154
  ])
151
155
  ])
152
- ])
153
- }))
154
- : null
155
- ])
156
- }))
157
- }))
156
+ }))
157
+ : null
158
+ ])
159
+ }))
160
+ })
161
+ : [])
158
162
  ])
159
163
  }
160
164
 
@@ -196,7 +196,9 @@ export default defineVxeComponent({
196
196
  tcStyle.minHeight = `${currCellHeight}px`
197
197
  }
198
198
 
199
- if (isColGroup && !isLastRow) {
199
+ if (showCustomHeader) {
200
+ // custom
201
+ } else if (isColGroup && !isLastRow) {
200
202
  const firstCol = getColumnFirstChild(column)
201
203
  const lastCol = getColumnLastChild(column)
202
204
  if (firstCol && lastCol && firstCol.id !== lastCol.id) {
@@ -4,7 +4,7 @@ import XEUtils from 'xe-utils'
4
4
  import { initTpImg, getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey } from '../../ui/src/dom'
5
5
  import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils'
6
6
  import { VxeUI } from '../../ui'
7
- import { createInternalData, getRowUniqueId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight } from './util'
7
+ import { createInternalData, getRowUniqueId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight, getLastChildColumn } from './util'
8
8
  import { getSlotVNs } from '../../ui/src/vn'
9
9
  import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from './anime'
10
10
  import { warnLog, errLog } from '../../ui/src/log'
@@ -350,6 +350,7 @@ export default defineVxeComponent({
350
350
  const refTableRightFooter = ref() as Ref<ComponentPublicInstance>
351
351
 
352
352
  const refTeleportWrapper = ref<HTMLDivElement>()
353
+ const refPopupWrapperElem = ref<HTMLDivElement>()
353
354
 
354
355
  const refLeftContainer = ref() as Ref<HTMLDivElement>
355
356
  const refRightContainer = ref() as Ref<HTMLDivElement>
@@ -1322,6 +1323,7 @@ export default defineVxeComponent({
1322
1323
  }
1323
1324
 
1324
1325
  const handleHeaderMerge = (merges: VxeTableDefines.MergeOptions | VxeTableDefines.MergeOptions[]) => {
1326
+ const { showCustomHeader } = props
1325
1327
  const { footerTableData } = reactData
1326
1328
  const { mergeHeaderList, mergeHeaderMaps, fullColumnIdData } = internalData
1327
1329
  if (merges) {
@@ -1345,6 +1347,10 @@ export default defineVxeComponent({
1345
1347
  if (mergeRowIndex > -1 && mergeColumnIndex > -1 && (rowspan || colspan)) {
1346
1348
  rowspan = XEUtils.toNumber(rowspan) || 1
1347
1349
  colspan = XEUtils.toNumber(colspan) || 1
1350
+ if (!showCustomHeader && rowspan > 1) {
1351
+ errLog('vxe.error.notSupportProp', ['[table] show-custom-header=false', `rowspan=${rowspan}`, 'rowspan=1'])
1352
+ return
1353
+ }
1348
1354
  if (rowspan > 1 || colspan > 1) {
1349
1355
  const row = footerTableData[mergeRowIndex]
1350
1356
  const column = visibleColumn[mergeColumnIndex]
@@ -4025,6 +4031,10 @@ export default defineVxeComponent({
4025
4031
  if ($xeTable.handleUpdateCustomColumn) {
4026
4032
  $xeTable.handleUpdateCustomColumn()
4027
4033
  }
4034
+ const columnOpts = computeColumnOpts.value
4035
+ if (props.showCustomHeader && reactData.isGroup && (columnOpts.resizable || props.resizable)) {
4036
+ warnLog('vxe.error.notConflictProp', ['show-custom-header & colgroup', 'column-config.resizable=false'])
4037
+ }
4028
4038
  reactData.isColLoading = false
4029
4039
  return handleLazyRecalculate(false, true, true)
4030
4040
  })
@@ -8572,18 +8582,16 @@ export default defineVxeComponent({
8572
8582
  const scrollbarXToTop = computeScrollbarXToTop.value
8573
8583
  const { clientX: dragClientX } = evnt
8574
8584
  const dragBtnElem = evnt.target as HTMLDivElement
8585
+ let cell = dragBtnElem.parentElement as HTMLTableCellElement | null
8575
8586
  let resizeColumn = column
8576
8587
  const isDragGroupCol = column.children && column.children.length
8577
8588
  if (isDragGroupCol) {
8578
- XEUtils.eachTree(column.children, childColumn => {
8579
- resizeColumn = childColumn
8580
- })
8581
- }
8582
- let cell = dragBtnElem.parentElement as HTMLTableCellElement | null
8583
- if (isDragGroupCol) {
8584
- const trEl = cell ? cell.parentElement as HTMLTableRowElement : null
8585
- const theadEl = trEl ? trEl.parentElement as HTMLTableElement : null
8586
- cell = theadEl ? theadEl.querySelector<HTMLTableCellElement>(`.vxe-header--column[colid="${resizeColumn.id}"]`) : null
8589
+ resizeColumn = getLastChildColumn(column)
8590
+ if (isDragGroupCol) {
8591
+ const trEl = cell ? cell.parentElement as HTMLTableRowElement : null
8592
+ const theadEl = trEl ? trEl.parentElement as HTMLTableElement : null
8593
+ cell = theadEl ? theadEl.querySelector<HTMLTableCellElement>(`.vxe-header--column[colid="${resizeColumn.id}"]`) : null
8594
+ }
8587
8595
  }
8588
8596
  if (!cell) {
8589
8597
  return
@@ -12272,7 +12280,7 @@ export default defineVxeComponent({
12272
12280
  const renderVN = () => {
12273
12281
  const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props
12274
12282
  const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore, tooltipStore } = reactData
12275
- const { teleportToWrapperElem } = internalData
12283
+ const { teleportToWrapperElem, popupToWrapperElem } = internalData
12276
12284
  const { leftList, rightList } = columnStore
12277
12285
  const loadingSlot = slots.loading
12278
12286
  const tipSlots = {
@@ -12478,16 +12486,38 @@ export default defineVxeComponent({
12478
12486
  ])
12479
12487
  ])
12480
12488
  ]),
12481
- /**
12482
- * 筛选
12483
- */
12484
- initStore.filter
12485
- ? h(TableFilterPanelComponent, {
12486
- key: 'tf',
12487
- ref: refTableFilter,
12488
- filterStore
12489
- })
12490
- : renderEmptyElement($xeTable),
12489
+ h('div', {
12490
+ key: 'tpw'
12491
+ }, [
12492
+ h(Teleport, {
12493
+ to: popupToWrapperElem,
12494
+ disabled: !($xeGGWrapper && popupToWrapperElem)
12495
+ }, [
12496
+ h('div', {
12497
+ ref: refPopupWrapperElem
12498
+ }, [
12499
+ /**
12500
+ * 筛选
12501
+ */
12502
+ initStore.filter
12503
+ ? h(TableFilterPanelComponent, {
12504
+ key: 'tf',
12505
+ ref: refTableFilter,
12506
+ filterStore
12507
+ })
12508
+ : renderEmptyElement($xeTable),
12509
+ /**
12510
+ * 快捷菜单
12511
+ */
12512
+ isContentMenu
12513
+ ? h(TableMenuPanelComponent, {
12514
+ key: 'tm',
12515
+ ref: refTableMenu
12516
+ })
12517
+ : renderEmptyElement($xeTable)
12518
+ ])
12519
+ ])
12520
+ ]),
12491
12521
  /**
12492
12522
  * 导入
12493
12523
  */
@@ -12508,15 +12538,6 @@ export default defineVxeComponent({
12508
12538
  storeData: reactData.exportStore
12509
12539
  })
12510
12540
  : renderEmptyElement($xeTable),
12511
- /**
12512
- * 快捷菜单
12513
- */
12514
- isContentMenu
12515
- ? h(TableMenuPanelComponent, {
12516
- key: 'tm',
12517
- ref: refTableMenu
12518
- })
12519
- : renderEmptyElement($xeTable),
12520
12541
  /**
12521
12542
  * 提示相关
12522
12543
  */
@@ -12825,6 +12846,13 @@ export default defineVxeComponent({
12825
12846
  internalData.teleportToWrapperElem = classifyWrapperEl
12826
12847
  }
12827
12848
  }
12849
+ if ($xeGGWrapper) {
12850
+ const { refPopupContainerElem } = $xeGGWrapper.getRefMaps()
12851
+ const popupContainerEl = refPopupContainerElem.value
12852
+ if (popupContainerEl) {
12853
+ internalData.popupToWrapperElem = popupContainerEl
12854
+ }
12855
+ }
12828
12856
 
12829
12857
  if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
12830
12858
  initTpImg()
@@ -130,6 +130,7 @@ export function createInternalData (): TableInternalData {
130
130
  tFooterHeight: 0,
131
131
 
132
132
  teleportToWrapperElem: null,
133
+ popupToWrapperElem: null,
133
134
 
134
135
  inited: false,
135
136
  tooltipTimeout: null,
@@ -611,6 +612,22 @@ export function getRootColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMe
611
612
  return column
612
613
  }
613
614
 
615
+ export function getFirstChildColumn (column: VxeTableDefines.ColumnInfo): VxeTableDefines.ColumnInfo {
616
+ const { children } = column
617
+ if (children && children.length) {
618
+ return getFirstChildColumn(XEUtils.first(children))
619
+ }
620
+ return column
621
+ }
622
+
623
+ export function getLastChildColumn (column: VxeTableDefines.ColumnInfo): VxeTableDefines.ColumnInfo {
624
+ const { children } = column
625
+ if (children && children.length) {
626
+ return getFirstChildColumn(XEUtils.last(children))
627
+ }
628
+ return column
629
+ }
630
+
614
631
  const lineOffsetSizes = {
615
632
  mini: 3,
616
633
  small: 2,
@@ -618,7 +635,7 @@ const lineOffsetSizes = {
618
635
  large: 0
619
636
  }
620
637
 
621
- const countTreeExpand = (prevRow: any, params: VxeTableDefines.CellRenderBodyParams) => {
638
+ function countTreeExpand (prevRow: any, params: VxeTableDefines.CellRenderBodyParams) {
622
639
  let count = 1
623
640
  if (!prevRow) {
624
641
  return count
@@ -641,7 +658,7 @@ const countTreeExpand = (prevRow: any, params: VxeTableDefines.CellRenderBodyPar
641
658
  return count
642
659
  }
643
660
 
644
- export const getOffsetSize = ($xeTable: VxeTableConstructor) => {
661
+ export function getOffsetSize ($xeTable: VxeTableConstructor) {
645
662
  const { computeSize } = $xeTable.getComputeMaps()
646
663
  const vSize = computeSize.value
647
664
  if (vSize) {
@@ -99,9 +99,11 @@ VxeUI.setConfig({
99
99
  footerCellConfig: {
100
100
  height: 'unset'
101
101
  },
102
- // menuConfig: {
103
- // visibleMethod () {}
104
- // },
102
+ menuConfig: {
103
+ // visibleMethod () {},
104
+ // transfer: false,
105
+ destroyOnClose: true
106
+ },
105
107
  customConfig: {
106
108
  // enabled: false,
107
109
  allowVisible: true,
@@ -148,8 +150,9 @@ VxeUI.setConfig({
148
150
  filterConfig: {
149
151
  // remote: false,
150
152
  // filterMethod: null,
151
- // destroyOnClose: false,
152
153
  // isEvery: false,
154
+ // transfer: false,
155
+ destroyOnClose: true,
153
156
  multiple: true,
154
157
  showIcon: true
155
158
  },
@@ -1,6 +1,5 @@
1
1
  .vxe-grid {
2
2
  position: relative;
3
- overflow: auto;
4
3
  display: flex;
5
4
  flex-direction: column;
6
5
  &.is--loading {
File without changes
File without changes
File without changes
File without changes
package/es/grid/style.css DELETED
@@ -1,87 +0,0 @@
1
- .vxe-grid {
2
- position: relative;
3
- overflow: auto;
4
- display: flex;
5
- flex-direction: column;
6
- }
7
- .vxe-grid.is--loading:before {
8
- content: "";
9
- position: absolute;
10
- top: 0;
11
- left: 0;
12
- width: 100%;
13
- height: 100%;
14
- z-index: 99;
15
- -webkit-user-select: none;
16
- -moz-user-select: none;
17
- user-select: none;
18
- background-color: var(--vxe-ui-loading-background-color);
19
- }
20
- .vxe-grid.is--loading > .vxe-table .vxe-loading {
21
- background-color: transparent;
22
- }
23
- .vxe-grid.is--maximize {
24
- position: fixed;
25
- top: 0;
26
- left: 0;
27
- width: 100%;
28
- height: 100%;
29
- padding: 0.5em 1em;
30
- background-color: var(--vxe-ui-layout-background-color);
31
- }
32
- .vxe-grid .vxe-grid--form-wrapper,
33
- .vxe-grid .vxe-grid--top-wrapper,
34
- .vxe-grid .vxe-grid--bottom-wrapper {
35
- position: relative;
36
- }
37
- .vxe-grid .vxe-grid--table-container {
38
- display: flex;
39
- flex-direction: row;
40
- }
41
- .vxe-grid .vxe-grid--left-wrapper,
42
- .vxe-grid .vxe-grid--right-wrapper {
43
- flex-shrink: 0;
44
- overflow: auto;
45
- outline: 0;
46
- }
47
- .vxe-grid .vxe-grid--table-wrapper {
48
- flex-grow: 1;
49
- overflow: hidden;
50
- }
51
-
52
- .vxe-grid--layout-body-wrapper {
53
- display: flex;
54
- flex-direction: row;
55
- overflow: auto;
56
- flex-grow: 1;
57
- }
58
-
59
- .vxe-grid--layout-body-content-wrapper {
60
- flex-grow: 1;
61
- overflow: auto;
62
- }
63
-
64
- .vxe-grid--layout-header-wrapper,
65
- .vxe-grid--layout-footer-wrapper,
66
- .vxe-grid--layout-aside-left-wrapper,
67
- .vxe-grid--layout-aside-left-wrapper {
68
- flex-shrink: 0;
69
- }
70
-
71
- .vxe-grid--layout-aside-left-wrapper,
72
- .vxe-grid--layout-aside-left-wrapper {
73
- overflow: auto;
74
- }
75
-
76
- .vxe-grid {
77
- font-size: var(--vxe-ui-font-size-default);
78
- }
79
- .vxe-grid.size--medium {
80
- font-size: var(--vxe-ui-font-size-medium);
81
- }
82
- .vxe-grid.size--small {
83
- font-size: var(--vxe-ui-font-size-small);
84
- }
85
- .vxe-grid.size--mini {
86
- font-size: var(--vxe-ui-font-size-mini);
87
- }
@@ -1 +0,0 @@
1
- .vxe-grid{position:relative;overflow:auto;display:flex;flex-direction:column}.vxe-grid.is--loading:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:99;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vxe-ui-loading-background-color)}.vxe-grid.is--loading>.vxe-table .vxe-loading{background-color:transparent}.vxe-grid.is--maximize{position:fixed;top:0;left:0;width:100%;height:100%;padding:.5em 1em;background-color:var(--vxe-ui-layout-background-color)}.vxe-grid .vxe-grid--bottom-wrapper,.vxe-grid .vxe-grid--form-wrapper,.vxe-grid .vxe-grid--top-wrapper{position:relative}.vxe-grid .vxe-grid--table-container{display:flex;flex-direction:row}.vxe-grid .vxe-grid--left-wrapper,.vxe-grid .vxe-grid--right-wrapper{flex-shrink:0;overflow:auto;outline:0}.vxe-grid .vxe-grid--table-wrapper{flex-grow:1;overflow:hidden}.vxe-grid--layout-body-wrapper{display:flex;flex-direction:row;overflow:auto;flex-grow:1}.vxe-grid--layout-body-content-wrapper{flex-grow:1;overflow:auto}.vxe-grid--layout-aside-left-wrapper,.vxe-grid--layout-footer-wrapper,.vxe-grid--layout-header-wrapper{flex-shrink:0}.vxe-grid--layout-aside-left-wrapper{overflow:auto}.vxe-grid{font-size:var(--vxe-ui-font-size-default)}.vxe-grid.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-grid.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-grid.size--mini{font-size:var(--vxe-ui-font-size-mini)}
Binary file
Binary file
Binary file
package/es/index.esm.js DELETED
@@ -1,3 +0,0 @@
1
- import * as VxeUITableExport from './components';
2
- export * from './components';
3
- export default VxeUITableExport;
@@ -1,2 +0,0 @@
1
- declare const langMsgs: { [key: string]: any }
2
- export default langMsgs
@@ -1,2 +0,0 @@
1
- declare const langMsgs: { [key: string]: any }
2
- export default langMsgs
@@ -1,2 +0,0 @@
1
- declare const langMsgs: { [key: string]: any }
2
- export default langMsgs
@@ -1,2 +0,0 @@
1
- declare const langMsgs: { [key: string]: any }
2
- export default langMsgs
@@ -1,2 +0,0 @@
1
- declare const langMsgs: { [key: string]: any }
2
- export default langMsgs
@@ -1,2 +0,0 @@
1
- declare const langMsgs: { [key: string]: any }
2
- export default langMsgs
@@ -1,2 +0,0 @@
1
- declare const langMsgs: { [key: string]: any }
2
- export default langMsgs
@@ -1,2 +0,0 @@
1
- declare const langMsgs: { [key: string]: any }
2
- export default langMsgs