vxe-table 3.18.14 → 3.18.16

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 (71) hide show
  1. package/README.md +1 -1
  2. package/es/grid/src/grid.js +4 -1
  3. package/es/grid/style.css +0 -1
  4. package/es/grid/style.min.css +1 -1
  5. package/es/index.css +1 -1
  6. package/es/index.min.css +1 -1
  7. package/es/locale/lang/en-US.js +2 -2
  8. package/es/style.css +1 -1
  9. package/es/style.min.css +1 -1
  10. package/es/table/module/filter/panel.js +2 -1
  11. package/es/table/module/menu/mixin.js +9 -3
  12. package/es/table/module/menu/panel.js +136 -118
  13. package/es/table/src/header.js +4 -1
  14. package/es/table/src/methods.js +15 -12
  15. package/es/table/src/table.js +52 -28
  16. package/es/table/src/util.js +15 -0
  17. package/es/ui/index.js +8 -5
  18. package/es/ui/src/log.js +1 -1
  19. package/es/vxe-grid/style.css +0 -1
  20. package/es/vxe-grid/style.min.css +1 -1
  21. package/lib/grid/src/grid.js +3 -1
  22. package/lib/grid/src/grid.min.js +1 -1
  23. package/lib/grid/style/style.css +0 -1
  24. package/lib/grid/style/style.min.css +1 -1
  25. package/lib/index.css +1 -1
  26. package/lib/index.min.css +1 -1
  27. package/lib/index.umd.js +132 -51
  28. package/lib/index.umd.min.js +1 -1
  29. package/lib/locale/lang/en-US.js +2 -2
  30. package/lib/locale/lang/en-US.min.js +1 -1
  31. package/lib/locale/lang/en-US.umd.js +2 -2
  32. package/lib/style.css +1 -1
  33. package/lib/style.min.css +1 -1
  34. package/lib/table/module/filter/panel.js +3 -2
  35. package/lib/table/module/filter/panel.min.js +1 -1
  36. package/lib/table/module/menu/mixin.js +12 -3
  37. package/lib/table/module/menu/mixin.min.js +1 -1
  38. package/lib/table/module/menu/panel.js +34 -12
  39. package/lib/table/module/menu/panel.min.js +1 -1
  40. package/lib/table/src/header.js +3 -1
  41. package/lib/table/src/header.min.js +1 -1
  42. package/lib/table/src/methods.js +14 -11
  43. package/lib/table/src/methods.min.js +1 -1
  44. package/lib/table/src/table.js +35 -15
  45. package/lib/table/src/table.min.js +1 -1
  46. package/lib/table/src/util.js +21 -0
  47. package/lib/table/src/util.min.js +1 -1
  48. package/lib/ui/index.js +8 -5
  49. package/lib/ui/index.min.js +1 -1
  50. package/lib/ui/src/log.js +1 -1
  51. package/lib/ui/src/log.min.js +1 -1
  52. package/lib/vxe-grid/style/style.css +0 -1
  53. package/lib/vxe-grid/style/style.min.css +1 -1
  54. package/package.json +1 -1
  55. package/packages/grid/src/grid.ts +4 -1
  56. package/packages/locale/lang/en-US.ts +2 -2
  57. package/packages/table/module/filter/panel.ts +2 -1
  58. package/packages/table/module/menu/mixin.ts +11 -3
  59. package/packages/table/module/menu/panel.ts +137 -117
  60. package/packages/table/src/header.ts +3 -1
  61. package/packages/table/src/methods.ts +15 -12
  62. package/packages/table/src/table.ts +53 -29
  63. package/packages/table/src/util.ts +17 -0
  64. package/packages/ui/index.ts +7 -4
  65. package/styles/components/grid.scss +0 -1
  66. /package/es/{iconfont.1758158482285.ttf → iconfont.1758344480506.ttf} +0 -0
  67. /package/es/{iconfont.1758158482285.woff → iconfont.1758344480506.woff} +0 -0
  68. /package/es/{iconfont.1758158482285.woff2 → iconfont.1758344480506.woff2} +0 -0
  69. /package/lib/{iconfont.1758158482285.ttf → iconfont.1758344480506.ttf} +0 -0
  70. /package/lib/{iconfont.1758158482285.woff → iconfont.1758344480506.woff} +0 -0
  71. /package/lib/{iconfont.1758158482285.woff2 → iconfont.1758344480506.woff2} +0 -0
@@ -170,7 +170,7 @@ export default {
170
170
  const isContentMenu = $xeTable.computeIsContentMenu
171
171
  const menuOpts = $xeTable.computeMenuOpts
172
172
  const config = menuOpts[type]
173
- const visibleMethod = menuOpts.visibleMethod
173
+ const { transfer, visibleMethod } = menuOpts
174
174
  if (config) {
175
175
  const { options, disabled } = config
176
176
  if (disabled) {
@@ -181,9 +181,17 @@ export default {
181
181
  if (!visibleMethod || visibleMethod(params)) {
182
182
  evnt.preventDefault()
183
183
  $xeTable.updateZindex()
184
+ const el = $xeTable.$refs.refElem as HTMLDivElement
185
+ const tableRect = el.getBoundingClientRect()
184
186
  const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode()
185
- let top = evnt.clientY + scrollTop
186
- let left = evnt.clientX + scrollLeft
187
+
188
+ let top = evnt.clientY - tableRect.y
189
+ let left = evnt.clientX - tableRect.x
190
+ if (transfer) {
191
+ top = evnt.clientY + scrollTop
192
+ left = evnt.clientX + scrollLeft
193
+ }
194
+
187
195
  const handleVisible = () => {
188
196
  internalData._currMenuParams = params
189
197
  Object.assign(ctxMenuStore, {
@@ -12,143 +12,163 @@ export default {
12
12
  ctxMenuStore: Object,
13
13
  ctxMenuOpts: Object
14
14
  },
15
+ inject: {
16
+ $xeTable: {
17
+ default: null
18
+ }
19
+ },
15
20
  mounted () {
16
- document.body.appendChild(this.$el)
21
+ const $xeMenuPanel = this
22
+ const $xeTable = $xeMenuPanel.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
23
+ const menuOpts = $xeTable.computeMenuOpts
24
+ const { transfer } = menuOpts
25
+ const el = this.$refs.refElem as HTMLDivElement
26
+
27
+ if (transfer && el) {
28
+ document.body.appendChild(el)
29
+ }
17
30
  },
18
31
  beforeDestroy () {
19
- const { $el } = this
20
- if ($el.parentNode) {
21
- $el.parentNode.removeChild($el)
32
+ const el = this.$refs.refElem as HTMLDivElement
33
+
34
+ if (el && el.parentNode) {
35
+ el.parentNode.removeChild(el)
22
36
  }
23
37
  },
24
38
  render (this: any, h: CreateElement) {
25
- const $xeTable = this.$parent as VxeTableConstructor & VxeTablePrivateMethods
39
+ const $xeMenuPanel = this
40
+ const $xeTable = $xeMenuPanel.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
26
41
  const tableReactData = $xeTable as unknown as TableReactData
27
42
 
28
43
  const { ctxMenuStore } = tableReactData
29
44
  const menuOpts = $xeTable.computeMenuOpts
45
+ const { destroyOnClose } = menuOpts
46
+ const { visible, list, className } = ctxMenuStore
30
47
  return h('div', {
31
- class: ['vxe-table--context-menu-wrapper', menuOpts.className, {
32
- 'is--visible': ctxMenuStore.visible
48
+ ref: 'refElem',
49
+ class: ['vxe-table--context-menu-wrapper', className, {
50
+ 'is--visible': visible
33
51
  }],
34
52
  style: ctxMenuStore.style
35
- }, ctxMenuStore.list.map((options: any, gIndex: any) => {
36
- return options.every((item: any) => item.visible === false)
37
- ? renderEmptyElement($xeTable)
38
- : h('ul', {
39
- class: 'vxe-context-menu--option-wrapper',
40
- key: gIndex
41
- }, options.map((item: any, index: any) => {
42
- const hasChildMenus = item.children && item.children.some((child: any) => child.visible !== false)
43
- const prefixOpts = Object.assign({}, item.prefixConfig)
44
- const suffixOpts = Object.assign({}, item.suffixConfig)
45
- const menuContent = getFuncText(item.name)
46
- return item.visible === false
47
- ? null
48
- : h('li', {
49
- class: [item.className, {
50
- 'link--disabled': item.disabled,
51
- 'link--active': item === ctxMenuStore.selected
52
- }],
53
- key: `${gIndex}_${index}`
54
- }, [
55
- h('a', {
56
- class: 'vxe-context-menu--link',
57
- on: {
58
- click (evnt: any) {
59
- $xeTable.ctxMenuLinkEvent(evnt, item)
60
- },
61
- mouseover (evnt: any) {
62
- $xeTable.ctxMenuMouseoverEvent(evnt, item)
63
- },
64
- mouseout (evnt: any) {
65
- $xeTable.ctxMenuMouseoutEvent(evnt, item)
66
- }
67
- }
53
+ }, (destroyOnClose ? visible : true)
54
+ ? list.map((options, gIndex) => {
55
+ return options.every((item) => item.visible === false)
56
+ ? renderEmptyElement($xeTable)
57
+ : h('ul', {
58
+ class: 'vxe-context-menu--option-wrapper',
59
+ key: gIndex
60
+ }, options.map((item, index) => {
61
+ const hasChildMenus = item.children && item.children.some((child: any) => child.visible !== false)
62
+ const prefixOpts = Object.assign({}, item.prefixConfig)
63
+ const suffixOpts = Object.assign({}, item.suffixConfig)
64
+ const menuContent = getFuncText(item.name)
65
+ return item.visible === false
66
+ ? renderEmptyElement($xeTable)
67
+ : h('li', {
68
+ class: [item.className, {
69
+ 'link--disabled': item.disabled,
70
+ 'link--active': item === ctxMenuStore.selected
71
+ }],
72
+ key: `${gIndex}_${index}`
68
73
  }, [
69
- h('div', {
70
- class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
71
- }, [
72
- h('i', {
73
- class: prefixOpts.icon || item.prefixIcon
74
- }),
75
- prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)
76
- ]),
77
- h('span', {
78
- class: 'vxe-context-menu--link-content',
79
- attrs: {
80
- title: menuContent
74
+ h('a', {
75
+ class: 'vxe-context-menu--link',
76
+ on: {
77
+ click (evnt: any) {
78
+ $xeTable.ctxMenuLinkEvent(evnt, item)
79
+ },
80
+ mouseover (evnt: any) {
81
+ $xeTable.ctxMenuMouseoverEvent(evnt, item)
82
+ },
83
+ mouseout (evnt: any) {
84
+ $xeTable.ctxMenuMouseoutEvent(evnt, item)
85
+ }
81
86
  }
82
- }, menuContent),
83
- h('div', {
84
- class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
85
87
  }, [
86
- h('i', {
87
- class: (suffixOpts.icon || item.suffixIcon) || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : '')
88
- }),
89
- suffixOpts.content ? h('span', `${suffixOpts.content}`) : renderEmptyElement($xeTable)
90
- ])
91
- ]),
92
- hasChildMenus
93
- ? h('ul', {
94
- class: ['vxe-table--context-menu-clild-wrapper', {
95
- 'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
96
- }]
97
- }, item.children.map((child: any, cIndex: any) => {
98
- const childPrefixOpts = Object.assign({}, child.prefixConfig)
99
- const childSuffixOpts = Object.assign({}, child.suffixConfig)
100
- const childMenuContent = getFuncText(child.name)
101
- return child.visible === false
102
- ? null
103
- : h('li', {
104
- class: [child.className, {
105
- 'link--disabled': child.disabled,
106
- 'link--active': child === ctxMenuStore.selectChild
107
- }],
108
- key: `${gIndex}_${index}_${cIndex}`
109
- }, [
110
- h('a', {
111
- class: 'vxe-context-menu--link',
112
- on: {
113
- click (evnt: any) {
114
- $xeTable.ctxMenuLinkEvent(evnt, child)
115
- },
116
- mouseover (evnt: any) {
117
- $xeTable.ctxMenuMouseoverEvent(evnt, item, child)
118
- },
119
- mouseout (evnt: any) {
120
- $xeTable.ctxMenuMouseoutEvent(evnt, item)
121
- }
122
- }
88
+ h('div', {
89
+ class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
90
+ }, [
91
+ h('i', {
92
+ class: prefixOpts.icon || item.prefixIcon
93
+ }),
94
+ prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)
95
+ ]),
96
+ h('span', {
97
+ class: 'vxe-context-menu--link-content',
98
+ attrs: {
99
+ title: menuContent
100
+ }
101
+ }, menuContent),
102
+ h('div', {
103
+ class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
104
+ }, [
105
+ h('i', {
106
+ class: (suffixOpts.icon || item.suffixIcon) || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : '')
107
+ }),
108
+ suffixOpts.content ? h('span', `${suffixOpts.content}`) : renderEmptyElement($xeTable)
109
+ ])
110
+ ]),
111
+ hasChildMenus
112
+ ? h('ul', {
113
+ class: ['vxe-table--context-menu-clild-wrapper', {
114
+ 'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
115
+ }]
116
+ }, item.children.map((child: any, cIndex: any) => {
117
+ const childPrefixOpts = Object.assign({}, child.prefixConfig)
118
+ const childSuffixOpts = Object.assign({}, child.suffixConfig)
119
+ const childMenuContent = getFuncText(child.name)
120
+ return child.visible === false
121
+ ? null
122
+ : h('li', {
123
+ class: [child.className, {
124
+ 'link--disabled': child.disabled,
125
+ 'link--active': child === ctxMenuStore.selectChild
126
+ }],
127
+ key: `${gIndex}_${index}_${cIndex}`
123
128
  }, [
124
- h('div', {
125
- class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
126
- }, [
127
- h('i', {
128
- class: childPrefixOpts.icon || child.prefixIcon
129
- }),
130
- childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : renderEmptyElement($xeTable)
131
- ]),
132
- h('span', {
133
- class: 'vxe-context-menu--link-content',
134
- attrs: {
135
- title: childMenuContent
129
+ h('a', {
130
+ class: 'vxe-context-menu--link',
131
+ on: {
132
+ click (evnt: any) {
133
+ $xeTable.ctxMenuLinkEvent(evnt, child)
134
+ },
135
+ mouseover (evnt: any) {
136
+ $xeTable.ctxMenuMouseoverEvent(evnt, item, child)
137
+ },
138
+ mouseout (evnt: any) {
139
+ $xeTable.ctxMenuMouseoutEvent(evnt, item)
140
+ }
136
141
  }
137
- }, childMenuContent),
138
- h('div', {
139
- class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
140
142
  }, [
141
- h('i', {
142
- class: childSuffixOpts.icon
143
- }),
144
- childSuffixOpts.content ? h('span', `${childSuffixOpts.content}`) : renderEmptyElement($xeTable)
143
+ h('div', {
144
+ class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
145
+ }, [
146
+ h('i', {
147
+ class: childPrefixOpts.icon || child.prefixIcon
148
+ }),
149
+ childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : renderEmptyElement($xeTable)
150
+ ]),
151
+ h('span', {
152
+ class: 'vxe-context-menu--link-content',
153
+ attrs: {
154
+ title: childMenuContent
155
+ }
156
+ }, childMenuContent),
157
+ h('div', {
158
+ class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
159
+ }, [
160
+ h('i', {
161
+ class: childSuffixOpts.icon
162
+ }),
163
+ childSuffixOpts.content ? h('span', `${childSuffixOpts.content}`) : renderEmptyElement($xeTable)
164
+ ])
145
165
  ])
146
166
  ])
147
- ])
148
- }))
149
- : null
150
- ])
151
- }))
152
- }))
167
+ }))
168
+ : null
169
+ ])
170
+ }))
171
+ })
172
+ : [])
153
173
  }
154
174
  } as any
@@ -158,7 +158,9 @@ function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMod
158
158
  tcStyle.minHeight = `${currCellHeight}px`
159
159
  }
160
160
 
161
- if (isColGroup && !isLastRow) {
161
+ if (showCustomHeader) {
162
+ // custom
163
+ } else if (isColGroup && !isLastRow) {
162
164
  const firstCol = getColumnFirstChild(column)
163
165
  const lastCol = getColumnLastChild(column)
164
166
  if (firstCol && lastCol && firstCol.id !== lastCol.id) {
@@ -3,7 +3,7 @@ import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTarge
3
3
  import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils'
4
4
  import { VxeUI } from '../../ui'
5
5
  import Cell from './cell'
6
- import { getRowUniqueId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight } from './util'
6
+ import { getRowUniqueId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn } from './util'
7
7
  import { getSlotVNs } from '../../ui/src/vn'
8
8
  import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from './anime'
9
9
  import { warnLog, errLog } from '../../ui/src/log'
@@ -3654,6 +3654,7 @@ function initColumnHierarchy ($xeTable: VxeTableConstructor & VxeTablePrivateMet
3654
3654
  }
3655
3655
 
3656
3656
  function handleInitColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, collectColumn: VxeTableDefines.ColumnInfo[]) {
3657
+ const props = $xeTable
3657
3658
  const $xeToolbar = $xeTable.$refs.$xeToolbar as VxeToolbarConstructor
3658
3659
  const reactData = $xeTable as unknown as TableReactData
3659
3660
  const internalData = $xeTable as unknown as TableInternalData
@@ -3693,6 +3694,10 @@ function handleInitColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
3693
3694
  if ($xeTable.handleUpdateCustomColumn) {
3694
3695
  $xeTable.handleUpdateCustomColumn()
3695
3696
  }
3697
+ const columnOpts = $xeTable.computeColumnOpts
3698
+ if (props.showCustomHeader && reactData.isGroup && (columnOpts.resizable || props.resizable)) {
3699
+ warnLog('vxe.error.notConflictProp', ['show-custom-header & colgroup', 'column-config.resizable=false'])
3700
+ }
3696
3701
  reactData.isColLoading = false
3697
3702
  return handleLazyRecalculate($xeTable, false, true, true)
3698
3703
  })
@@ -5903,18 +5908,16 @@ const Methods = {
5903
5908
  const scrollbarXToTop = $xeTable.computeScrollbarXToTop
5904
5909
  const { clientX: dragClientX } = evnt
5905
5910
  const dragBtnElem = evnt.target as HTMLDivElement
5911
+ let cell = dragBtnElem.parentElement as HTMLTableCellElement | null
5906
5912
  let resizeColumn = column
5907
5913
  const isDragGroupCol = column.children && column.children.length
5908
5914
  if (isDragGroupCol) {
5909
- XEUtils.eachTree(column.children, childColumn => {
5910
- resizeColumn = childColumn
5911
- })
5912
- }
5913
- let cell = dragBtnElem.parentElement as HTMLTableCellElement | null
5914
- if (isDragGroupCol) {
5915
- const trEl = cell ? cell.parentElement as HTMLTableRowElement : null
5916
- const theadEl = trEl ? trEl.parentElement as HTMLTableElement : null
5917
- cell = theadEl ? theadEl.querySelector<HTMLTableCellElement>(`.vxe-header--column[colid="${resizeColumn.id}"]`) : null
5915
+ resizeColumn = getLastChildColumn(column)
5916
+ if (isDragGroupCol) {
5917
+ const trEl = cell ? cell.parentElement as HTMLTableRowElement : null
5918
+ const theadEl = trEl ? trEl.parentElement as HTMLTableElement : null
5919
+ cell = theadEl ? theadEl.querySelector<HTMLTableCellElement>(`.vxe-header--column[colid="${resizeColumn.id}"]`) : null
5920
+ }
5918
5921
  }
5919
5922
  if (!cell) {
5920
5923
  return
@@ -10825,7 +10828,7 @@ const Methods = {
10825
10828
  const xThreshold = $xeTable.computeScrollXThreshold
10826
10829
  isLeft = scrollLeft <= 0
10827
10830
  if (!isLeft) {
10828
- isRight = scrollLeft + bodyWidth >= scrollWidth
10831
+ isRight = scrollLeft + bodyWidth >= scrollWidth - 1
10829
10832
  }
10830
10833
  if (scrollLeft > lastScrollLeft) {
10831
10834
  direction = 'right'
@@ -10845,7 +10848,7 @@ const Methods = {
10845
10848
  const yThreshold = $xeTable.computeScrollYThreshold
10846
10849
  isTop = scrollTop <= 0
10847
10850
  if (!isTop) {
10848
- isBottom = scrollTop + bodyHeight >= scrollHeight
10851
+ isBottom = scrollTop + bodyHeight >= scrollHeight - 1
10849
10852
  }
10850
10853
  if (scrollTop > lastScrollTop) {
10851
10854
  direction = 'bottom'
@@ -1876,7 +1876,9 @@ export default {
1876
1876
  const $xeTable = this
1877
1877
  const props = $xeTable
1878
1878
  const internalData = $xeTable as unknown as TableInternalData
1879
+ const $xeGrid = $xeTable.$xeGrid
1879
1880
  const $xeGantt = $xeTable.$xeGantt
1881
+ const $xeGGWrapper = $xeGrid || $xeGantt
1880
1882
 
1881
1883
  const columnOpts = $xeTable.computeColumnOpts
1882
1884
  const rowOpts = $xeTable.computeRowOpts
@@ -1893,6 +1895,16 @@ export default {
1893
1895
  internalData.teleportToWrapperElem = classifyWrapperEl
1894
1896
  }
1895
1897
  }
1898
+ if ($xeGGWrapper) {
1899
+ const popupContainerElem = $xeGantt.$refs.refPopupContainerElem as HTMLDivElement
1900
+ const popupWrapperEl = $xeTable.$refs.refPopupWrapperElem as HTMLDivElement
1901
+ if (popupContainerElem) {
1902
+ if (popupWrapperEl) {
1903
+ popupContainerElem.appendChild(popupWrapperEl)
1904
+ }
1905
+ internalData.popupToWrapperElem = popupContainerElem
1906
+ }
1907
+ }
1896
1908
 
1897
1909
  if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
1898
1910
  initTpImg()
@@ -1906,11 +1918,11 @@ export default {
1906
1918
  warnLog('vxe.error.reqProp', ['tooltip-config'])
1907
1919
  }
1908
1920
 
1909
- // 使用已安装的组件,如果未安装则不渲染
1910
- const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading')
1911
- const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip')
1912
-
1913
1921
  $xeTable.$nextTick(() => {
1922
+ // 使用已安装的组件,如果未安装则不渲染
1923
+ const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading')
1924
+ const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip')
1925
+
1914
1926
  if (props.loading) {
1915
1927
  if (!VxeUILoadingComponent && !this.$scopedSlots.loading) {
1916
1928
  errLog('vxe.error.errProp', ['loading=true', 'loading=false | <template #loading>...</template>'])
@@ -1989,6 +2001,10 @@ export default {
1989
2001
  if (teleportWrapperEl && teleportWrapperEl.parentElement) {
1990
2002
  teleportWrapperEl.parentElement.removeChild(teleportWrapperEl)
1991
2003
  }
2004
+ const popupWrapperEl = $xeTable.$refs.refPopupWrapperElem as HTMLDivElement
2005
+ if (popupWrapperEl && popupWrapperEl.parentElement) {
2006
+ popupWrapperEl.parentElement.removeChild(popupWrapperEl)
2007
+ }
1992
2008
  const tableViewportEl = $xeTable.$refs.refTableViewportElem as HTMLDivElement
1993
2009
  if (tableViewportEl) {
1994
2010
  tableViewportEl.removeEventListener('wheel', $xeTable.triggerBodyWheelEvent)
@@ -2244,18 +2260,39 @@ export default {
2244
2260
  renderDragTip(h, this)
2245
2261
  ])
2246
2262
  ]),
2247
- /**
2248
- * 筛选
2249
- */
2250
- initStore.filter
2251
- ? h(TableFilterPanelComponent, {
2252
- key: 'tf',
2253
- ref: 'refTableFilter',
2254
- props: {
2255
- filterStore
2256
- }
2257
- })
2258
- : renderEmptyElement($xeTable),
2263
+ h('div', {
2264
+ key: 'tpw'
2265
+ }, [
2266
+ h('div', {
2267
+ ref: 'refPopupWrapperElem'
2268
+ }, [
2269
+ /**
2270
+ * 筛选
2271
+ */
2272
+ initStore.filter
2273
+ ? h(TableFilterPanelComponent, {
2274
+ key: 'tf',
2275
+ ref: 'refTableFilter',
2276
+ props: {
2277
+ filterStore
2278
+ }
2279
+ })
2280
+ : renderEmptyElement($xeTable),
2281
+ /**
2282
+ * 快捷菜单
2283
+ */
2284
+ isContentMenu
2285
+ ? h(TableMenuPanelComponent, {
2286
+ key: 'tm',
2287
+ ref: 'refTableMenu',
2288
+ props: {
2289
+ ctxMenuStore: this.ctxMenuStore,
2290
+ ctxMenuOpts: this.ctxMenuOpts
2291
+ }
2292
+ })
2293
+ : renderEmptyElement($xeTable)
2294
+ ])
2295
+ ]),
2259
2296
  /**
2260
2297
  * 导入
2261
2298
  */
@@ -2280,19 +2317,6 @@ export default {
2280
2317
  }
2281
2318
  })
2282
2319
  : renderEmptyElement($xeTable),
2283
- /**
2284
- * 快捷菜单
2285
- */
2286
- isContentMenu
2287
- ? h(TableMenuPanelComponent, {
2288
- key: 'tm',
2289
- ref: 'refTableMenu',
2290
- props: {
2291
- ctxMenuStore: this.ctxMenuStore,
2292
- ctxMenuOpts: this.ctxMenuOpts
2293
- }
2294
- })
2295
- : renderEmptyElement($xeTable),
2296
2320
  h('div', {}, [
2297
2321
  /**
2298
2322
  * 提示相关
@@ -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,
@@ -529,6 +530,22 @@ export function getColReMinWidth (params: any) {
529
530
  return mWidth
530
531
  }
531
532
 
533
+ export function getFirstChildColumn (column: VxeTableDefines.ColumnInfo): VxeTableDefines.ColumnInfo {
534
+ const { children } = column
535
+ if (children && children.length) {
536
+ return getFirstChildColumn(XEUtils.first(children))
537
+ }
538
+ return column
539
+ }
540
+
541
+ export function getLastChildColumn (column: VxeTableDefines.ColumnInfo): VxeTableDefines.ColumnInfo {
542
+ const { children } = column
543
+ if (children && children.length) {
544
+ return getFirstChildColumn(XEUtils.last(children))
545
+ }
546
+ return column
547
+ }
548
+
532
549
  const lineOffsetSizes: Record<string, any> = {
533
550
  mini: 3,
534
551
  small: 2,
@@ -100,9 +100,11 @@ VxeUI.setConfig({
100
100
  footerCellConfig: {
101
101
  height: 'unset'
102
102
  },
103
- // menuConfig: {
104
- // visibleMethod () {}
105
- // },
103
+ menuConfig: {
104
+ // visibleMethod () {},
105
+ // transfer: false,
106
+ destroyOnClose: true
107
+ },
106
108
  customConfig: {
107
109
  // enabled: false,
108
110
  allowVisible: true,
@@ -149,8 +151,9 @@ VxeUI.setConfig({
149
151
  filterConfig: {
150
152
  // remote: false,
151
153
  // filterMethod: null,
152
- // destroyOnClose: false,
153
154
  // isEvery: false,
155
+ // transfer: false,
156
+ destroyOnClose: true,
154
157
  multiple: true,
155
158
  showIcon: true
156
159
  },
@@ -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 {