vxe-table 4.16.14 → 4.16.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.
- package/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/es/grid/src/grid.js +7 -2
- package/es/grid/style.css +0 -1
- package/es/grid/style.min.css +1 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/en-US.js +2 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/filter/panel.js +2 -1
- package/es/table/module/menu/hook.js +9 -3
- package/es/table/module/menu/panel.js +113 -109
- package/es/table/src/header.js +4 -1
- package/es/table/src/table.js +55 -32
- package/es/table/src/util.js +19 -4
- package/es/ui/index.js +8 -5
- package/es/ui/src/log.js +1 -1
- package/es/vxe-grid/style.css +0 -1
- package/es/vxe-grid/style.min.css +1 -1
- package/lib/grid/src/grid.js +6 -2
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +0 -1
- package/lib/grid/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +89 -41
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -2
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -2
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/filter/panel.js +3 -2
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/module/menu/hook.js +12 -3
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/module/menu/panel.js +22 -12
- package/lib/table/module/menu/panel.min.js +1 -1
- package/lib/table/src/header.js +3 -1
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +11 -11
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +26 -6
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +8 -5
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-grid/style/style.css +0 -1
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +8 -2
- package/packages/locale/lang/en-US.ts +2 -2
- package/packages/table/module/filter/panel.ts +2 -1
- package/packages/table/module/menu/hook.ts +11 -3
- package/packages/table/module/menu/panel.ts +112 -108
- package/packages/table/src/header.ts +3 -1
- package/packages/table/src/table.ts +55 -32
- package/packages/table/src/util.ts +19 -2
- package/packages/ui/index.ts +7 -4
- package/styles/components/grid.scss +0 -1
- /package/es/{iconfont.1758158507786.ttf → iconfont.1758344508103.ttf} +0 -0
- /package/es/{iconfont.1758158507786.woff → iconfont.1758344508103.woff} +0 -0
- /package/es/{iconfont.1758158507786.woff2 → iconfont.1758344508103.woff2} +0 -0
- /package/lib/{iconfont.1758158507786.ttf → iconfont.1758344508103.ttf} +0 -0
- /package/lib/{iconfont.1758158507786.woff → iconfont.1758344508103.woff} +0 -0
- /package/lib/{iconfont.1758158507786.woff2 → iconfont.1758344508103.woff2} +0 -0
|
@@ -20,7 +20,7 @@ hooks.add('tableMenuModule', {
|
|
|
20
20
|
const isContentMenu = computeIsContentMenu.value;
|
|
21
21
|
const menuOpts = computeMenuOpts.value;
|
|
22
22
|
const config = menuOpts[type];
|
|
23
|
-
const visibleMethod = menuOpts
|
|
23
|
+
const { transfer, visibleMethod } = menuOpts;
|
|
24
24
|
if (config) {
|
|
25
25
|
const { options, disabled } = config;
|
|
26
26
|
if (disabled) {
|
|
@@ -32,9 +32,15 @@ hooks.add('tableMenuModule', {
|
|
|
32
32
|
if (!visibleMethod || visibleMethod(params)) {
|
|
33
33
|
evnt.preventDefault();
|
|
34
34
|
$xeTable.updateZindex();
|
|
35
|
+
const el = refElem.value;
|
|
36
|
+
const tableRect = el.getBoundingClientRect();
|
|
35
37
|
const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode();
|
|
36
|
-
let top = evnt.clientY
|
|
37
|
-
let left = evnt.clientX
|
|
38
|
+
let top = evnt.clientY - tableRect.y;
|
|
39
|
+
let left = evnt.clientX - tableRect.x;
|
|
40
|
+
if (transfer) {
|
|
41
|
+
top = evnt.clientY + scrollTop;
|
|
42
|
+
left = evnt.clientX + scrollLeft;
|
|
43
|
+
}
|
|
38
44
|
const handleVisible = () => {
|
|
39
45
|
internalData._currMenuParams = params;
|
|
40
46
|
Object.assign(ctxMenuStore, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { h, Teleport, inject, ref
|
|
1
|
+
import { h, Teleport, inject, 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';
|
|
5
5
|
import XEUtils from 'xe-utils';
|
|
6
|
-
const { getIcon } = VxeUI;
|
|
6
|
+
const { getIcon, renderEmptyElement } = VxeUI;
|
|
7
7
|
export default defineVxeComponent({
|
|
8
8
|
name: 'VxeTableMenuPanel',
|
|
9
9
|
setup(props, context) {
|
|
@@ -24,126 +24,130 @@ export default defineVxeComponent({
|
|
|
24
24
|
const { ctxMenuStore } = tableReactData;
|
|
25
25
|
const { computeMenuOpts } = $xeTable.getComputeMaps();
|
|
26
26
|
const menuOpts = computeMenuOpts.value;
|
|
27
|
+
const { transfer, destroyOnClose } = menuOpts;
|
|
28
|
+
const { visible, list, className } = ctxMenuStore;
|
|
27
29
|
return h(Teleport, {
|
|
28
30
|
to: 'body',
|
|
29
|
-
disabled:
|
|
31
|
+
disabled: !transfer
|
|
30
32
|
}, [
|
|
31
33
|
h('div', {
|
|
32
34
|
ref: refElem,
|
|
33
|
-
class: ['vxe-table--context-menu-wrapper',
|
|
34
|
-
'is--visible':
|
|
35
|
+
class: ['vxe-table--context-menu-wrapper', className, {
|
|
36
|
+
'is--visible': visible
|
|
35
37
|
}],
|
|
36
38
|
style: ctxMenuStore.style
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
h('a', {
|
|
58
|
-
class: 'vxe-context-menu--link',
|
|
59
|
-
onClick(evnt) {
|
|
60
|
-
$xeTable.ctxMenuLinkEvent(evnt, item);
|
|
61
|
-
},
|
|
62
|
-
onMouseover(evnt) {
|
|
63
|
-
$xeTable.ctxMenuMouseoverEvent(evnt, item);
|
|
64
|
-
},
|
|
65
|
-
onMouseout(evnt) {
|
|
66
|
-
$xeTable.ctxMenuMouseoutEvent(evnt, item);
|
|
67
|
-
}
|
|
39
|
+
}, (destroyOnClose ? visible : true)
|
|
40
|
+
? list.map((options, gIndex) => {
|
|
41
|
+
return options.every(item => item.visible === false)
|
|
42
|
+
? renderEmptyElement($xeTable)
|
|
43
|
+
: h('ul', {
|
|
44
|
+
class: 'vxe-context-menu--option-wrapper',
|
|
45
|
+
key: gIndex
|
|
46
|
+
}, options.map((item, index) => {
|
|
47
|
+
const hasChildMenus = item.children && item.children.some((child) => child.visible !== false);
|
|
48
|
+
const prefixOpts = Object.assign({}, item.prefixConfig);
|
|
49
|
+
const suffixOpts = Object.assign({}, item.suffixConfig);
|
|
50
|
+
const menuContent = getFuncText(item.name);
|
|
51
|
+
return item.visible === false
|
|
52
|
+
? renderEmptyElement($xeTable)
|
|
53
|
+
: h('li', {
|
|
54
|
+
class: [item.className, {
|
|
55
|
+
'link--disabled': item.disabled,
|
|
56
|
+
'link--active': item === ctxMenuStore.selected
|
|
57
|
+
}],
|
|
58
|
+
key: `${gIndex}_${index}`
|
|
68
59
|
}, [
|
|
69
|
-
h('
|
|
70
|
-
class:
|
|
60
|
+
h('a', {
|
|
61
|
+
class: 'vxe-context-menu--link',
|
|
62
|
+
onClick(evnt) {
|
|
63
|
+
$xeTable.ctxMenuLinkEvent(evnt, item);
|
|
64
|
+
},
|
|
65
|
+
onMouseover(evnt) {
|
|
66
|
+
$xeTable.ctxMenuMouseoverEvent(evnt, item);
|
|
67
|
+
},
|
|
68
|
+
onMouseout(evnt) {
|
|
69
|
+
$xeTable.ctxMenuMouseoutEvent(evnt, item);
|
|
70
|
+
}
|
|
71
71
|
}, [
|
|
72
|
-
h('
|
|
73
|
-
class: prefixOpts.
|
|
74
|
-
}
|
|
75
|
-
|
|
72
|
+
h('div', {
|
|
73
|
+
class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
|
|
74
|
+
}, [
|
|
75
|
+
h('i', {
|
|
76
|
+
class: prefixOpts.icon || item.prefixIcon
|
|
77
|
+
}),
|
|
78
|
+
prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)
|
|
79
|
+
]),
|
|
80
|
+
h('div', {
|
|
81
|
+
class: 'vxe-context-menu--link-content',
|
|
82
|
+
title: menuContent
|
|
83
|
+
}, menuContent),
|
|
84
|
+
h('div', {
|
|
85
|
+
class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
|
|
86
|
+
}, [
|
|
87
|
+
h('i', {
|
|
88
|
+
class: (suffixOpts.icon || item.suffixIcon) || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : '')
|
|
89
|
+
}),
|
|
90
|
+
suffixOpts.content ? h('span', `${suffixOpts.content}`) : renderEmptyElement($xeTable)
|
|
91
|
+
])
|
|
76
92
|
]),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}]
|
|
95
|
-
}, item.children.map((child, cIndex) => {
|
|
96
|
-
const childPrefixOpts = Object.assign({}, child.prefixConfig);
|
|
97
|
-
const childSuffixOpts = Object.assign({}, child.suffixConfig);
|
|
98
|
-
const childMenuContent = getFuncText(child.name);
|
|
99
|
-
return child.visible === false
|
|
100
|
-
? null
|
|
101
|
-
: h('li', {
|
|
102
|
-
class: [child.className, {
|
|
103
|
-
'link--disabled': child.disabled,
|
|
104
|
-
'link--active': child === ctxMenuStore.selectChild
|
|
105
|
-
}],
|
|
106
|
-
key: `${gIndex}_${index}_${cIndex}`
|
|
107
|
-
}, [
|
|
108
|
-
h('a', {
|
|
109
|
-
class: 'vxe-context-menu--link',
|
|
110
|
-
onClick(evnt) {
|
|
111
|
-
$xeTable.ctxMenuLinkEvent(evnt, child);
|
|
112
|
-
},
|
|
113
|
-
onMouseover(evnt) {
|
|
114
|
-
$xeTable.ctxMenuMouseoverEvent(evnt, item, child);
|
|
115
|
-
},
|
|
116
|
-
onMouseout(evnt) {
|
|
117
|
-
$xeTable.ctxMenuMouseoutEvent(evnt, item);
|
|
118
|
-
}
|
|
93
|
+
hasChildMenus
|
|
94
|
+
? h('ul', {
|
|
95
|
+
class: ['vxe-table--context-menu-clild-wrapper', {
|
|
96
|
+
'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
|
|
97
|
+
}]
|
|
98
|
+
}, item.children.map((child, cIndex) => {
|
|
99
|
+
const childPrefixOpts = Object.assign({}, child.prefixConfig);
|
|
100
|
+
const childSuffixOpts = Object.assign({}, child.suffixConfig);
|
|
101
|
+
const childMenuContent = getFuncText(child.name);
|
|
102
|
+
return child.visible === false
|
|
103
|
+
? null
|
|
104
|
+
: h('li', {
|
|
105
|
+
class: [child.className, {
|
|
106
|
+
'link--disabled': child.disabled,
|
|
107
|
+
'link--active': child === ctxMenuStore.selectChild
|
|
108
|
+
}],
|
|
109
|
+
key: `${gIndex}_${index}_${cIndex}`
|
|
119
110
|
}, [
|
|
120
|
-
h('
|
|
121
|
-
class:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}, childMenuContent),
|
|
132
|
-
h('div', {
|
|
133
|
-
class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
|
|
111
|
+
h('a', {
|
|
112
|
+
class: 'vxe-context-menu--link',
|
|
113
|
+
onClick(evnt) {
|
|
114
|
+
$xeTable.ctxMenuLinkEvent(evnt, child);
|
|
115
|
+
},
|
|
116
|
+
onMouseover(evnt) {
|
|
117
|
+
$xeTable.ctxMenuMouseoverEvent(evnt, item, child);
|
|
118
|
+
},
|
|
119
|
+
onMouseout(evnt) {
|
|
120
|
+
$xeTable.ctxMenuMouseoutEvent(evnt, item);
|
|
121
|
+
}
|
|
134
122
|
}, [
|
|
135
|
-
h('
|
|
136
|
-
class:
|
|
137
|
-
}
|
|
138
|
-
|
|
123
|
+
h('div', {
|
|
124
|
+
class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
|
|
125
|
+
}, [
|
|
126
|
+
h('i', {
|
|
127
|
+
class: childPrefixOpts.icon || child.prefixIcon
|
|
128
|
+
}),
|
|
129
|
+
childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : renderEmptyElement($xeTable)
|
|
130
|
+
]),
|
|
131
|
+
h('div', {
|
|
132
|
+
class: 'vxe-context-menu--link-content',
|
|
133
|
+
title: childMenuContent
|
|
134
|
+
}, childMenuContent),
|
|
135
|
+
h('div', {
|
|
136
|
+
class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
|
|
137
|
+
}, [
|
|
138
|
+
h('i', {
|
|
139
|
+
class: childSuffixOpts.icon
|
|
140
|
+
}),
|
|
141
|
+
childSuffixOpts.content ? h('span', `${childSuffixOpts.content}`) : renderEmptyElement($xeTable)
|
|
142
|
+
])
|
|
139
143
|
])
|
|
140
|
-
])
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
]);
|
|
145
|
+
}))
|
|
146
|
+
: null
|
|
147
|
+
]);
|
|
148
|
+
}));
|
|
149
|
+
})
|
|
150
|
+
: [])
|
|
147
151
|
]);
|
|
148
152
|
};
|
|
149
153
|
$xeMenuPanel.renderVN = renderVN;
|
package/es/table/src/header.js
CHANGED
|
@@ -177,7 +177,10 @@ export default defineVxeComponent({
|
|
|
177
177
|
else {
|
|
178
178
|
tcStyle.minHeight = `${currCellHeight}px`;
|
|
179
179
|
}
|
|
180
|
-
if (
|
|
180
|
+
if (showCustomHeader) {
|
|
181
|
+
// custom
|
|
182
|
+
}
|
|
183
|
+
else if (isColGroup && !isLastRow) {
|
|
181
184
|
const firstCol = getColumnFirstChild(column);
|
|
182
185
|
const lastCol = getColumnLastChild(column);
|
|
183
186
|
if (firstCol && lastCol && firstCol.id !== lastCol.id) {
|
package/es/table/src/table.js
CHANGED
|
@@ -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';
|
|
@@ -315,6 +315,7 @@ export default defineVxeComponent({
|
|
|
315
315
|
const refTableRightBody = ref();
|
|
316
316
|
const refTableRightFooter = ref();
|
|
317
317
|
const refTeleportWrapper = ref();
|
|
318
|
+
const refPopupWrapperElem = ref();
|
|
318
319
|
const refLeftContainer = ref();
|
|
319
320
|
const refRightContainer = ref();
|
|
320
321
|
const refColResizeBar = ref();
|
|
@@ -3849,6 +3850,10 @@ export default defineVxeComponent({
|
|
|
3849
3850
|
if ($xeTable.handleUpdateCustomColumn) {
|
|
3850
3851
|
$xeTable.handleUpdateCustomColumn();
|
|
3851
3852
|
}
|
|
3853
|
+
const columnOpts = computeColumnOpts.value;
|
|
3854
|
+
if (props.showCustomHeader && reactData.isGroup && (columnOpts.resizable || props.resizable)) {
|
|
3855
|
+
warnLog('vxe.error.notConflictProp', ['show-custom-header & colgroup', 'column-config.resizable=false']);
|
|
3856
|
+
}
|
|
3852
3857
|
reactData.isColLoading = false;
|
|
3853
3858
|
return handleLazyRecalculate(false, true, true);
|
|
3854
3859
|
});
|
|
@@ -8416,18 +8421,16 @@ export default defineVxeComponent({
|
|
|
8416
8421
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
8417
8422
|
const { clientX: dragClientX } = evnt;
|
|
8418
8423
|
const dragBtnElem = evnt.target;
|
|
8424
|
+
let cell = dragBtnElem.parentElement;
|
|
8419
8425
|
let resizeColumn = column;
|
|
8420
8426
|
const isDragGroupCol = column.children && column.children.length;
|
|
8421
8427
|
if (isDragGroupCol) {
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
const trEl = cell ? cell.parentElement : null;
|
|
8429
|
-
const theadEl = trEl ? trEl.parentElement : null;
|
|
8430
|
-
cell = theadEl ? theadEl.querySelector(`.vxe-header--column[colid="${resizeColumn.id}"]`) : null;
|
|
8428
|
+
resizeColumn = getLastChildColumn(column);
|
|
8429
|
+
if (isDragGroupCol) {
|
|
8430
|
+
const trEl = cell ? cell.parentElement : null;
|
|
8431
|
+
const theadEl = trEl ? trEl.parentElement : null;
|
|
8432
|
+
cell = theadEl ? theadEl.querySelector(`.vxe-header--column[colid="${resizeColumn.id}"]`) : null;
|
|
8433
|
+
}
|
|
8431
8434
|
}
|
|
8432
8435
|
if (!cell) {
|
|
8433
8436
|
return;
|
|
@@ -10948,9 +10951,9 @@ export default defineVxeComponent({
|
|
|
10948
10951
|
}
|
|
10949
10952
|
if (isRollY) {
|
|
10950
10953
|
const yThreshold = computeScrollYThreshold.value;
|
|
10951
|
-
isTop = scrollTop <=
|
|
10954
|
+
isTop = scrollTop <= 1;
|
|
10952
10955
|
if (!isTop) {
|
|
10953
|
-
isBottom = scrollTop + bodyHeight >= scrollHeight;
|
|
10956
|
+
isBottom = scrollTop + bodyHeight >= scrollHeight - 1;
|
|
10954
10957
|
}
|
|
10955
10958
|
if (scrollTop > lastScrollTop) {
|
|
10956
10959
|
direction = 'bottom';
|
|
@@ -12082,7 +12085,7 @@ export default defineVxeComponent({
|
|
|
12082
12085
|
const renderVN = () => {
|
|
12083
12086
|
const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props;
|
|
12084
12087
|
const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore, tooltipStore } = reactData;
|
|
12085
|
-
const { teleportToWrapperElem } = internalData;
|
|
12088
|
+
const { teleportToWrapperElem, popupToWrapperElem } = internalData;
|
|
12086
12089
|
const { leftList, rightList } = columnStore;
|
|
12087
12090
|
const loadingSlot = slots.loading;
|
|
12088
12091
|
const tipSlots = {
|
|
@@ -12280,16 +12283,38 @@ export default defineVxeComponent({
|
|
|
12280
12283
|
])
|
|
12281
12284
|
])
|
|
12282
12285
|
]),
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
|
|
12292
|
-
|
|
12286
|
+
h('div', {
|
|
12287
|
+
key: 'tpw'
|
|
12288
|
+
}, [
|
|
12289
|
+
h(Teleport, {
|
|
12290
|
+
to: popupToWrapperElem,
|
|
12291
|
+
disabled: !($xeGGWrapper && popupToWrapperElem)
|
|
12292
|
+
}, [
|
|
12293
|
+
h('div', {
|
|
12294
|
+
ref: refPopupWrapperElem
|
|
12295
|
+
}, [
|
|
12296
|
+
/**
|
|
12297
|
+
* 筛选
|
|
12298
|
+
*/
|
|
12299
|
+
initStore.filter
|
|
12300
|
+
? h(TableFilterPanelComponent, {
|
|
12301
|
+
key: 'tf',
|
|
12302
|
+
ref: refTableFilter,
|
|
12303
|
+
filterStore
|
|
12304
|
+
})
|
|
12305
|
+
: renderEmptyElement($xeTable),
|
|
12306
|
+
/**
|
|
12307
|
+
* 快捷菜单
|
|
12308
|
+
*/
|
|
12309
|
+
isContentMenu
|
|
12310
|
+
? h(TableMenuPanelComponent, {
|
|
12311
|
+
key: 'tm',
|
|
12312
|
+
ref: refTableMenu
|
|
12313
|
+
})
|
|
12314
|
+
: renderEmptyElement($xeTable)
|
|
12315
|
+
])
|
|
12316
|
+
])
|
|
12317
|
+
]),
|
|
12293
12318
|
/**
|
|
12294
12319
|
* 导入
|
|
12295
12320
|
*/
|
|
@@ -12310,15 +12335,6 @@ export default defineVxeComponent({
|
|
|
12310
12335
|
storeData: reactData.exportStore
|
|
12311
12336
|
})
|
|
12312
12337
|
: renderEmptyElement($xeTable),
|
|
12313
|
-
/**
|
|
12314
|
-
* 快捷菜单
|
|
12315
|
-
*/
|
|
12316
|
-
isContentMenu
|
|
12317
|
-
? h(TableMenuPanelComponent, {
|
|
12318
|
-
key: 'tm',
|
|
12319
|
-
ref: refTableMenu
|
|
12320
|
-
})
|
|
12321
|
-
: renderEmptyElement($xeTable),
|
|
12322
12338
|
/**
|
|
12323
12339
|
* 提示相关
|
|
12324
12340
|
*/
|
|
@@ -12605,6 +12621,13 @@ export default defineVxeComponent({
|
|
|
12605
12621
|
internalData.teleportToWrapperElem = classifyWrapperEl;
|
|
12606
12622
|
}
|
|
12607
12623
|
}
|
|
12624
|
+
if ($xeGGWrapper) {
|
|
12625
|
+
const { refPopupContainerElem } = $xeGGWrapper.getRefMaps();
|
|
12626
|
+
const popupContainerEl = refPopupContainerElem.value;
|
|
12627
|
+
if (popupContainerEl) {
|
|
12628
|
+
internalData.popupToWrapperElem = popupContainerEl;
|
|
12629
|
+
}
|
|
12630
|
+
}
|
|
12608
12631
|
if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
|
|
12609
12632
|
initTpImg();
|
|
12610
12633
|
}
|
package/es/table/src/util.js
CHANGED
|
@@ -121,6 +121,7 @@ export function createInternalData() {
|
|
|
121
121
|
// 表尾高度
|
|
122
122
|
tFooterHeight: 0,
|
|
123
123
|
teleportToWrapperElem: null,
|
|
124
|
+
popupToWrapperElem: null,
|
|
124
125
|
inited: false,
|
|
125
126
|
tooltipTimeout: null,
|
|
126
127
|
initStatus: false,
|
|
@@ -542,13 +543,27 @@ export function getRootColumn($xeTable, column) {
|
|
|
542
543
|
}
|
|
543
544
|
return column;
|
|
544
545
|
}
|
|
546
|
+
export function getFirstChildColumn(column) {
|
|
547
|
+
const { children } = column;
|
|
548
|
+
if (children && children.length) {
|
|
549
|
+
return getFirstChildColumn(XEUtils.first(children));
|
|
550
|
+
}
|
|
551
|
+
return column;
|
|
552
|
+
}
|
|
553
|
+
export function getLastChildColumn(column) {
|
|
554
|
+
const { children } = column;
|
|
555
|
+
if (children && children.length) {
|
|
556
|
+
return getFirstChildColumn(XEUtils.last(children));
|
|
557
|
+
}
|
|
558
|
+
return column;
|
|
559
|
+
}
|
|
545
560
|
const lineOffsetSizes = {
|
|
546
561
|
mini: 3,
|
|
547
562
|
small: 2,
|
|
548
563
|
medium: 1,
|
|
549
564
|
large: 0
|
|
550
565
|
};
|
|
551
|
-
|
|
566
|
+
function countTreeExpand(prevRow, params) {
|
|
552
567
|
let count = 1;
|
|
553
568
|
if (!prevRow) {
|
|
554
569
|
return count;
|
|
@@ -569,15 +584,15 @@ const countTreeExpand = (prevRow, params) => {
|
|
|
569
584
|
}
|
|
570
585
|
}
|
|
571
586
|
return count;
|
|
572
|
-
}
|
|
573
|
-
export
|
|
587
|
+
}
|
|
588
|
+
export function getOffsetSize($xeTable) {
|
|
574
589
|
const { computeSize } = $xeTable.getComputeMaps();
|
|
575
590
|
const vSize = computeSize.value;
|
|
576
591
|
if (vSize) {
|
|
577
592
|
return lineOffsetSizes[vSize] || 0;
|
|
578
593
|
}
|
|
579
594
|
return 0;
|
|
580
|
-
}
|
|
595
|
+
}
|
|
581
596
|
export function calcTreeLine(params, prevRow) {
|
|
582
597
|
const { $table, row } = params;
|
|
583
598
|
const tableProps = $table.props;
|
package/es/ui/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
import { getFuncText } from './src/utils';
|
|
3
|
-
export const version = "4.16.
|
|
3
|
+
export const version = "4.16.16";
|
|
4
4
|
VxeUI.version = version;
|
|
5
5
|
VxeUI.tableVersion = version;
|
|
6
6
|
VxeUI.setConfig({
|
|
@@ -93,9 +93,11 @@ VxeUI.setConfig({
|
|
|
93
93
|
footerCellConfig: {
|
|
94
94
|
height: 'unset'
|
|
95
95
|
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
menuConfig: {
|
|
97
|
+
// visibleMethod () {},
|
|
98
|
+
// transfer: false,
|
|
99
|
+
destroyOnClose: true
|
|
100
|
+
},
|
|
99
101
|
customConfig: {
|
|
100
102
|
// enabled: false,
|
|
101
103
|
allowVisible: true,
|
|
@@ -142,8 +144,9 @@ VxeUI.setConfig({
|
|
|
142
144
|
filterConfig: {
|
|
143
145
|
// remote: false,
|
|
144
146
|
// filterMethod: null,
|
|
145
|
-
// destroyOnClose: false,
|
|
146
147
|
// isEvery: false,
|
|
148
|
+
// transfer: false,
|
|
149
|
+
destroyOnClose: true,
|
|
147
150
|
multiple: true,
|
|
148
151
|
showIcon: true
|
|
149
152
|
},
|
package/es/ui/src/log.js
CHANGED
package/es/vxe-grid/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-grid{position:relative;
|
|
1
|
+
.vxe-grid{position:relative;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)}
|
package/lib/grid/src/grid.js
CHANGED
|
@@ -74,6 +74,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
74
74
|
const refForm = (0, _vue.ref)();
|
|
75
75
|
const refToolbar = (0, _vue.ref)();
|
|
76
76
|
const refPager = (0, _vue.ref)();
|
|
77
|
+
const refPopupContainerElem = (0, _vue.ref)();
|
|
77
78
|
const refFormWrapper = (0, _vue.ref)();
|
|
78
79
|
const refToolbarWrapper = (0, _vue.ref)();
|
|
79
80
|
const refTopWrapper = (0, _vue.ref)();
|
|
@@ -253,7 +254,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
253
254
|
refTable,
|
|
254
255
|
refForm,
|
|
255
256
|
refToolbar,
|
|
256
|
-
refPager
|
|
257
|
+
refPager,
|
|
258
|
+
refPopupContainerElem
|
|
257
259
|
};
|
|
258
260
|
const computeMaps = {
|
|
259
261
|
computeProxyOpts,
|
|
@@ -894,7 +896,9 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
894
896
|
class: 'vxe-grid--layout-aside-right-wrapper'
|
|
895
897
|
}, asideRightSlot({})) : renderEmptyElement($xeGrid)]), (0, _vue.h)('div', {
|
|
896
898
|
class: 'vxe-grid--layout-footer-wrapper'
|
|
897
|
-
}, renderChildLayout(footKeys))
|
|
899
|
+
}, renderChildLayout(footKeys)), (0, _vue.h)('div', {
|
|
900
|
+
ref: refPopupContainerElem
|
|
901
|
+
})];
|
|
898
902
|
};
|
|
899
903
|
const tableCompEvents = {};
|
|
900
904
|
_emits2.tableEmits.forEach(name => {
|