vxe-table 4.13.44 → 4.13.46

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 (181) hide show
  1. package/README.md +4 -4
  2. package/es/{iconfont.1750301328949.ttf → iconfont.1750660623154.ttf} +0 -0
  3. package/es/iconfont.1750660623154.woff +0 -0
  4. package/es/iconfont.1750660623154.woff2 +0 -0
  5. package/es/index.css +1 -1
  6. package/es/index.min.css +1 -1
  7. package/es/locale/lang/ar-EG.js +5 -1
  8. package/es/locale/lang/de-DE.js +5 -1
  9. package/es/locale/lang/en-US.js +5 -1
  10. package/es/locale/lang/es-ES.js +5 -1
  11. package/es/locale/lang/fr-FR.js +5 -1
  12. package/es/locale/lang/hu-HU.js +5 -1
  13. package/es/locale/lang/hy-AM.js +5 -1
  14. package/es/locale/lang/id-ID.js +5 -1
  15. package/es/locale/lang/it-IT.js +5 -1
  16. package/es/locale/lang/ja-JP.js +5 -1
  17. package/es/locale/lang/ko-KR.js +5 -1
  18. package/es/locale/lang/ms-MY.js +5 -1
  19. package/es/locale/lang/nb-NO.js +5 -1
  20. package/es/locale/lang/pt-BR.js +5 -1
  21. package/es/locale/lang/ru-RU.js +5 -1
  22. package/es/locale/lang/th-TH.js +5 -1
  23. package/es/locale/lang/ug-CN.js +5 -1
  24. package/es/locale/lang/uk-UA.js +5 -1
  25. package/es/locale/lang/uz-UZ.js +5 -1
  26. package/es/locale/lang/vi-VN.js +5 -1
  27. package/es/locale/lang/zh-CHT.js +6 -2
  28. package/es/locale/lang/zh-CN.js +5 -1
  29. package/es/style.css +1 -1
  30. package/es/style.min.css +1 -1
  31. package/es/table/module/custom/hook.js +9 -1
  32. package/es/table/module/custom/panel.js +320 -224
  33. package/es/table/module/edit/hook.js +24 -10
  34. package/es/table/module/export/hook.js +19 -6
  35. package/es/table/src/cell.js +4 -4
  36. package/es/table/src/emits.js +3 -0
  37. package/es/table/src/table.js +40 -7
  38. package/es/table/style.css +37 -9
  39. package/es/table/style.min.css +1 -1
  40. package/es/ui/index.js +8 -2
  41. package/es/ui/src/log.js +1 -1
  42. package/es/vxe-table/style.css +37 -9
  43. package/es/vxe-table/style.min.css +1 -1
  44. package/lib/{iconfont.1750301328949.ttf → iconfont.1750660623154.ttf} +0 -0
  45. package/lib/iconfont.1750660623154.woff +0 -0
  46. package/lib/iconfont.1750660623154.woff2 +0 -0
  47. package/lib/index.css +1 -1
  48. package/lib/index.min.css +1 -1
  49. package/lib/index.umd.js +282 -90
  50. package/lib/index.umd.min.js +1 -1
  51. package/lib/locale/lang/ar-EG.js +5 -1
  52. package/lib/locale/lang/ar-EG.min.js +1 -1
  53. package/lib/locale/lang/ar-EG.umd.js +5 -1
  54. package/lib/locale/lang/de-DE.js +5 -1
  55. package/lib/locale/lang/de-DE.min.js +1 -1
  56. package/lib/locale/lang/de-DE.umd.js +5 -1
  57. package/lib/locale/lang/en-US.js +5 -1
  58. package/lib/locale/lang/en-US.min.js +1 -1
  59. package/lib/locale/lang/en-US.umd.js +5 -1
  60. package/lib/locale/lang/es-ES.js +5 -1
  61. package/lib/locale/lang/es-ES.min.js +1 -1
  62. package/lib/locale/lang/es-ES.umd.js +5 -1
  63. package/lib/locale/lang/fr-FR.js +5 -1
  64. package/lib/locale/lang/fr-FR.min.js +1 -1
  65. package/lib/locale/lang/fr-FR.umd.js +5 -1
  66. package/lib/locale/lang/hu-HU.js +5 -1
  67. package/lib/locale/lang/hu-HU.min.js +1 -1
  68. package/lib/locale/lang/hu-HU.umd.js +5 -1
  69. package/lib/locale/lang/hy-AM.js +5 -1
  70. package/lib/locale/lang/hy-AM.min.js +1 -1
  71. package/lib/locale/lang/hy-AM.umd.js +5 -1
  72. package/lib/locale/lang/id-ID.js +5 -1
  73. package/lib/locale/lang/id-ID.min.js +1 -1
  74. package/lib/locale/lang/id-ID.umd.js +5 -1
  75. package/lib/locale/lang/it-IT.js +5 -1
  76. package/lib/locale/lang/it-IT.min.js +1 -1
  77. package/lib/locale/lang/it-IT.umd.js +5 -1
  78. package/lib/locale/lang/ja-JP.js +5 -1
  79. package/lib/locale/lang/ja-JP.min.js +1 -1
  80. package/lib/locale/lang/ja-JP.umd.js +5 -1
  81. package/lib/locale/lang/ko-KR.js +5 -1
  82. package/lib/locale/lang/ko-KR.min.js +1 -1
  83. package/lib/locale/lang/ko-KR.umd.js +5 -1
  84. package/lib/locale/lang/ms-MY.js +5 -1
  85. package/lib/locale/lang/ms-MY.min.js +1 -1
  86. package/lib/locale/lang/ms-MY.umd.js +5 -1
  87. package/lib/locale/lang/nb-NO.js +5 -1
  88. package/lib/locale/lang/nb-NO.min.js +1 -1
  89. package/lib/locale/lang/nb-NO.umd.js +5 -1
  90. package/lib/locale/lang/pt-BR.js +5 -1
  91. package/lib/locale/lang/pt-BR.min.js +1 -1
  92. package/lib/locale/lang/pt-BR.umd.js +5 -1
  93. package/lib/locale/lang/ru-RU.js +5 -1
  94. package/lib/locale/lang/ru-RU.min.js +1 -1
  95. package/lib/locale/lang/ru-RU.umd.js +5 -1
  96. package/lib/locale/lang/th-TH.js +5 -1
  97. package/lib/locale/lang/th-TH.min.js +1 -1
  98. package/lib/locale/lang/th-TH.umd.js +5 -1
  99. package/lib/locale/lang/ug-CN.js +5 -1
  100. package/lib/locale/lang/ug-CN.min.js +1 -1
  101. package/lib/locale/lang/ug-CN.umd.js +5 -1
  102. package/lib/locale/lang/uk-UA.js +5 -1
  103. package/lib/locale/lang/uk-UA.min.js +1 -1
  104. package/lib/locale/lang/uk-UA.umd.js +5 -1
  105. package/lib/locale/lang/uz-UZ.js +5 -1
  106. package/lib/locale/lang/uz-UZ.min.js +1 -1
  107. package/lib/locale/lang/uz-UZ.umd.js +5 -1
  108. package/lib/locale/lang/vi-VN.js +5 -1
  109. package/lib/locale/lang/vi-VN.min.js +1 -1
  110. package/lib/locale/lang/vi-VN.umd.js +5 -1
  111. package/lib/locale/lang/zh-CHT.js +6 -2
  112. package/lib/locale/lang/zh-CHT.min.js +1 -1
  113. package/lib/locale/lang/zh-CHT.umd.js +6 -2
  114. package/lib/locale/lang/zh-CN.js +5 -1
  115. package/lib/locale/lang/zh-CN.min.js +1 -1
  116. package/lib/locale/lang/zh-CN.umd.js +5 -1
  117. package/lib/style.css +1 -1
  118. package/lib/style.min.css +1 -1
  119. package/lib/table/module/custom/hook.js +11 -1
  120. package/lib/table/module/custom/hook.min.js +1 -1
  121. package/lib/table/module/custom/panel.js +181 -60
  122. package/lib/table/module/custom/panel.min.js +1 -1
  123. package/lib/table/module/edit/hook.js +46 -10
  124. package/lib/table/module/edit/hook.min.js +1 -1
  125. package/lib/table/module/export/hook.js +19 -4
  126. package/lib/table/module/export/hook.min.js +1 -1
  127. package/lib/table/src/cell.js +4 -4
  128. package/lib/table/src/cell.min.js +1 -1
  129. package/lib/table/src/emits.js +1 -1
  130. package/lib/table/src/emits.min.js +1 -1
  131. package/lib/table/src/table.js +6 -6
  132. package/lib/table/src/table.min.js +1 -1
  133. package/lib/table/style/style.css +37 -9
  134. package/lib/table/style/style.min.css +1 -1
  135. package/lib/ui/index.js +8 -2
  136. package/lib/ui/index.min.js +1 -1
  137. package/lib/ui/src/log.js +1 -1
  138. package/lib/ui/src/log.min.js +1 -1
  139. package/lib/vxe-table/style/style.css +37 -9
  140. package/lib/vxe-table/style/style.min.css +1 -1
  141. package/package.json +1 -1
  142. package/packages/locale/lang/ar-EG.ts +5 -1
  143. package/packages/locale/lang/de-DE.ts +5 -1
  144. package/packages/locale/lang/en-US.ts +5 -1
  145. package/packages/locale/lang/es-ES.ts +5 -1
  146. package/packages/locale/lang/fr-FR.ts +5 -1
  147. package/packages/locale/lang/hu-HU.ts +5 -1
  148. package/packages/locale/lang/hy-AM.ts +5 -1
  149. package/packages/locale/lang/id-ID.ts +5 -1
  150. package/packages/locale/lang/it-IT.ts +5 -1
  151. package/packages/locale/lang/ja-JP.ts +5 -1
  152. package/packages/locale/lang/ko-KR.ts +5 -1
  153. package/packages/locale/lang/ms-MY.ts +5 -1
  154. package/packages/locale/lang/nb-NO.ts +5 -1
  155. package/packages/locale/lang/pt-BR.ts +5 -1
  156. package/packages/locale/lang/ru-RU.ts +5 -1
  157. package/packages/locale/lang/th-TH.ts +5 -1
  158. package/packages/locale/lang/ug-CN.ts +5 -1
  159. package/packages/locale/lang/uk-UA.ts +5 -1
  160. package/packages/locale/lang/uz-UZ.ts +5 -1
  161. package/packages/locale/lang/vi-VN.ts +5 -1
  162. package/packages/locale/lang/zh-CHT.ts +6 -2
  163. package/packages/locale/lang/zh-CN.ts +5 -1
  164. package/packages/table/module/custom/hook.ts +10 -1
  165. package/packages/table/module/custom/panel.ts +338 -236
  166. package/packages/table/module/edit/hook.ts +24 -10
  167. package/packages/table/module/export/hook.ts +18 -7
  168. package/packages/table/src/cell.ts +4 -4
  169. package/packages/table/src/emits.ts +3 -0
  170. package/packages/table/src/table.ts +30 -8
  171. package/packages/ui/index.ts +7 -1
  172. package/styles/components/icon.scss +9 -1
  173. package/styles/components/table-module/custom.scss +26 -3
  174. package/styles/helpers/baseMixin.scss +16 -2
  175. package/styles/icon/iconfont.ttf +0 -0
  176. package/styles/icon/iconfont.woff +0 -0
  177. package/styles/icon/iconfont.woff2 +0 -0
  178. package/es/iconfont.1750301328949.woff +0 -0
  179. package/es/iconfont.1750301328949.woff2 +0 -0
  180. package/lib/iconfont.1750301328949.woff +0 -0
  181. package/lib/iconfont.1750301328949.woff2 +0 -0
@@ -1,4 +1,4 @@
1
- import { h, inject, ref, Ref, VNode, PropType, nextTick, TransitionGroup, createCommentVNode } from 'vue'
1
+ import { h, inject, ref, Ref, provide, VNode, PropType, nextTick, TransitionGroup, createCommentVNode, reactive } from 'vue'
2
2
  import { defineVxeComponent } from '../../../ui/src/comp'
3
3
  import { VxeUI } from '../../../ui'
4
4
  import { formatText } from '../../../ui/src/utils'
@@ -7,7 +7,7 @@ import { errLog } from '../../../ui/src/log'
7
7
  import XEUtils from 'xe-utils'
8
8
 
9
9
  import type { VxeModalComponent, VxeDrawerComponent, VxeButtonComponent, VxeRadioGroupComponent, VxeInputComponent, VxeButtonEvents } from 'vxe-pc-ui'
10
- import type { VxeTableDefines, VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeColumnPropTypes } from '../../../../types'
10
+ import type { VxeTableDefines, VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeColumnPropTypes, VxeTableCustomPanelConstructor, TableCustomPanelReactData, TableCustomPanelInternalData, TableCustomPanelPrivateRef, TableCustomPanelPrivateComputed } from '../../../../types'
11
11
 
12
12
  const { getI18n, getIcon, renderEmptyElement } = VxeUI
13
13
 
@@ -19,7 +19,9 @@ export default defineVxeComponent({
19
19
  default: () => ({})
20
20
  }
21
21
  },
22
- setup (props) {
22
+ setup (props, context) {
23
+ const xID = XEUtils.uniqueId()
24
+
23
25
  const VxeUIModalComponent = VxeUI.getComponent<VxeModalComponent>('VxeModal')
24
26
  const VxeUIDrawerComponent = VxeUI.getComponent<VxeDrawerComponent>('VxeDrawer')
25
27
  const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
@@ -28,19 +30,38 @@ export default defineVxeComponent({
28
30
 
29
31
  const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
30
32
 
31
- const { props: tableProps, reactData, internalData } = $xeTable
33
+ const { props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable
32
34
  const { computeCustomOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts } = $xeTable.getComputeMaps()
33
35
 
34
36
  const refElem = ref() as Ref<HTMLDivElement>
35
- const bodyElemRef = ref() as Ref<HTMLDivElement>
37
+ const refBodyWrapperElem = ref() as Ref<HTMLDivElement>
38
+ const refCustomBodyElem = ref() as Ref<HTMLDivElement>
36
39
  const refDragLineElem = ref() as Ref<HTMLDivElement>
37
40
  const refDragTipElem = ref() as Ref<HTMLDivElement>
38
41
 
39
- const dragColumnRef = ref<VxeTableDefines.ColumnInfo | null>()
42
+ const customPanelReactData: TableCustomPanelReactData = reactive({
43
+ dragCol: null,
44
+ prevDragGroup: null,
45
+ prevDragValues: null,
46
+ dragTipText: ''
47
+ })
48
+
49
+ const customPanelInternalData: TableCustomPanelInternalData = {
50
+ // prevDragCol: undefined,
51
+ // prevDragToChild: false,
52
+ // prevDragPos: null
53
+ }
40
54
 
41
- let prevDragCol: VxeTableDefines.ColumnInfo | undefined
42
- let prevDragToChild = false
43
- let prevDragPos: any
55
+ const refMaps: TableCustomPanelPrivateRef = {
56
+ refElem,
57
+ refBodyWrapperElem,
58
+ refCustomBodyElem,
59
+ refDragLineElem,
60
+ refDragTipElem
61
+ }
62
+
63
+ const computeMaps: TableCustomPanelPrivateComputed = {
64
+ }
44
65
 
45
66
  const handleWrapperMouseenterEvent = (evnt: Event) => {
46
67
  const { customStore } = props
@@ -59,7 +80,7 @@ export default defineVxeComponent({
59
80
  }
60
81
 
61
82
  const confirmCustomEvent: VxeButtonEvents.Click = ({ $event }) => {
62
- reactData.isCustomStatus = true
83
+ tableReactData.isCustomStatus = true
63
84
  $xeTable.saveCustom()
64
85
  $xeTable.closeCustom()
65
86
  $xeTable.emitCustomEvent('confirm', $event)
@@ -99,7 +120,7 @@ export default defineVxeComponent({
99
120
  }
100
121
 
101
122
  const handleOptionCheck = (column: VxeTableDefines.ColumnInfo) => {
102
- const { customColumnList } = reactData
123
+ const { customColumnList } = tableReactData
103
124
  const matchObj = XEUtils.findTree(customColumnList, item => item === column)
104
125
  if (matchObj && matchObj.parent) {
105
126
  const { parent } = matchObj
@@ -111,7 +132,7 @@ export default defineVxeComponent({
111
132
  }
112
133
  }
113
134
 
114
- const changeCheckboxOption = (column: VxeTableDefines.ColumnInfo) => {
135
+ const changeCheckboxOption = (column: VxeTableDefines.ColumnInfo, evnt: MouseEvent) => {
115
136
  const isChecked = !column.renderVisible
116
137
  const customOpts = computeCustomOpts.value
117
138
  if (customOpts.immediate) {
@@ -120,7 +141,7 @@ export default defineVxeComponent({
120
141
  item.renderVisible = isChecked
121
142
  item.halfVisible = false
122
143
  })
123
- reactData.isCustomStatus = true
144
+ tableReactData.isCustomStatus = true
124
145
  $xeTable.handleCustom()
125
146
  $xeTable.saveCustomStore('update:visible')
126
147
  } else {
@@ -131,6 +152,7 @@ export default defineVxeComponent({
131
152
  }
132
153
  handleOptionCheck(column)
133
154
  $xeTable.checkCustomStatus()
155
+ $xeTable.dispatchEvent('custom-visible-change', { column, checked: isChecked }, evnt)
134
156
  }
135
157
 
136
158
  const changeColumnWidth = (column: VxeTableDefines.ColumnInfo) => {
@@ -139,65 +161,83 @@ export default defineVxeComponent({
139
161
  if (column.renderResizeWidth !== column.renderWidth) {
140
162
  column.resizeWidth = column.renderResizeWidth
141
163
  column.renderWidth = column.renderResizeWidth
142
- reactData.isCustomStatus = true
164
+ tableReactData.isCustomStatus = true
143
165
  $xeTable.handleCustom()
144
166
  $xeTable.saveCustomStore('update:width')
145
167
  }
146
168
  }
147
169
  }
148
170
 
149
- const changeFixedOption = (column: VxeTableDefines.ColumnInfo, colFixed: VxeColumnPropTypes.Fixed) => {
171
+ const changeFixedOption = (column: VxeTableDefines.ColumnInfo, colFixed: VxeColumnPropTypes.Fixed, evnt: Event) => {
150
172
  const isMaxFixedColumn = computeIsMaxFixedColumn.value
151
173
  const customOpts = computeCustomOpts.value
174
+ let targetFixed: VxeColumnPropTypes.Fixed = null
152
175
  if (customOpts.immediate) {
153
176
  if (column.renderFixed === colFixed) {
177
+ targetFixed = ''
154
178
  XEUtils.eachTree([column], col => {
155
179
  col.fixed = ''
156
180
  col.renderFixed = ''
157
181
  })
158
182
  } else {
159
183
  if (!isMaxFixedColumn || column.renderFixed) {
184
+ targetFixed = colFixed
160
185
  XEUtils.eachTree([column], col => {
161
186
  col.fixed = colFixed
162
187
  col.renderFixed = colFixed
163
188
  })
164
189
  }
165
190
  }
166
- reactData.isCustomStatus = true
191
+ tableReactData.isCustomStatus = true
167
192
  $xeTable.handleCustom()
168
193
  $xeTable.saveCustomStore('update:fixed')
169
194
  } else {
170
195
  if (column.renderFixed === colFixed) {
196
+ targetFixed = ''
171
197
  XEUtils.eachTree([column], col => {
172
198
  col.renderFixed = ''
173
199
  })
174
200
  } else {
175
201
  if (!isMaxFixedColumn || column.renderFixed) {
202
+ targetFixed = colFixed
176
203
  XEUtils.eachTree([column], col => {
177
204
  col.renderFixed = colFixed
178
205
  })
179
206
  }
180
207
  }
181
208
  }
209
+ if (!targetFixed !== null) {
210
+ $xeTable.dispatchEvent('custom-fixed-change', { column, fixed: targetFixed }, evnt)
211
+ }
182
212
  }
183
213
 
184
- const allOptionEvent = () => {
214
+ const allOptionEvent = (evnt: MouseEvent) => {
215
+ const { customStore } = tableReactData
216
+ const isAll = !customStore.isAll
185
217
  $xeTable.toggleCustomAllCheckbox()
218
+ $xeTable.dispatchEvent('custom-visible-all', { checked: isAll }, evnt)
186
219
  }
187
220
 
188
221
  const showDropTip = (evnt: DragEvent | MouseEvent, optEl: HTMLElement | null, showLine: boolean, dragPos: string) => {
189
- const el = bodyElemRef.value
190
- if (!el) {
222
+ const bodyWrapperElem = refBodyWrapperElem.value
223
+ if (!bodyWrapperElem) {
224
+ return
225
+ }
226
+ const customBodyElem = refCustomBodyElem.value
227
+ if (!customBodyElem) {
191
228
  return
192
229
  }
193
- const wrapperRect = el.getBoundingClientRect()
230
+ const { prevDragToChild } = customPanelInternalData
231
+ const bodyWrapperRect = bodyWrapperElem.getBoundingClientRect()
232
+ const customBodyRect = customBodyElem.getBoundingClientRect()
194
233
  if (optEl) {
195
234
  const dragLineEl = refDragLineElem.value
196
235
  if (dragLineEl) {
197
236
  if (showLine) {
198
237
  const optRect = optEl.getBoundingClientRect()
199
238
  dragLineEl.style.display = 'block'
200
- dragLineEl.style.top = `${Math.max(1, optRect.y + el.scrollTop - wrapperRect.y)}px`
239
+ dragLineEl.style.left = `${Math.max(0, customBodyRect.x - bodyWrapperRect.x)}px`
240
+ dragLineEl.style.top = `${Math.max(1, optRect.y + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`
201
241
  dragLineEl.style.height = `${optRect.height}px`
202
242
  dragLineEl.style.width = `${optRect.width}px`
203
243
  dragLineEl.setAttribute('drag-pos', dragPos)
@@ -210,12 +250,29 @@ export default defineVxeComponent({
210
250
  const dragTipEl = refDragTipElem.value
211
251
  if (dragTipEl) {
212
252
  dragTipEl.style.display = 'block'
213
- dragTipEl.style.top = `${Math.min(el.clientHeight + el.scrollTop - dragTipEl.clientHeight, evnt.clientY + el.scrollTop - wrapperRect.y)}px`
214
- dragTipEl.style.left = `${Math.min(el.clientWidth + el.scrollLeft - dragTipEl.clientWidth, evnt.clientX + el.scrollLeft - wrapperRect.x)}px`
253
+ dragTipEl.style.top = `${Math.min(bodyWrapperElem.clientHeight + bodyWrapperElem.scrollTop - dragTipEl.clientHeight, evnt.clientY + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`
254
+ dragTipEl.style.left = `${Math.min(bodyWrapperElem.clientWidth + bodyWrapperElem.scrollLeft - dragTipEl.clientWidth, evnt.clientX + bodyWrapperElem.scrollLeft - bodyWrapperRect.x)}px`
215
255
  dragTipEl.setAttribute('drag-status', showLine ? (prevDragToChild ? 'sub' : 'normal') : 'disabled')
216
256
  }
217
257
  }
218
258
 
259
+ const updateColDropTipContent = () => {
260
+ const { dragCol } = customPanelReactData
261
+ const columnDragOpts = computeColumnDragOpts.value
262
+ const { tooltipMethod } = columnDragOpts
263
+ let tipContent = ''
264
+ if (tooltipMethod) {
265
+ const dtParams = {
266
+ $table: $xeTable,
267
+ column: dragCol as VxeTableDefines.ColumnInfo
268
+ }
269
+ tipContent = `${tooltipMethod(dtParams) || ''}`
270
+ } else {
271
+ tipContent = getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : ''])
272
+ }
273
+ customPanelReactData.dragTipText = tipContent
274
+ }
275
+
219
276
  const hideDropTip = () => {
220
277
  const dragTipEl = refDragTipElem.value
221
278
  const dragLineEl = refDragLineElem.value
@@ -235,7 +292,8 @@ export default defineVxeComponent({
235
292
  const colid = trEl.getAttribute('colid')
236
293
  const column = $xeTable.getColumnById(colid)
237
294
  trEl.draggable = true
238
- dragColumnRef.value = column
295
+ customPanelReactData.dragCol = column
296
+ updateColDropTipContent()
239
297
  addClass(trEl, 'active--drag-origin')
240
298
  }
241
299
 
@@ -246,7 +304,7 @@ export default defineVxeComponent({
246
304
  const trEl = tdEl.parentElement as HTMLElement
247
305
  hideDropTip()
248
306
  trEl.draggable = false
249
- dragColumnRef.value = null
307
+ customPanelReactData.dragCol = null
250
308
  removeClass(trEl, 'active--drag-origin')
251
309
  }
252
310
 
@@ -254,20 +312,28 @@ export default defineVxeComponent({
254
312
  if (evnt.dataTransfer) {
255
313
  evnt.dataTransfer.setDragImage(getTpImg(), 0, 0)
256
314
  }
315
+ customPanelInternalData.prevDragGroup = null
316
+ customPanelInternalData.prevDragValues = null
257
317
  }
258
318
 
259
319
  const sortDragendEvent = (evnt: DragEvent) => {
260
320
  const { mouseConfig } = tableProps
261
- const { customColumnList } = reactData
262
- const { collectColumn } = internalData
321
+ const { customColumnList } = tableReactData
322
+ const { collectColumn } = tableInternalData
263
323
  const customOpts = computeCustomOpts.value
264
324
  const { immediate } = customOpts
265
325
  const trEl = evnt.currentTarget as HTMLElement
266
- const dragCol = dragColumnRef.value
267
326
  const columnDragOpts = computeColumnDragOpts.value
268
327
  const { isCrossDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod } = columnDragOpts
328
+ const { dragCol } = customPanelReactData
329
+ const { prevDragCol, prevDragGroup, prevDragValues, prevDragPos, prevDragToChild } = customPanelInternalData
269
330
  const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0
270
- if (prevDragCol && dragCol) {
331
+
332
+ if (prevDragGroup || prevDragValues) {
333
+ if ($xeTable.handlePivotTableAggregatePanelDragendEvent) {
334
+ $xeTable.handlePivotTableAggregatePanelDragendEvent(evnt)
335
+ }
336
+ } else if (prevDragCol && dragCol) {
271
337
  // 判断是否有拖动
272
338
  if (prevDragCol !== dragCol) {
273
339
  const dragColumn = dragCol
@@ -399,7 +465,7 @@ export default defineVxeComponent({
399
465
  customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn)
400
466
  }
401
467
 
402
- reactData.isDragColMove = true
468
+ tableReactData.isDragColMove = true
403
469
  if (mouseConfig) {
404
470
  if ($xeTable.clearSelected) {
405
471
  $xeTable.clearSelected()
@@ -423,7 +489,7 @@ export default defineVxeComponent({
423
489
  }, evnt)
424
490
 
425
491
  if (immediate) {
426
- reactData.customColumnList = collectColumn.slice(0)
492
+ tableReactData.customColumnList = collectColumn.slice(0)
427
493
  $xeTable.handleColDragSwapColumn()
428
494
  }
429
495
  }).catch(() => {
@@ -432,7 +498,9 @@ export default defineVxeComponent({
432
498
  }
433
499
 
434
500
  hideDropTip()
435
- dragColumnRef.value = null
501
+ customPanelReactData.dragCol = null
502
+ customPanelInternalData.prevDragGroup = null
503
+ customPanelInternalData.prevDragValues = null
436
504
  trEl.draggable = false
437
505
  trEl.removeAttribute('drag-pos')
438
506
  removeClass(trEl, 'active--drag-target')
@@ -448,7 +516,9 @@ export default defineVxeComponent({
448
516
  const isControlKey = hasControlKey(evnt)
449
517
  const colid = optEl.getAttribute('colid')
450
518
  const column = $xeTable.getColumnById(colid)
451
- const dragCol = dragColumnRef.value
519
+ const { dragCol } = customPanelReactData
520
+ customPanelInternalData.prevDragGroup = null
521
+ customPanelInternalData.prevDragValues = null
452
522
  // 是否移入有效列
453
523
  if (column && (isCrossDrag || column.level === 1)) {
454
524
  evnt.preventDefault()
@@ -463,15 +533,15 @@ export default defineVxeComponent({
463
533
  showDropTip(evnt, optEl, false, dragPos)
464
534
  return
465
535
  }
466
- prevDragToChild = !!((isCrossDrag && isToChildDrag) && isControlKey && immediate)
467
- prevDragCol = column
468
- prevDragPos = dragPos
536
+ customPanelInternalData.prevDragToChild = !!((isCrossDrag && isToChildDrag) && isControlKey && immediate)
537
+ customPanelInternalData.prevDragCol = column
538
+ customPanelInternalData.prevDragPos = dragPos
469
539
  showDropTip(evnt, optEl, true, dragPos)
470
540
  }
471
541
  }
472
542
 
473
543
  const renderDragTip = () => {
474
- const dragCol = dragColumnRef.value
544
+ const { dragTipText } = customPanelReactData
475
545
  const columnDragOpts = computeColumnDragOpts.value
476
546
  return h('div', {}, [
477
547
  h('div', {
@@ -496,13 +566,19 @@ export default defineVxeComponent({
496
566
  h('span', {
497
567
  class: ['vxe-table-custom-popup--drag-tip-sub-status', getIcon().TABLE_DRAG_STATUS_SUB_ROW]
498
568
  }),
569
+ h('span', {
570
+ class: ['vxe-table-custom-popup--drag-tip-group-status', getIcon().TABLE_DRAG_STATUS_AGG_GROUP]
571
+ }),
572
+ h('span', {
573
+ class: ['vxe-table-custom-popup--drag-tip-values-status', getIcon().TABLE_DRAG_STATUS_AGG_VALUES]
574
+ }),
499
575
  h('span', {
500
576
  class: ['vxe-table-custom-popup--drag-tip-disabled-status', getIcon().TABLE_DRAG_DISABLED]
501
577
  })
502
578
  ]),
503
579
  h('div', {
504
580
  class: 'vxe-table-custom-popup--drag-tip-content'
505
- }, getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']))
581
+ }, `${dragTipText || ''}`)
506
582
  ])
507
583
  ])
508
584
  ])
@@ -514,7 +590,7 @@ export default defineVxeComponent({
514
590
 
515
591
  const { customStore } = props
516
592
  const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps
517
- const { isCustomStatus, customColumnList } = reactData
593
+ const { isCustomStatus, customColumnList } = tableReactData
518
594
  const customOpts = computeCustomOpts.value
519
595
  const { immediate } = customOpts
520
596
  const columnDragOpts = computeColumnDragOpts.value
@@ -574,9 +650,9 @@ export default defineVxeComponent({
574
650
  'is--disabled': isDisabled
575
651
  }],
576
652
  title: getI18n('vxe.custom.setting.colVisible'),
577
- onClick: () => {
653
+ onClick: (evnt: MouseEvent) => {
578
654
  if (!isDisabled) {
579
- changeCheckboxOption(column)
655
+ changeCheckboxOption(column, evnt)
580
656
  }
581
657
  }
582
658
  }, [
@@ -632,8 +708,8 @@ export default defineVxeComponent({
632
708
  status: column.renderFixed === 'left' ? 'primary' : '',
633
709
  disabled: isDisabled || isHidden || (isMaxFixedColumn && !column.renderFixed),
634
710
  title: getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft'),
635
- onClick: () => {
636
- changeFixedOption(column, 'left')
711
+ onClick: ({ $event }) => {
712
+ changeFixedOption(column, 'left', $event)
637
713
  }
638
714
  })
639
715
  : createCommentVNode(),
@@ -644,8 +720,8 @@ export default defineVxeComponent({
644
720
  status: column.renderFixed === 'right' ? 'primary' : '',
645
721
  disabled: isDisabled || isHidden || (isMaxFixedColumn && !column.renderFixed),
646
722
  title: getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight'),
647
- onClick: () => {
648
- changeFixedOption(column, 'right')
723
+ onClick: ({ $event }) => {
724
+ changeFixedOption(column, 'right', $event)
649
725
  }
650
726
  })
651
727
  : createCommentVNode()
@@ -668,120 +744,125 @@ export default defineVxeComponent({
668
744
  : {}
669
745
  }, customStore.visible
670
746
  ? [
671
- !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
672
- ? h($xeTable.getPivotTableAggregateSimplePanel(), {
673
- customStore
674
- })
675
- : renderEmptyElement($xeTable),
676
747
  h('div', {
677
- class: 'vxe-table-custom--handle-wrapper'
748
+ ref: refBodyWrapperElem,
749
+ class: 'vxe-table-custom-simple--body-wrapper'
678
750
  }, [
751
+ !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
752
+ ? h($xeTable.getPivotTableAggregateSimplePanel(), {
753
+ customStore
754
+ })
755
+ : renderEmptyElement($xeTable),
679
756
  h('div', {
680
- class: 'vxe-table-custom--header'
681
- }, headerSlot
682
- ? $xeTable.callSlot(headerSlot, params)
683
- : [
684
- h('ul', {
685
- class: 'vxe-table-custom--panel-list'
686
- }, [
687
- h('li', {
688
- class: 'vxe-table-custom--option'
757
+ ref: refCustomBodyElem,
758
+ class: 'vxe-table-custom--handle-wrapper'
759
+ }, [
760
+ h('div', {
761
+ class: 'vxe-table-custom--header'
762
+ }, headerSlot
763
+ ? $xeTable.callSlot(headerSlot, params)
764
+ : [
765
+ h('ul', {
766
+ class: 'vxe-table-custom--panel-list'
689
767
  }, [
690
- allowVisible
691
- ? h('div', {
692
- class: ['vxe-table-custom--checkbox-option', {
693
- 'is--checked': isAllChecked,
694
- 'is--indeterminate': isAllIndeterminate
695
- }],
696
- title: getI18n('vxe.table.allTitle'),
697
- onClick: allOptionEvent
698
- }, [
699
- h('span', {
700
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
701
- }),
702
- h('span', {
768
+ h('li', {
769
+ class: 'vxe-table-custom--option'
770
+ }, [
771
+ allowVisible
772
+ ? h('div', {
773
+ class: ['vxe-table-custom--checkbox-option', {
774
+ 'is--checked': isAllChecked,
775
+ 'is--indeterminate': isAllIndeterminate
776
+ }],
777
+ title: getI18n('vxe.table.allTitle'),
778
+ onClick: allOptionEvent
779
+ }, [
780
+ h('span', {
781
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
782
+ }),
783
+ h('span', {
784
+ class: 'vxe-checkbox--label'
785
+ }, getI18n('vxe.toolbar.customAll'))
786
+ ])
787
+ : h('span', {
703
788
  class: 'vxe-checkbox--label'
704
- }, getI18n('vxe.toolbar.customAll'))
705
- ])
706
- : h('span', {
707
- class: 'vxe-checkbox--label'
708
- }, getI18n('vxe.table.customTitle'))
789
+ }, getI18n('vxe.table.customTitle'))
790
+ ])
709
791
  ])
710
- ])
711
- ]),
712
- h('div', {
713
- ref: bodyElemRef,
714
- class: 'vxe-table-custom--body'
715
- }, [
716
- topSlot
717
- ? h('div', {
718
- class: 'vxe-table-custom--panel-top'
719
- }, $xeTable.callSlot(topSlot, params))
720
- : renderEmptyElement($xeTable),
721
- defaultSlot
722
- ? h('div', {
723
- class: 'vxe-table-custom--panel-body'
724
- }, $xeTable.callSlot(defaultSlot, params))
725
- : h(TransitionGroup, {
726
- class: 'vxe-table-custom--panel-list',
727
- name: 'vxe-table-custom--list',
728
- tag: 'ul',
729
- ...customWrapperOns
730
- }, {
731
- default: () => colVNs
732
- }),
733
- bottomSlot
792
+ ]),
793
+ h('div', {
794
+ class: 'vxe-table-custom--body'
795
+ }, [
796
+ topSlot
797
+ ? h('div', {
798
+ class: 'vxe-table-custom--panel-top'
799
+ }, $xeTable.callSlot(topSlot, params))
800
+ : renderEmptyElement($xeTable),
801
+ defaultSlot
802
+ ? h('div', {
803
+ class: 'vxe-table-custom--panel-body'
804
+ }, $xeTable.callSlot(defaultSlot, params))
805
+ : h(TransitionGroup, {
806
+ class: 'vxe-table-custom--panel-list',
807
+ name: 'vxe-table-custom--list',
808
+ tag: 'ul',
809
+ ...customWrapperOns
810
+ }, {
811
+ default: () => colVNs
812
+ }),
813
+ bottomSlot
814
+ ? h('div', {
815
+ class: 'vxe-table-custom--panel-bottom'
816
+ }, $xeTable.callSlot(bottomSlot, params))
817
+ : renderEmptyElement($xeTable)
818
+ ]),
819
+ customOpts.showFooter
734
820
  ? h('div', {
735
- class: 'vxe-table-custom--panel-bottom'
736
- }, $xeTable.callSlot(bottomSlot, params))
737
- : renderEmptyElement($xeTable),
738
- renderDragTip()
739
- ]),
740
- customOpts.showFooter
741
- ? h('div', {
742
- class: 'vxe-table-custom--footer'
743
- }, footerSlot
744
- ? $xeTable.callSlot(footerSlot, params)
745
- : [
746
- h('div', {
747
- class: 'vxe-table-custom--footer-buttons'
748
- }, [
749
- VxeUIButtonComponent
750
- ? h(VxeUIButtonComponent, {
751
- mode: 'text',
752
- content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
753
- disabled: !isCustomStatus,
754
- onClick: resetCustomEvent
755
- })
756
- : createCommentVNode(),
757
- immediate
758
- ? (VxeUIButtonComponent
759
- ? h(VxeUIButtonComponent, {
760
- mode: 'text',
761
- content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
762
- onClick: cancelCloseEvent
763
- })
764
- : createCommentVNode())
765
- : (VxeUIButtonComponent
766
- ? h(VxeUIButtonComponent, {
767
- mode: 'text',
768
- content: customOpts.cancelButtonText || getI18n('vxe.table.customCancel'),
769
- onClick: cancelCustomEvent
770
- })
771
- : createCommentVNode()),
772
- immediate
773
- ? createCommentVNode()
774
- : (VxeUIButtonComponent
775
- ? h(VxeUIButtonComponent, {
776
- mode: 'text',
777
- status: 'primary',
778
- content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm'),
779
- onClick: confirmCustomEvent
780
- })
781
- : createCommentVNode())
821
+ class: 'vxe-table-custom--footer'
822
+ }, footerSlot
823
+ ? $xeTable.callSlot(footerSlot, params)
824
+ : [
825
+ h('div', {
826
+ class: 'vxe-table-custom--footer-buttons'
827
+ }, [
828
+ VxeUIButtonComponent
829
+ ? h(VxeUIButtonComponent, {
830
+ mode: 'text',
831
+ content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
832
+ disabled: !isCustomStatus,
833
+ onClick: resetCustomEvent
834
+ })
835
+ : createCommentVNode(),
836
+ immediate
837
+ ? (VxeUIButtonComponent
838
+ ? h(VxeUIButtonComponent, {
839
+ mode: 'text',
840
+ content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
841
+ onClick: cancelCloseEvent
842
+ })
843
+ : createCommentVNode())
844
+ : (VxeUIButtonComponent
845
+ ? h(VxeUIButtonComponent, {
846
+ mode: 'text',
847
+ content: customOpts.cancelButtonText || getI18n('vxe.table.customCancel'),
848
+ onClick: cancelCustomEvent
849
+ })
850
+ : createCommentVNode()),
851
+ immediate
852
+ ? createCommentVNode()
853
+ : (VxeUIButtonComponent
854
+ ? h(VxeUIButtonComponent, {
855
+ mode: 'text',
856
+ status: 'primary',
857
+ content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm'),
858
+ onClick: confirmCustomEvent
859
+ })
860
+ : createCommentVNode())
861
+ ])
782
862
  ])
783
- ])
784
- : null
863
+ : null
864
+ ]),
865
+ renderDragTip()
785
866
  ])
786
867
  ]
787
868
  : [])
@@ -792,7 +873,7 @@ export default defineVxeComponent({
792
873
 
793
874
  const { customStore } = props
794
875
  const { resizable: allResizable } = tableProps
795
- const { isCustomStatus, customColumnList } = reactData
876
+ const { isCustomStatus, customColumnList } = tableReactData
796
877
  const customOpts = computeCustomOpts.value
797
878
  const { immediate } = customOpts
798
879
  const columnDragOpts = computeColumnDragOpts.value
@@ -872,9 +953,9 @@ export default defineVxeComponent({
872
953
  'is--disabled': isDisabled
873
954
  }],
874
955
  title: getI18n('vxe.custom.setting.colVisible'),
875
- onClick: () => {
956
+ onClick: (evnt: MouseEvent) => {
876
957
  if (!isDisabled) {
877
- changeCheckboxOption(column)
958
+ changeCheckboxOption(column, evnt)
878
959
  }
879
960
  }
880
961
  }, [
@@ -973,8 +1054,8 @@ export default defineVxeComponent({
973
1054
  { label: getI18n('vxe.custom.setting.fixedUnset'), value: '', disabled: isDisabled || isHidden },
974
1055
  { label: getI18n('vxe.custom.setting.fixedRight'), value: 'right', disabled: isDisabled || isHidden || isMaxFixedColumn }
975
1056
  ],
976
- 'onUpdate:modelValue' (value: any) {
977
- changeFixedOption(column, value)
1057
+ onChange ({ label, $event }) {
1058
+ changeFixedOption(column, label, $event)
978
1059
  }
979
1060
  })
980
1061
  : createCommentVNode()
@@ -987,88 +1068,92 @@ export default defineVxeComponent({
987
1068
  })
988
1069
  const scopedSlots: Record<string, any> = {
989
1070
  default: () => {
990
- if (defaultSlot) {
991
- return $xeTable.callSlot(defaultSlot, params)
992
- }
993
1071
  return h('div', {
994
- ref: bodyElemRef,
995
- class: 'vxe-table-custom-popup--body'
996
- }, [
997
- topSlot
998
- ? h('div', {
999
- class: 'vxe-table-custom-popup--table-top'
1000
- }, $xeTable.callSlot(topSlot, params))
1001
- : renderEmptyElement($xeTable),
1002
- h('div', {
1003
- class: 'vxe-table-custom-popup--table-wrapper'
1004
- }, [
1005
- h('table', {}, [
1006
- h('colgroup', {}, [
1007
- allowVisible
1008
- ? h('col', {
1009
- class: 'vxe-table-custom-popup--table-col-seq'
1010
- })
1011
- : createCommentVNode(),
1012
- h('col', {
1013
- class: 'vxe-table-custom-popup--table-col-title'
1014
- }),
1015
- allowResizable
1016
- ? h('col', {
1017
- class: 'vxe-table-custom-popup--table-col-width'
1018
- })
1019
- : createCommentVNode(),
1020
- allowFixed
1021
- ? h('col', {
1022
- class: 'vxe-table-custom-popup--table-col-fixed'
1023
- })
1024
- : createCommentVNode()
1025
- ]),
1026
- h('thead', {}, [
1027
- h('tr', {}, [
1028
- allowVisible
1029
- ? h('th', {}, [
1030
- h('div', {
1031
- class: ['vxe-table-custom--checkbox-option', {
1032
- 'is--checked': isAllChecked,
1033
- 'is--indeterminate': isAllIndeterminate
1034
- }],
1035
- title: getI18n('vxe.table.allTitle'),
1036
- onClick: allOptionEvent
1037
- }, [
1038
- h('span', {
1039
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
1040
- }),
1041
- h('span', {
1042
- class: 'vxe-checkbox--label'
1043
- }, getI18n('vxe.toolbar.customAll'))
1072
+ ref: refBodyWrapperElem,
1073
+ class: 'vxe-table-custom-popup--body-wrapper'
1074
+ }, defaultSlot
1075
+ ? $xeTable.callSlot(defaultSlot, params)
1076
+ : [
1077
+ h('div', {
1078
+ ref: refCustomBodyElem,
1079
+ class: 'vxe-table-custom-popup--handle-wrapper'
1080
+ }, [
1081
+ topSlot
1082
+ ? h('div', {
1083
+ class: 'vxe-table-custom-popup--table-top'
1084
+ }, $xeTable.callSlot(topSlot, params))
1085
+ : renderEmptyElement($xeTable),
1086
+ h('div', {
1087
+ class: 'vxe-table-custom-popup--table-wrapper'
1088
+ }, [
1089
+ h('table', {}, [
1090
+ h('colgroup', {}, [
1091
+ allowVisible
1092
+ ? h('col', {
1093
+ class: 'vxe-table-custom-popup--table-col-seq'
1094
+ })
1095
+ : createCommentVNode(),
1096
+ h('col', {
1097
+ class: 'vxe-table-custom-popup--table-col-title'
1098
+ }),
1099
+ allowResizable
1100
+ ? h('col', {
1101
+ class: 'vxe-table-custom-popup--table-col-width'
1102
+ })
1103
+ : createCommentVNode(),
1104
+ allowFixed
1105
+ ? h('col', {
1106
+ class: 'vxe-table-custom-popup--table-col-fixed'
1107
+ })
1108
+ : createCommentVNode()
1109
+ ]),
1110
+ h('thead', {}, [
1111
+ h('tr', {}, [
1112
+ allowVisible
1113
+ ? h('th', {}, [
1114
+ h('div', {
1115
+ class: ['vxe-table-custom--checkbox-option', {
1116
+ 'is--checked': isAllChecked,
1117
+ 'is--indeterminate': isAllIndeterminate
1118
+ }],
1119
+ title: getI18n('vxe.table.allTitle'),
1120
+ onClick: allOptionEvent
1121
+ }, [
1122
+ h('span', {
1123
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
1124
+ }),
1125
+ h('span', {
1126
+ class: 'vxe-checkbox--label'
1127
+ }, getI18n('vxe.toolbar.customAll'))
1128
+ ])
1129
+ ])
1130
+ : createCommentVNode(),
1131
+ h('th', {}, getI18n('vxe.custom.setting.colTitle')),
1132
+ allowResizable
1133
+ ? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
1134
+ : createCommentVNode(),
1135
+ allowFixed
1136
+ ? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
1137
+ : createCommentVNode()
1044
1138
  ])
1045
- ])
1046
- : createCommentVNode(),
1047
- h('th', {}, getI18n('vxe.custom.setting.colTitle')),
1048
- allowResizable
1049
- ? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
1050
- : createCommentVNode(),
1051
- allowFixed
1052
- ? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
1053
- : createCommentVNode()
1054
- ])
1055
- ]),
1056
- h(TransitionGroup, {
1057
- class: 'vxe-table-custom--panel-list',
1058
- tag: 'tbody',
1059
- name: 'vxe-table-custom--list'
1060
- }, {
1061
- default: () => trVNs
1062
- })
1139
+ ]),
1140
+ h(TransitionGroup, {
1141
+ class: 'vxe-table-custom--panel-list',
1142
+ tag: 'tbody',
1143
+ name: 'vxe-table-custom--list'
1144
+ }, {
1145
+ default: () => trVNs
1146
+ })
1147
+ ])
1148
+ ]),
1149
+ bottomSlot
1150
+ ? h('div', {
1151
+ class: 'vxe-table-custom-popup--table-bottom'
1152
+ }, $xeTable.callSlot(bottomSlot, params))
1153
+ : renderEmptyElement($xeTable),
1154
+ renderDragTip()
1155
+ ])
1063
1156
  ])
1064
- ]),
1065
- bottomSlot
1066
- ? h('div', {
1067
- class: 'vxe-table-custom-popup--table-bottom'
1068
- }, $xeTable.callSlot(bottomSlot, params))
1069
- : renderEmptyElement($xeTable),
1070
- renderDragTip()
1071
- ])
1072
1157
  },
1073
1158
  footer: () => {
1074
1159
  if (footerSlot) {
@@ -1187,6 +1272,23 @@ export default defineVxeComponent({
1187
1272
  }
1188
1273
  })
1189
1274
 
1190
- return renderVN
1275
+ const $xeTableCustomPanel: VxeTableCustomPanelConstructor = {
1276
+ xID,
1277
+ props,
1278
+ context,
1279
+ reactData: customPanelReactData,
1280
+ internalData: customPanelInternalData,
1281
+ xeTable: $xeTable,
1282
+ getRefMaps: () => refMaps,
1283
+ getComputeMaps: () => computeMaps,
1284
+ renderVN
1285
+ }
1286
+
1287
+ provide('$xeTableCustomPanel', $xeTableCustomPanel)
1288
+
1289
+ return $xeTableCustomPanel
1290
+ },
1291
+ render () {
1292
+ return this.renderVN()
1191
1293
  }
1192
1294
  })