vxe-table 4.16.15 → 4.16.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/es/grid/src/grid.js +7 -2
- 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 +58 -30
- package/es/table/src/util.js +19 -4
- package/es/ui/index.js +8 -5
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +6 -2
- package/lib/grid/src/grid.min.js +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/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.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/es-ES.min.js +1 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/header.js +3 -1
- package/lib/table/src/props.js +0 -318
- 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/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 +58 -30
- package/packages/table/src/util.ts +19 -2
- package/packages/ui/index.ts +7 -4
- package/styles/components/grid.scss +0 -1
- package/es/colgroup/style.css +0 -0
- package/es/colgroup/style.min.css +0 -0
- package/es/column/style.css +0 -0
- package/es/column/style.min.css +0 -0
- package/es/grid/style.css +0 -87
- package/es/grid/style.min.css +0 -1
- package/es/iconfont.1758246364726.ttf +0 -0
- package/es/iconfont.1758246364726.woff +0 -0
- package/es/iconfont.1758246364726.woff2 +0 -0
- package/es/index.esm.js +0 -3
- package/es/locale/lang/ar-EG.d.ts +0 -2
- package/es/locale/lang/de-DE.d.ts +0 -2
- package/es/locale/lang/en-US.d.ts +0 -2
- package/es/locale/lang/es-ES.d.ts +0 -2
- package/es/locale/lang/fr-FR.d.ts +0 -2
- package/es/locale/lang/hu-HU.d.ts +0 -2
- package/es/locale/lang/hy-AM.d.ts +0 -2
- package/es/locale/lang/id-ID.d.ts +0 -2
- package/es/locale/lang/it-IT.d.ts +0 -2
- package/es/locale/lang/ja-JP.d.ts +0 -2
- package/es/locale/lang/ko-KR.d.ts +0 -2
- package/es/locale/lang/ms-MY.d.ts +0 -2
- package/es/locale/lang/nb-NO.d.ts +0 -2
- package/es/locale/lang/pt-BR.d.ts +0 -2
- package/es/locale/lang/ru-RU.d.ts +0 -2
- package/es/locale/lang/th-TH.d.ts +0 -2
- package/es/locale/lang/ug-CN.d.ts +0 -2
- package/es/locale/lang/uk-UA.d.ts +0 -2
- package/es/locale/lang/uz-UZ.d.ts +0 -2
- package/es/locale/lang/vi-VN.d.ts +0 -2
- package/es/locale/lang/zh-CHT.d.ts +0 -2
- package/es/locale/lang/zh-CN.d.ts +0 -2
- package/es/locale/lang/zh-HK.d.ts +0 -2
- package/es/locale/lang/zh-MO.d.ts +0 -2
- package/es/locale/lang/zh-TW.d.ts +0 -2
- package/es/table/style.css +0 -3657
- package/es/table/style.min.css +0 -1
- package/es/toolbar/style.css +0 -90
- package/es/toolbar/style.min.css +0 -1
- package/es/ui/style.css +0 -0
- package/es/ui/style.min.css +0 -0
- package/es/v-x-e-table/style.css +0 -0
- package/es/v-x-e-table/style.min.css +0 -0
- package/es/vxe-colgroup/style.css +0 -0
- package/es/vxe-colgroup/style.min.css +0 -0
- package/es/vxe-column/style.css +0 -0
- package/es/vxe-column/style.min.css +0 -0
- package/es/vxe-grid/style.css +0 -87
- package/es/vxe-grid/style.min.css +0 -1
- package/es/vxe-table/style.css +0 -3657
- package/es/vxe-table/style.min.css +0 -1
- package/es/vxe-toolbar/style.css +0 -90
- package/es/vxe-toolbar/style.min.css +0 -1
- package/es/vxe-ui/style.css +0 -0
- package/es/vxe-ui/style.min.css +0 -0
- package/es/vxe-v-x-e-table/style.css +0 -0
- package/es/vxe-v-x-e-table/style.min.css +0 -0
- package/lib/colgroup/style/index.js +0 -1
- package/lib/colgroup/style/style.css +0 -0
- package/lib/colgroup/style/style.min.css +0 -0
- package/lib/column/style/index.js +0 -1
- package/lib/column/style/style.css +0 -0
- package/lib/column/style/style.min.css +0 -0
- package/lib/grid/style/index.js +0 -1
- package/lib/grid/style/style.css +0 -87
- package/lib/grid/style/style.min.css +0 -1
- package/lib/iconfont.1758246364726.ttf +0 -0
- package/lib/iconfont.1758246364726.woff +0 -0
- package/lib/iconfont.1758246364726.woff2 +0 -0
- package/lib/index.common.js +0 -22
- package/lib/locale/lang/ar-EG.d.ts +0 -2
- package/lib/locale/lang/ar-EG.umd.js +0 -806
- package/lib/locale/lang/de-DE.d.ts +0 -2
- package/lib/locale/lang/de-DE.umd.js +0 -806
- package/lib/locale/lang/en-US.d.ts +0 -2
- package/lib/locale/lang/en-US.umd.js +0 -806
- package/lib/locale/lang/es-ES.d.ts +0 -2
- package/lib/locale/lang/es-ES.umd.js +0 -806
- package/lib/locale/lang/fr-FR.d.ts +0 -2
- package/lib/locale/lang/fr-FR.umd.js +0 -806
- package/lib/locale/lang/hu-HU.d.ts +0 -2
- package/lib/locale/lang/hu-HU.umd.js +0 -806
- package/lib/locale/lang/hy-AM.d.ts +0 -2
- package/lib/locale/lang/hy-AM.umd.js +0 -806
- package/lib/locale/lang/id-ID.d.ts +0 -2
- package/lib/locale/lang/id-ID.umd.js +0 -806
- package/lib/locale/lang/it-IT.d.ts +0 -2
- package/lib/locale/lang/it-IT.umd.js +0 -806
- package/lib/locale/lang/ja-JP.d.ts +0 -2
- package/lib/locale/lang/ja-JP.umd.js +0 -806
- package/lib/locale/lang/ko-KR.d.ts +0 -2
- package/lib/locale/lang/ko-KR.umd.js +0 -806
- package/lib/locale/lang/ms-MY.d.ts +0 -2
- package/lib/locale/lang/ms-MY.umd.js +0 -806
- package/lib/locale/lang/nb-NO.d.ts +0 -2
- package/lib/locale/lang/nb-NO.umd.js +0 -806
- package/lib/locale/lang/pt-BR.d.ts +0 -2
- package/lib/locale/lang/pt-BR.umd.js +0 -806
- package/lib/locale/lang/ru-RU.d.ts +0 -2
- package/lib/locale/lang/ru-RU.umd.js +0 -806
- package/lib/locale/lang/th-TH.d.ts +0 -2
- package/lib/locale/lang/th-TH.umd.js +0 -806
- package/lib/locale/lang/ug-CN.d.ts +0 -2
- package/lib/locale/lang/ug-CN.umd.js +0 -806
- package/lib/locale/lang/uk-UA.d.ts +0 -2
- package/lib/locale/lang/uk-UA.umd.js +0 -806
- package/lib/locale/lang/uz-UZ.d.ts +0 -2
- package/lib/locale/lang/uz-UZ.umd.js +0 -806
- package/lib/locale/lang/vi-VN.d.ts +0 -2
- package/lib/locale/lang/vi-VN.umd.js +0 -806
- package/lib/locale/lang/zh-CHT.d.ts +0 -2
- package/lib/locale/lang/zh-CHT.umd.js +0 -806
- package/lib/locale/lang/zh-CN.d.ts +0 -2
- package/lib/locale/lang/zh-CN.umd.js +0 -808
- package/lib/locale/lang/zh-HK.d.ts +0 -2
- package/lib/locale/lang/zh-HK.umd.js +0 -23
- package/lib/locale/lang/zh-MO.d.ts +0 -2
- package/lib/locale/lang/zh-MO.umd.js +0 -23
- package/lib/locale/lang/zh-TW.d.ts +0 -2
- package/lib/locale/lang/zh-TW.umd.js +0 -23
- package/lib/table/module/custom/hook.js +0 -430
- package/lib/table/module/custom/hook.min.js +0 -1
- package/lib/table/module/custom/panel.js +0 -1193
- package/lib/table/module/custom/panel.min.js +0 -1
- package/lib/table/module/edit/hook.js +0 -1308
- package/lib/table/module/edit/hook.min.js +0 -1
- package/lib/table/module/export/export-panel.js +0 -467
- package/lib/table/module/export/export-panel.min.js +0 -1
- package/lib/table/module/export/hook.js +0 -1888
- package/lib/table/module/export/hook.min.js +0 -1
- package/lib/table/module/export/import-panel.js +0 -226
- package/lib/table/module/export/import-panel.min.js +0 -1
- package/lib/table/module/export/util.js +0 -20
- package/lib/table/module/export/util.min.js +0 -1
- package/lib/table/module/filter/hook.js +0 -442
- package/lib/table/module/filter/hook.min.js +0 -1
- package/lib/table/module/filter/panel.js +0 -264
- package/lib/table/module/filter/panel.min.js +0 -1
- package/lib/table/module/keyboard/hook.js +0 -579
- package/lib/table/module/keyboard/hook.min.js +0 -1
- package/lib/table/module/menu/hook.js +0 -383
- package/lib/table/module/menu/hook.min.js +0 -1
- package/lib/table/module/menu/panel.js +0 -135
- package/lib/table/module/menu/panel.min.js +0 -1
- package/lib/table/module/validator/hook.js +0 -681
- package/lib/table/module/validator/hook.min.js +0 -1
- package/lib/table/src/header.min.js +0 -1
- package/lib/table/src/props.min.js +0 -1
- package/lib/table/src/store.js +0 -15
- package/lib/table/src/store.min.js +0 -1
- package/lib/table/src/table.js +0 -902
- package/lib/table/src/table.min.js +0 -1
- package/lib/table/src/use/cell-view.js +0 -57
- package/lib/table/src/use/cell-view.min.js +0 -1
- package/lib/table/src/use/index.js +0 -16
- package/lib/table/src/use/index.min.js +0 -1
- package/lib/table/src/util.js +0 -896
- package/lib/table/src/util.min.js +0 -1
- package/lib/table/style/index.js +0 -1
- package/lib/table/style/style.css +0 -3657
- package/lib/table/style/style.min.css +0 -1
- package/lib/toolbar/style/index.js +0 -1
- package/lib/toolbar/style/style.css +0 -90
- package/lib/toolbar/style/style.min.css +0 -1
- package/lib/ui/style/index.js +0 -1
- package/lib/ui/style/style.css +0 -0
- package/lib/ui/style/style.min.css +0 -0
- package/lib/v-x-e-table/style/index.js +0 -1
- package/lib/v-x-e-table/style/style.css +0 -0
- package/lib/v-x-e-table/style/style.min.css +0 -0
- package/lib/vxe-colgroup/style/index.js +0 -1
- package/lib/vxe-colgroup/style/style.css +0 -0
- package/lib/vxe-colgroup/style/style.min.css +0 -0
- package/lib/vxe-column/style/index.js +0 -1
- package/lib/vxe-column/style/style.css +0 -0
- package/lib/vxe-column/style/style.min.css +0 -0
- package/lib/vxe-grid/style/index.js +0 -1
- package/lib/vxe-grid/style/style.css +0 -87
- package/lib/vxe-grid/style/style.min.css +0 -1
- package/lib/vxe-table/style/index.js +0 -1
- package/lib/vxe-table/style/style.css +0 -3657
- package/lib/vxe-table/style/style.min.css +0 -1
- package/lib/vxe-toolbar/style/index.js +0 -1
- package/lib/vxe-toolbar/style/style.css +0 -90
- package/lib/vxe-toolbar/style/style.min.css +0 -1
- package/lib/vxe-ui/style/index.js +0 -1
- package/lib/vxe-ui/style/style.css +0 -0
- package/lib/vxe-ui/style/style.min.css +0 -0
- package/lib/vxe-v-x-e-table/style/index.js +0 -1
- package/lib/vxe-v-x-e-table/style/style.css +0 -0
- package/lib/vxe-v-x-e-table/style/style.min.css +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();
|
|
@@ -1195,6 +1196,7 @@ export default defineVxeComponent({
|
|
|
1195
1196
|
$xeTable.setMergeHeaderCells(merges);
|
|
1196
1197
|
};
|
|
1197
1198
|
const handleHeaderMerge = (merges) => {
|
|
1199
|
+
const { showCustomHeader } = props;
|
|
1198
1200
|
const { footerTableData } = reactData;
|
|
1199
1201
|
const { mergeHeaderList, mergeHeaderMaps, fullColumnIdData } = internalData;
|
|
1200
1202
|
if (merges) {
|
|
@@ -1219,6 +1221,10 @@ export default defineVxeComponent({
|
|
|
1219
1221
|
if (mergeRowIndex > -1 && mergeColumnIndex > -1 && (rowspan || colspan)) {
|
|
1220
1222
|
rowspan = XEUtils.toNumber(rowspan) || 1;
|
|
1221
1223
|
colspan = XEUtils.toNumber(colspan) || 1;
|
|
1224
|
+
if (!showCustomHeader && rowspan > 1) {
|
|
1225
|
+
errLog('vxe.error.notSupportProp', ['[table] show-custom-header=false', `rowspan=${rowspan}`, 'rowspan=1']);
|
|
1226
|
+
return;
|
|
1227
|
+
}
|
|
1222
1228
|
if (rowspan > 1 || colspan > 1) {
|
|
1223
1229
|
const row = footerTableData[mergeRowIndex];
|
|
1224
1230
|
const column = visibleColumn[mergeColumnIndex];
|
|
@@ -3849,6 +3855,10 @@ export default defineVxeComponent({
|
|
|
3849
3855
|
if ($xeTable.handleUpdateCustomColumn) {
|
|
3850
3856
|
$xeTable.handleUpdateCustomColumn();
|
|
3851
3857
|
}
|
|
3858
|
+
const columnOpts = computeColumnOpts.value;
|
|
3859
|
+
if (props.showCustomHeader && reactData.isGroup && (columnOpts.resizable || props.resizable)) {
|
|
3860
|
+
warnLog('vxe.error.notConflictProp', ['show-custom-header & colgroup', 'column-config.resizable=false']);
|
|
3861
|
+
}
|
|
3852
3862
|
reactData.isColLoading = false;
|
|
3853
3863
|
return handleLazyRecalculate(false, true, true);
|
|
3854
3864
|
});
|
|
@@ -8416,18 +8426,16 @@ export default defineVxeComponent({
|
|
|
8416
8426
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
8417
8427
|
const { clientX: dragClientX } = evnt;
|
|
8418
8428
|
const dragBtnElem = evnt.target;
|
|
8429
|
+
let cell = dragBtnElem.parentElement;
|
|
8419
8430
|
let resizeColumn = column;
|
|
8420
8431
|
const isDragGroupCol = column.children && column.children.length;
|
|
8421
8432
|
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;
|
|
8433
|
+
resizeColumn = getLastChildColumn(column);
|
|
8434
|
+
if (isDragGroupCol) {
|
|
8435
|
+
const trEl = cell ? cell.parentElement : null;
|
|
8436
|
+
const theadEl = trEl ? trEl.parentElement : null;
|
|
8437
|
+
cell = theadEl ? theadEl.querySelector(`.vxe-header--column[colid="${resizeColumn.id}"]`) : null;
|
|
8438
|
+
}
|
|
8431
8439
|
}
|
|
8432
8440
|
if (!cell) {
|
|
8433
8441
|
return;
|
|
@@ -12082,7 +12090,7 @@ export default defineVxeComponent({
|
|
|
12082
12090
|
const renderVN = () => {
|
|
12083
12091
|
const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props;
|
|
12084
12092
|
const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore, tooltipStore } = reactData;
|
|
12085
|
-
const { teleportToWrapperElem } = internalData;
|
|
12093
|
+
const { teleportToWrapperElem, popupToWrapperElem } = internalData;
|
|
12086
12094
|
const { leftList, rightList } = columnStore;
|
|
12087
12095
|
const loadingSlot = slots.loading;
|
|
12088
12096
|
const tipSlots = {
|
|
@@ -12280,16 +12288,38 @@ export default defineVxeComponent({
|
|
|
12280
12288
|
])
|
|
12281
12289
|
])
|
|
12282
12290
|
]),
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
|
|
12292
|
-
|
|
12291
|
+
h('div', {
|
|
12292
|
+
key: 'tpw'
|
|
12293
|
+
}, [
|
|
12294
|
+
h(Teleport, {
|
|
12295
|
+
to: popupToWrapperElem,
|
|
12296
|
+
disabled: !($xeGGWrapper && popupToWrapperElem)
|
|
12297
|
+
}, [
|
|
12298
|
+
h('div', {
|
|
12299
|
+
ref: refPopupWrapperElem
|
|
12300
|
+
}, [
|
|
12301
|
+
/**
|
|
12302
|
+
* 筛选
|
|
12303
|
+
*/
|
|
12304
|
+
initStore.filter
|
|
12305
|
+
? h(TableFilterPanelComponent, {
|
|
12306
|
+
key: 'tf',
|
|
12307
|
+
ref: refTableFilter,
|
|
12308
|
+
filterStore
|
|
12309
|
+
})
|
|
12310
|
+
: renderEmptyElement($xeTable),
|
|
12311
|
+
/**
|
|
12312
|
+
* 快捷菜单
|
|
12313
|
+
*/
|
|
12314
|
+
isContentMenu
|
|
12315
|
+
? h(TableMenuPanelComponent, {
|
|
12316
|
+
key: 'tm',
|
|
12317
|
+
ref: refTableMenu
|
|
12318
|
+
})
|
|
12319
|
+
: renderEmptyElement($xeTable)
|
|
12320
|
+
])
|
|
12321
|
+
])
|
|
12322
|
+
]),
|
|
12293
12323
|
/**
|
|
12294
12324
|
* 导入
|
|
12295
12325
|
*/
|
|
@@ -12310,15 +12340,6 @@ export default defineVxeComponent({
|
|
|
12310
12340
|
storeData: reactData.exportStore
|
|
12311
12341
|
})
|
|
12312
12342
|
: renderEmptyElement($xeTable),
|
|
12313
|
-
/**
|
|
12314
|
-
* 快捷菜单
|
|
12315
|
-
*/
|
|
12316
|
-
isContentMenu
|
|
12317
|
-
? h(TableMenuPanelComponent, {
|
|
12318
|
-
key: 'tm',
|
|
12319
|
-
ref: refTableMenu
|
|
12320
|
-
})
|
|
12321
|
-
: renderEmptyElement($xeTable),
|
|
12322
12343
|
/**
|
|
12323
12344
|
* 提示相关
|
|
12324
12345
|
*/
|
|
@@ -12605,6 +12626,13 @@ export default defineVxeComponent({
|
|
|
12605
12626
|
internalData.teleportToWrapperElem = classifyWrapperEl;
|
|
12606
12627
|
}
|
|
12607
12628
|
}
|
|
12629
|
+
if ($xeGGWrapper) {
|
|
12630
|
+
const { refPopupContainerElem } = $xeGGWrapper.getRefMaps();
|
|
12631
|
+
const popupContainerEl = refPopupContainerElem.value;
|
|
12632
|
+
if (popupContainerEl) {
|
|
12633
|
+
internalData.popupToWrapperElem = popupContainerEl;
|
|
12634
|
+
}
|
|
12635
|
+
}
|
|
12608
12636
|
if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
|
|
12609
12637
|
initTpImg();
|
|
12610
12638
|
}
|
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.17";
|
|
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/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 => {
|