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.
- package/README.md +1 -1
- package/es/grid/src/grid.js +4 -1
- 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/mixin.js +9 -3
- package/es/table/module/menu/panel.js +136 -118
- package/es/table/src/header.js +4 -1
- package/es/table/src/methods.js +15 -12
- package/es/table/src/table.js +52 -28
- package/es/table/src/util.js +15 -0
- 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 +3 -1
- 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 +132 -51
- 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/mixin.js +12 -3
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/menu/panel.js +34 -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/methods.js +14 -11
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +35 -15
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +21 -0
- 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 +4 -1
- package/packages/locale/lang/en-US.ts +2 -2
- package/packages/table/module/filter/panel.ts +2 -1
- package/packages/table/module/menu/mixin.ts +11 -3
- package/packages/table/module/menu/panel.ts +137 -117
- package/packages/table/src/header.ts +3 -1
- package/packages/table/src/methods.ts +15 -12
- package/packages/table/src/table.ts +53 -29
- package/packages/table/src/util.ts +17 -0
- package/packages/ui/index.ts +7 -4
- package/styles/components/grid.scss +0 -1
- /package/es/{iconfont.1758158482285.ttf → iconfont.1758344480506.ttf} +0 -0
- /package/es/{iconfont.1758158482285.woff → iconfont.1758344480506.woff} +0 -0
- /package/es/{iconfont.1758158482285.woff2 → iconfont.1758344480506.woff2} +0 -0
- /package/lib/{iconfont.1758158482285.ttf → iconfont.1758344480506.ttf} +0 -0
- /package/lib/{iconfont.1758158482285.woff → iconfont.1758344480506.woff} +0 -0
- /package/lib/{iconfont.1758158482285.woff2 → iconfont.1758344480506.woff2} +0 -0
|
@@ -169,7 +169,7 @@ export default {
|
|
|
169
169
|
const isContentMenu = $xeTable.computeIsContentMenu;
|
|
170
170
|
const menuOpts = $xeTable.computeMenuOpts;
|
|
171
171
|
const config = menuOpts[type];
|
|
172
|
-
const visibleMethod = menuOpts
|
|
172
|
+
const { transfer, visibleMethod } = menuOpts;
|
|
173
173
|
if (config) {
|
|
174
174
|
const { options, disabled } = config;
|
|
175
175
|
if (disabled) {
|
|
@@ -181,9 +181,15 @@ export default {
|
|
|
181
181
|
if (!visibleMethod || visibleMethod(params)) {
|
|
182
182
|
evnt.preventDefault();
|
|
183
183
|
$xeTable.updateZindex();
|
|
184
|
+
const el = $xeTable.$refs.refElem;
|
|
185
|
+
const tableRect = el.getBoundingClientRect();
|
|
184
186
|
const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode();
|
|
185
|
-
let top = evnt.clientY
|
|
186
|
-
let left = evnt.clientX
|
|
187
|
+
let top = evnt.clientY - tableRect.y;
|
|
188
|
+
let left = evnt.clientX - tableRect.x;
|
|
189
|
+
if (transfer) {
|
|
190
|
+
top = evnt.clientY + scrollTop;
|
|
191
|
+
left = evnt.clientX + scrollLeft;
|
|
192
|
+
}
|
|
187
193
|
const handleVisible = () => {
|
|
188
194
|
internalData._currMenuParams = params;
|
|
189
195
|
Object.assign(ctxMenuStore, {
|
|
@@ -7,142 +7,160 @@ export default {
|
|
|
7
7
|
ctxMenuStore: Object,
|
|
8
8
|
ctxMenuOpts: Object
|
|
9
9
|
},
|
|
10
|
+
inject: {
|
|
11
|
+
$xeTable: {
|
|
12
|
+
default: null
|
|
13
|
+
}
|
|
14
|
+
},
|
|
10
15
|
mounted() {
|
|
11
|
-
|
|
16
|
+
const $xeMenuPanel = this;
|
|
17
|
+
const $xeTable = $xeMenuPanel.$xeTable;
|
|
18
|
+
const menuOpts = $xeTable.computeMenuOpts;
|
|
19
|
+
const { transfer } = menuOpts;
|
|
20
|
+
const el = this.$refs.refElem;
|
|
21
|
+
if (transfer && el) {
|
|
22
|
+
document.body.appendChild(el);
|
|
23
|
+
}
|
|
12
24
|
},
|
|
13
25
|
beforeDestroy() {
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
|
|
26
|
+
const el = this.$refs.refElem;
|
|
27
|
+
if (el && el.parentNode) {
|
|
28
|
+
el.parentNode.removeChild(el);
|
|
17
29
|
}
|
|
18
30
|
},
|
|
19
31
|
render(h) {
|
|
20
|
-
const $
|
|
32
|
+
const $xeMenuPanel = this;
|
|
33
|
+
const $xeTable = $xeMenuPanel.$xeTable;
|
|
21
34
|
const tableReactData = $xeTable;
|
|
22
35
|
const { ctxMenuStore } = tableReactData;
|
|
23
36
|
const menuOpts = $xeTable.computeMenuOpts;
|
|
37
|
+
const { destroyOnClose } = menuOpts;
|
|
38
|
+
const { visible, list, className } = ctxMenuStore;
|
|
24
39
|
return h('div', {
|
|
25
|
-
|
|
26
|
-
|
|
40
|
+
ref: 'refElem',
|
|
41
|
+
class: ['vxe-table--context-menu-wrapper', className, {
|
|
42
|
+
'is--visible': visible
|
|
27
43
|
}],
|
|
28
44
|
style: ctxMenuStore.style
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
h('a', {
|
|
50
|
-
class: 'vxe-context-menu--link',
|
|
51
|
-
on: {
|
|
52
|
-
click(evnt) {
|
|
53
|
-
$xeTable.ctxMenuLinkEvent(evnt, item);
|
|
54
|
-
},
|
|
55
|
-
mouseover(evnt) {
|
|
56
|
-
$xeTable.ctxMenuMouseoverEvent(evnt, item);
|
|
57
|
-
},
|
|
58
|
-
mouseout(evnt) {
|
|
59
|
-
$xeTable.ctxMenuMouseoutEvent(evnt, item);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
45
|
+
}, (destroyOnClose ? visible : true)
|
|
46
|
+
? list.map((options, gIndex) => {
|
|
47
|
+
return options.every((item) => item.visible === false)
|
|
48
|
+
? renderEmptyElement($xeTable)
|
|
49
|
+
: h('ul', {
|
|
50
|
+
class: 'vxe-context-menu--option-wrapper',
|
|
51
|
+
key: gIndex
|
|
52
|
+
}, options.map((item, index) => {
|
|
53
|
+
const hasChildMenus = item.children && item.children.some((child) => child.visible !== false);
|
|
54
|
+
const prefixOpts = Object.assign({}, item.prefixConfig);
|
|
55
|
+
const suffixOpts = Object.assign({}, item.suffixConfig);
|
|
56
|
+
const menuContent = getFuncText(item.name);
|
|
57
|
+
return item.visible === false
|
|
58
|
+
? renderEmptyElement($xeTable)
|
|
59
|
+
: h('li', {
|
|
60
|
+
class: [item.className, {
|
|
61
|
+
'link--disabled': item.disabled,
|
|
62
|
+
'link--active': item === ctxMenuStore.selected
|
|
63
|
+
}],
|
|
64
|
+
key: `${gIndex}_${index}`
|
|
62
65
|
}, [
|
|
63
|
-
h('
|
|
64
|
-
class:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
h('a', {
|
|
67
|
+
class: 'vxe-context-menu--link',
|
|
68
|
+
on: {
|
|
69
|
+
click(evnt) {
|
|
70
|
+
$xeTable.ctxMenuLinkEvent(evnt, item);
|
|
71
|
+
},
|
|
72
|
+
mouseover(evnt) {
|
|
73
|
+
$xeTable.ctxMenuMouseoverEvent(evnt, item);
|
|
74
|
+
},
|
|
75
|
+
mouseout(evnt) {
|
|
76
|
+
$xeTable.ctxMenuMouseoutEvent(evnt, item);
|
|
77
|
+
}
|
|
75
78
|
}
|
|
76
|
-
}, menuContent),
|
|
77
|
-
h('div', {
|
|
78
|
-
class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
|
|
79
79
|
}, [
|
|
80
|
-
h('
|
|
81
|
-
class:
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
class:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
80
|
+
h('div', {
|
|
81
|
+
class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
|
|
82
|
+
}, [
|
|
83
|
+
h('i', {
|
|
84
|
+
class: prefixOpts.icon || item.prefixIcon
|
|
85
|
+
}),
|
|
86
|
+
prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)
|
|
87
|
+
]),
|
|
88
|
+
h('span', {
|
|
89
|
+
class: 'vxe-context-menu--link-content',
|
|
90
|
+
attrs: {
|
|
91
|
+
title: menuContent
|
|
92
|
+
}
|
|
93
|
+
}, menuContent),
|
|
94
|
+
h('div', {
|
|
95
|
+
class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
|
|
96
|
+
}, [
|
|
97
|
+
h('i', {
|
|
98
|
+
class: (suffixOpts.icon || item.suffixIcon) || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : '')
|
|
99
|
+
}),
|
|
100
|
+
suffixOpts.content ? h('span', `${suffixOpts.content}`) : renderEmptyElement($xeTable)
|
|
101
|
+
])
|
|
102
|
+
]),
|
|
103
|
+
hasChildMenus
|
|
104
|
+
? h('ul', {
|
|
105
|
+
class: ['vxe-table--context-menu-clild-wrapper', {
|
|
106
|
+
'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
|
|
107
|
+
}]
|
|
108
|
+
}, item.children.map((child, cIndex) => {
|
|
109
|
+
const childPrefixOpts = Object.assign({}, child.prefixConfig);
|
|
110
|
+
const childSuffixOpts = Object.assign({}, child.suffixConfig);
|
|
111
|
+
const childMenuContent = getFuncText(child.name);
|
|
112
|
+
return child.visible === false
|
|
113
|
+
? null
|
|
114
|
+
: h('li', {
|
|
115
|
+
class: [child.className, {
|
|
116
|
+
'link--disabled': child.disabled,
|
|
117
|
+
'link--active': child === ctxMenuStore.selectChild
|
|
118
|
+
}],
|
|
119
|
+
key: `${gIndex}_${index}_${cIndex}`
|
|
117
120
|
}, [
|
|
118
|
-
h('
|
|
119
|
-
class:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
121
|
+
h('a', {
|
|
122
|
+
class: 'vxe-context-menu--link',
|
|
123
|
+
on: {
|
|
124
|
+
click(evnt) {
|
|
125
|
+
$xeTable.ctxMenuLinkEvent(evnt, child);
|
|
126
|
+
},
|
|
127
|
+
mouseover(evnt) {
|
|
128
|
+
$xeTable.ctxMenuMouseoverEvent(evnt, item, child);
|
|
129
|
+
},
|
|
130
|
+
mouseout(evnt) {
|
|
131
|
+
$xeTable.ctxMenuMouseoutEvent(evnt, item);
|
|
132
|
+
}
|
|
130
133
|
}
|
|
131
|
-
}, childMenuContent),
|
|
132
|
-
h('div', {
|
|
133
|
-
class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
|
|
134
134
|
}, [
|
|
135
|
-
h('
|
|
136
|
-
class:
|
|
137
|
-
}
|
|
138
|
-
|
|
135
|
+
h('div', {
|
|
136
|
+
class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
|
|
137
|
+
}, [
|
|
138
|
+
h('i', {
|
|
139
|
+
class: childPrefixOpts.icon || child.prefixIcon
|
|
140
|
+
}),
|
|
141
|
+
childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : renderEmptyElement($xeTable)
|
|
142
|
+
]),
|
|
143
|
+
h('span', {
|
|
144
|
+
class: 'vxe-context-menu--link-content',
|
|
145
|
+
attrs: {
|
|
146
|
+
title: childMenuContent
|
|
147
|
+
}
|
|
148
|
+
}, childMenuContent),
|
|
149
|
+
h('div', {
|
|
150
|
+
class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
|
|
151
|
+
}, [
|
|
152
|
+
h('i', {
|
|
153
|
+
class: childSuffixOpts.icon
|
|
154
|
+
}),
|
|
155
|
+
childSuffixOpts.content ? h('span', `${childSuffixOpts.content}`) : renderEmptyElement($xeTable)
|
|
156
|
+
])
|
|
139
157
|
])
|
|
140
|
-
])
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
158
|
+
]);
|
|
159
|
+
}))
|
|
160
|
+
: null
|
|
161
|
+
]);
|
|
162
|
+
}));
|
|
163
|
+
})
|
|
164
|
+
: []);
|
|
147
165
|
}
|
|
148
166
|
};
|
package/es/table/src/header.js
CHANGED
|
@@ -144,7 +144,10 @@ function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIndex, co
|
|
|
144
144
|
else {
|
|
145
145
|
tcStyle.minHeight = `${currCellHeight}px`;
|
|
146
146
|
}
|
|
147
|
-
if (
|
|
147
|
+
if (showCustomHeader) {
|
|
148
|
+
// custom
|
|
149
|
+
}
|
|
150
|
+
else if (isColGroup && !isLastRow) {
|
|
148
151
|
const firstCol = getColumnFirstChild(column);
|
|
149
152
|
const lastCol = getColumnLastChild(column);
|
|
150
153
|
if (firstCol && lastCol && firstCol.id !== lastCol.id) {
|
package/es/table/src/methods.js
CHANGED
|
@@ -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';
|
|
@@ -3515,6 +3515,7 @@ function initColumnHierarchy($xeTable) {
|
|
|
3515
3515
|
internalData.fullColumnFieldData = fullColFieldData;
|
|
3516
3516
|
}
|
|
3517
3517
|
function handleInitColumn($xeTable, collectColumn) {
|
|
3518
|
+
const props = $xeTable;
|
|
3518
3519
|
const $xeToolbar = $xeTable.$refs.$xeToolbar;
|
|
3519
3520
|
const reactData = $xeTable;
|
|
3520
3521
|
const internalData = $xeTable;
|
|
@@ -3549,6 +3550,10 @@ function handleInitColumn($xeTable, collectColumn) {
|
|
|
3549
3550
|
if ($xeTable.handleUpdateCustomColumn) {
|
|
3550
3551
|
$xeTable.handleUpdateCustomColumn();
|
|
3551
3552
|
}
|
|
3553
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
3554
|
+
if (props.showCustomHeader && reactData.isGroup && (columnOpts.resizable || props.resizable)) {
|
|
3555
|
+
warnLog('vxe.error.notConflictProp', ['show-custom-header & colgroup', 'column-config.resizable=false']);
|
|
3556
|
+
}
|
|
3552
3557
|
reactData.isColLoading = false;
|
|
3553
3558
|
return handleLazyRecalculate($xeTable, false, true, true);
|
|
3554
3559
|
});
|
|
@@ -5676,18 +5681,16 @@ const Methods = {
|
|
|
5676
5681
|
const scrollbarXToTop = $xeTable.computeScrollbarXToTop;
|
|
5677
5682
|
const { clientX: dragClientX } = evnt;
|
|
5678
5683
|
const dragBtnElem = evnt.target;
|
|
5684
|
+
let cell = dragBtnElem.parentElement;
|
|
5679
5685
|
let resizeColumn = column;
|
|
5680
5686
|
const isDragGroupCol = column.children && column.children.length;
|
|
5681
5687
|
if (isDragGroupCol) {
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
const trEl = cell ? cell.parentElement : null;
|
|
5689
|
-
const theadEl = trEl ? trEl.parentElement : null;
|
|
5690
|
-
cell = theadEl ? theadEl.querySelector(`.vxe-header--column[colid="${resizeColumn.id}"]`) : null;
|
|
5688
|
+
resizeColumn = getLastChildColumn(column);
|
|
5689
|
+
if (isDragGroupCol) {
|
|
5690
|
+
const trEl = cell ? cell.parentElement : null;
|
|
5691
|
+
const theadEl = trEl ? trEl.parentElement : null;
|
|
5692
|
+
cell = theadEl ? theadEl.querySelector(`.vxe-header--column[colid="${resizeColumn.id}"]`) : null;
|
|
5693
|
+
}
|
|
5691
5694
|
}
|
|
5692
5695
|
if (!cell) {
|
|
5693
5696
|
return;
|
|
@@ -10479,7 +10482,7 @@ const Methods = {
|
|
|
10479
10482
|
const xThreshold = $xeTable.computeScrollXThreshold;
|
|
10480
10483
|
isLeft = scrollLeft <= 0;
|
|
10481
10484
|
if (!isLeft) {
|
|
10482
|
-
isRight = scrollLeft + bodyWidth >= scrollWidth;
|
|
10485
|
+
isRight = scrollLeft + bodyWidth >= scrollWidth - 1;
|
|
10483
10486
|
}
|
|
10484
10487
|
if (scrollLeft > lastScrollLeft) {
|
|
10485
10488
|
direction = 'right';
|
|
@@ -10500,7 +10503,7 @@ const Methods = {
|
|
|
10500
10503
|
const yThreshold = $xeTable.computeScrollYThreshold;
|
|
10501
10504
|
isTop = scrollTop <= 0;
|
|
10502
10505
|
if (!isTop) {
|
|
10503
|
-
isBottom = scrollTop + bodyHeight >= scrollHeight;
|
|
10506
|
+
isBottom = scrollTop + bodyHeight >= scrollHeight - 1;
|
|
10504
10507
|
}
|
|
10505
10508
|
if (scrollTop > lastScrollTop) {
|
|
10506
10509
|
direction = 'bottom';
|
package/es/table/src/table.js
CHANGED
|
@@ -1739,7 +1739,9 @@ export default {
|
|
|
1739
1739
|
const $xeTable = this;
|
|
1740
1740
|
const props = $xeTable;
|
|
1741
1741
|
const internalData = $xeTable;
|
|
1742
|
+
const $xeGrid = $xeTable.$xeGrid;
|
|
1742
1743
|
const $xeGantt = $xeTable.$xeGantt;
|
|
1744
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
1743
1745
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
1744
1746
|
const rowOpts = $xeTable.computeRowOpts;
|
|
1745
1747
|
const customOpts = $xeTable.computeCustomOpts;
|
|
@@ -1754,6 +1756,16 @@ export default {
|
|
|
1754
1756
|
internalData.teleportToWrapperElem = classifyWrapperEl;
|
|
1755
1757
|
}
|
|
1756
1758
|
}
|
|
1759
|
+
if ($xeGGWrapper) {
|
|
1760
|
+
const popupContainerElem = $xeGantt.$refs.refPopupContainerElem;
|
|
1761
|
+
const popupWrapperEl = $xeTable.$refs.refPopupWrapperElem;
|
|
1762
|
+
if (popupContainerElem) {
|
|
1763
|
+
if (popupWrapperEl) {
|
|
1764
|
+
popupContainerElem.appendChild(popupWrapperEl);
|
|
1765
|
+
}
|
|
1766
|
+
internalData.popupToWrapperElem = popupContainerElem;
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1757
1769
|
if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
|
|
1758
1770
|
initTpImg();
|
|
1759
1771
|
}
|
|
@@ -1764,10 +1776,10 @@ export default {
|
|
|
1764
1776
|
if (!this.tooltipConfig && ($listeners['cell-mouseenter'] || $listeners['cell-mouseleave'])) {
|
|
1765
1777
|
warnLog('vxe.error.reqProp', ['tooltip-config']);
|
|
1766
1778
|
}
|
|
1767
|
-
// 使用已安装的组件,如果未安装则不渲染
|
|
1768
|
-
const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading');
|
|
1769
|
-
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
|
|
1770
1779
|
$xeTable.$nextTick(() => {
|
|
1780
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
1781
|
+
const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading');
|
|
1782
|
+
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
|
|
1771
1783
|
if (props.loading) {
|
|
1772
1784
|
if (!VxeUILoadingComponent && !this.$scopedSlots.loading) {
|
|
1773
1785
|
errLog('vxe.error.errProp', ['loading=true', 'loading=false | <template #loading>...</template>']);
|
|
@@ -1841,6 +1853,10 @@ export default {
|
|
|
1841
1853
|
if (teleportWrapperEl && teleportWrapperEl.parentElement) {
|
|
1842
1854
|
teleportWrapperEl.parentElement.removeChild(teleportWrapperEl);
|
|
1843
1855
|
}
|
|
1856
|
+
const popupWrapperEl = $xeTable.$refs.refPopupWrapperElem;
|
|
1857
|
+
if (popupWrapperEl && popupWrapperEl.parentElement) {
|
|
1858
|
+
popupWrapperEl.parentElement.removeChild(popupWrapperEl);
|
|
1859
|
+
}
|
|
1844
1860
|
const tableViewportEl = $xeTable.$refs.refTableViewportElem;
|
|
1845
1861
|
if (tableViewportEl) {
|
|
1846
1862
|
tableViewportEl.removeEventListener('wheel', $xeTable.triggerBodyWheelEvent);
|
|
@@ -2086,18 +2102,39 @@ export default {
|
|
|
2086
2102
|
renderDragTip(h, this)
|
|
2087
2103
|
])
|
|
2088
2104
|
]),
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2105
|
+
h('div', {
|
|
2106
|
+
key: 'tpw'
|
|
2107
|
+
}, [
|
|
2108
|
+
h('div', {
|
|
2109
|
+
ref: 'refPopupWrapperElem'
|
|
2110
|
+
}, [
|
|
2111
|
+
/**
|
|
2112
|
+
* 筛选
|
|
2113
|
+
*/
|
|
2114
|
+
initStore.filter
|
|
2115
|
+
? h(TableFilterPanelComponent, {
|
|
2116
|
+
key: 'tf',
|
|
2117
|
+
ref: 'refTableFilter',
|
|
2118
|
+
props: {
|
|
2119
|
+
filterStore
|
|
2120
|
+
}
|
|
2121
|
+
})
|
|
2122
|
+
: renderEmptyElement($xeTable),
|
|
2123
|
+
/**
|
|
2124
|
+
* 快捷菜单
|
|
2125
|
+
*/
|
|
2126
|
+
isContentMenu
|
|
2127
|
+
? h(TableMenuPanelComponent, {
|
|
2128
|
+
key: 'tm',
|
|
2129
|
+
ref: 'refTableMenu',
|
|
2130
|
+
props: {
|
|
2131
|
+
ctxMenuStore: this.ctxMenuStore,
|
|
2132
|
+
ctxMenuOpts: this.ctxMenuOpts
|
|
2133
|
+
}
|
|
2134
|
+
})
|
|
2135
|
+
: renderEmptyElement($xeTable)
|
|
2136
|
+
])
|
|
2137
|
+
]),
|
|
2101
2138
|
/**
|
|
2102
2139
|
* 导入
|
|
2103
2140
|
*/
|
|
@@ -2122,19 +2159,6 @@ export default {
|
|
|
2122
2159
|
}
|
|
2123
2160
|
})
|
|
2124
2161
|
: renderEmptyElement($xeTable),
|
|
2125
|
-
/**
|
|
2126
|
-
* 快捷菜单
|
|
2127
|
-
*/
|
|
2128
|
-
isContentMenu
|
|
2129
|
-
? h(TableMenuPanelComponent, {
|
|
2130
|
-
key: 'tm',
|
|
2131
|
-
ref: 'refTableMenu',
|
|
2132
|
-
props: {
|
|
2133
|
-
ctxMenuStore: this.ctxMenuStore,
|
|
2134
|
-
ctxMenuOpts: this.ctxMenuOpts
|
|
2135
|
-
}
|
|
2136
|
-
})
|
|
2137
|
-
: renderEmptyElement($xeTable),
|
|
2138
2162
|
h('div', {}, [
|
|
2139
2163
|
/**
|
|
2140
2164
|
* 提示相关
|
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,
|
|
@@ -485,6 +486,20 @@ export function getColReMinWidth(params) {
|
|
|
485
486
|
}
|
|
486
487
|
return mWidth;
|
|
487
488
|
}
|
|
489
|
+
export function getFirstChildColumn(column) {
|
|
490
|
+
const { children } = column;
|
|
491
|
+
if (children && children.length) {
|
|
492
|
+
return getFirstChildColumn(XEUtils.first(children));
|
|
493
|
+
}
|
|
494
|
+
return column;
|
|
495
|
+
}
|
|
496
|
+
export function getLastChildColumn(column) {
|
|
497
|
+
const { children } = column;
|
|
498
|
+
if (children && children.length) {
|
|
499
|
+
return getFirstChildColumn(XEUtils.last(children));
|
|
500
|
+
}
|
|
501
|
+
return column;
|
|
502
|
+
}
|
|
488
503
|
const lineOffsetSizes = {
|
|
489
504
|
mini: 3,
|
|
490
505
|
small: 2,
|
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 = "3.18.
|
|
3
|
+
export const version = "3.18.16";
|
|
4
4
|
VxeUI.version = version;
|
|
5
5
|
VxeUI.tableVersion = version;
|
|
6
6
|
VxeUI.setConfig({
|
|
@@ -94,9 +94,11 @@ VxeUI.setConfig({
|
|
|
94
94
|
footerCellConfig: {
|
|
95
95
|
height: 'unset'
|
|
96
96
|
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
menuConfig: {
|
|
98
|
+
// visibleMethod () {},
|
|
99
|
+
// transfer: false,
|
|
100
|
+
destroyOnClose: true
|
|
101
|
+
},
|
|
100
102
|
customConfig: {
|
|
101
103
|
// enabled: false,
|
|
102
104
|
allowVisible: true,
|
|
@@ -143,8 +145,9 @@ VxeUI.setConfig({
|
|
|
143
145
|
filterConfig: {
|
|
144
146
|
// remote: false,
|
|
145
147
|
// filterMethod: null,
|
|
146
|
-
// destroyOnClose: false,
|
|
147
148
|
// isEvery: false,
|
|
149
|
+
// transfer: false,
|
|
150
|
+
destroyOnClose: true,
|
|
148
151
|
multiple: true,
|
|
149
152
|
showIcon: true
|
|
150
153
|
},
|
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
|
@@ -1816,7 +1816,9 @@ var _default = exports.default = /* define-vxe-component start */(0, _comp.defin
|
|
|
1816
1816
|
class: 'vxe-grid--layout-aside-right-wrapper'
|
|
1817
1817
|
}, asideRightSlot({})) : renderEmptyElement($xeGrid)]), h('div', {
|
|
1818
1818
|
class: 'vxe-grid--layout-footer-wrapper'
|
|
1819
|
-
}, $xeGrid.renderChildLayout(h, footKeys))
|
|
1819
|
+
}, $xeGrid.renderChildLayout(h, footKeys)), h('div', {
|
|
1820
|
+
ref: 'refPopupContainerElem'
|
|
1821
|
+
})];
|
|
1820
1822
|
},
|
|
1821
1823
|
renderVN(h) {
|
|
1822
1824
|
const $xeGrid = this;
|