vxe-table 3.19.39 → 3.20.0-beta.1
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/es/index.css +1 -1
- package/es/index.esm.js +2 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +6 -4
- package/es/table/module/custom/panel.js +806 -799
- package/es/table/module/edit/mixin.js +43 -31
- package/es/table/module/export/export-panel.js +511 -458
- package/es/table/module/export/import-panel.js +224 -192
- package/es/table/module/keyboard/mixin.js +2 -2
- package/es/table/module/menu/panel.js +165 -161
- package/es/table/module/validator/mixin.js +255 -236
- package/es/table/src/body.js +2 -1
- package/es/table/src/cell.js +2 -2
- package/es/table/src/methods.js +33 -43
- package/es/table/src/table.js +13 -249
- package/es/table/src/util.js +242 -0
- package/es/table/style.css +23 -50
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +2 -2
- package/es/ui/src/dom.js +22 -0
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +23 -50
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.common.js +2 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +3640 -4790
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +6 -4
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +693 -685
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +47 -31
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/export-panel.js +450 -384
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +200 -159
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +2 -2
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/module/menu/panel.js +119 -114
- package/lib/table/module/menu/panel.min.js +1 -1
- package/lib/table/module/validator/mixin.js +271 -259
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/src/body.js +2 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +2 -2
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +33 -45
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +12 -248
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +243 -0
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +23 -50
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +22 -0
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +2 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/vxe-colgroup/index.js +2 -1
- package/lib/vxe-colgroup/index.min.js +1 -1
- package/lib/vxe-column/index.js +2 -1
- package/lib/vxe-column/index.min.js +1 -1
- package/lib/vxe-grid/index.js +2 -1
- package/lib/vxe-grid/index.min.js +1 -1
- package/lib/vxe-table/index.js +2 -1
- package/lib/vxe-table/index.min.js +1 -1
- package/lib/vxe-table/style/style.css +23 -50
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-toolbar/index.js +2 -1
- package/lib/vxe-toolbar/index.min.js +1 -1
- package/lib/vxe-ui/index.js +2 -1
- package/lib/vxe-ui/index.min.js +1 -1
- package/lib/vxe-v-x-e-table/index.js +2 -1
- package/lib/vxe-v-x-e-table/index.min.js +1 -1
- package/package.json +1 -1
- package/packages/table/module/custom/mixin.ts +7 -4
- package/packages/table/module/custom/panel.ts +846 -839
- package/packages/table/module/edit/mixin.ts +55 -35
- package/packages/table/module/export/export-panel.ts +545 -469
- package/packages/table/module/export/import-panel.ts +245 -202
- package/packages/table/module/filter/panel.ts +4 -18
- package/packages/table/module/keyboard/mixin.ts +2 -2
- package/packages/table/module/menu/panel.ts +171 -163
- package/packages/table/module/validator/mixin.ts +279 -240
- package/packages/table/src/body.ts +2 -1
- package/packages/table/src/cell.ts +2 -2
- package/packages/table/src/methods.ts +43 -45
- package/packages/table/src/table.ts +14 -260
- package/packages/table/src/util.ts +254 -0
- package/packages/ui/index.ts +1 -1
- package/packages/ui/src/dom.ts +22 -0
- package/styles/components/table.scss +5 -2
- package/styles/theme/base.scss +2 -1
- /package/es/{iconfont.1767145426781.ttf → iconfont.1767492234857.ttf} +0 -0
- /package/es/{iconfont.1767145426781.woff → iconfont.1767492234857.woff} +0 -0
- /package/es/{iconfont.1767145426781.woff2 → iconfont.1767492234857.woff2} +0 -0
- /package/lib/{iconfont.1767145426781.ttf → iconfont.1767492234857.ttf} +0 -0
- /package/lib/{iconfont.1767145426781.woff → iconfont.1767492234857.woff} +0 -0
- /package/lib/{iconfont.1767145426781.woff2 → iconfont.1767492234857.woff2} +0 -0
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
var _comp = require("../../../ui/src/comp");
|
|
7
8
|
var _ui = require("../../../ui");
|
|
8
9
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
9
10
|
var _utils = require("../../../ui/src/utils");
|
|
@@ -14,17 +15,14 @@ const {
|
|
|
14
15
|
getI18n,
|
|
15
16
|
renderEmptyElement
|
|
16
17
|
} = _ui.VxeUI;
|
|
17
|
-
var _default = exports.default = {
|
|
18
|
+
var _default = exports.default = /* define-vxe-component start */(0, _comp.defineVxeComponent)({
|
|
18
19
|
name: 'VxeTableMenuPanel',
|
|
19
|
-
props: {
|
|
20
|
-
ctxMenuStore: Object,
|
|
21
|
-
ctxMenuOpts: Object
|
|
22
|
-
},
|
|
23
20
|
inject: {
|
|
24
21
|
$xeTable: {
|
|
25
22
|
default: null
|
|
26
23
|
}
|
|
27
24
|
},
|
|
25
|
+
computed: Object.assign({}, {}),
|
|
28
26
|
mounted() {
|
|
29
27
|
const $xeMenuPanel = this;
|
|
30
28
|
const $xeTable = $xeMenuPanel.$xeTable;
|
|
@@ -32,140 +30,147 @@ var _default = exports.default = {
|
|
|
32
30
|
const {
|
|
33
31
|
transfer
|
|
34
32
|
} = menuOpts;
|
|
35
|
-
const el =
|
|
33
|
+
const el = $xeMenuPanel.$refs.refElem;
|
|
36
34
|
if (transfer && el) {
|
|
37
35
|
document.body.appendChild(el);
|
|
38
36
|
}
|
|
39
37
|
},
|
|
40
38
|
beforeDestroy() {
|
|
41
|
-
const
|
|
39
|
+
const $xeMenuPanel = this;
|
|
40
|
+
const el = $xeMenuPanel.$refs.refElem;
|
|
42
41
|
if (el && el.parentNode) {
|
|
43
42
|
el.parentNode.removeChild(el);
|
|
44
43
|
}
|
|
45
44
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
'
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
children,
|
|
75
|
-
loading
|
|
76
|
-
} = item;
|
|
77
|
-
const hasChildMenus = children && children.some(child => child.visible !== false);
|
|
78
|
-
const prefixOpts = Object.assign({}, item.prefixConfig);
|
|
79
|
-
const prefixIcon = prefixOpts.icon || item.prefixIcon;
|
|
80
|
-
const suffixOpts = Object.assign({}, item.suffixConfig);
|
|
81
|
-
const suffixIcon = suffixOpts.icon || item.suffixIcon;
|
|
82
|
-
const menuContent = (0, _utils.getFuncText)(item.name);
|
|
83
|
-
return item.visible === false ? renderEmptyElement($xeTable) : h('li', {
|
|
84
|
-
class: [item.className, {
|
|
85
|
-
'link--loading': loading,
|
|
86
|
-
'link--disabled': item.disabled,
|
|
87
|
-
'link--active': item === ctxMenuStore.selected
|
|
88
|
-
}],
|
|
89
|
-
key: `${gIndex}_${index}`
|
|
90
|
-
}, [h('a', {
|
|
91
|
-
class: 'vxe-context-menu--link',
|
|
92
|
-
on: {
|
|
93
|
-
click(evnt) {
|
|
94
|
-
$xeTable.ctxMenuLinkEvent(evnt, item);
|
|
95
|
-
},
|
|
96
|
-
mouseover(evnt) {
|
|
97
|
-
$xeTable.ctxMenuMouseoverEvent(evnt, item);
|
|
98
|
-
},
|
|
99
|
-
mouseout(evnt) {
|
|
100
|
-
$xeTable.ctxMenuMouseoutEvent(evnt, item);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}, [h('div', {
|
|
104
|
-
class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
|
|
105
|
-
}, [loading ? h('span', {
|
|
106
|
-
class: getIcon('TABLE_MENU_OPTION_LOADING')
|
|
107
|
-
}) : prefixIcon && _xeUtils.default.isFunction(prefixIcon) ? h('span', {}, (0, _vn.getSlotVNs)(prefixIcon.call($xeTable, {}))) : h('span', {}, [h('i', {
|
|
108
|
-
class: prefixIcon
|
|
109
|
-
})]), prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)]), h('span', {
|
|
110
|
-
class: 'vxe-context-menu--link-content',
|
|
111
|
-
attrs: {
|
|
112
|
-
title: menuContent
|
|
113
|
-
}
|
|
114
|
-
}, loading ? getI18n('vxe.table.menuLoading') : menuContent), h('div', {
|
|
115
|
-
class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
|
|
116
|
-
}, [suffixIcon && _xeUtils.default.isFunction(suffixIcon) ? h('span', {}, (0, _vn.getSlotVNs)(suffixIcon.call($xeTable, {}))) : h('i', {
|
|
117
|
-
class: suffixIcon || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : '')
|
|
118
|
-
}), suffixOpts.content ? h('span', `${suffixOpts.content}`) : renderEmptyElement($xeTable)])]), hasChildMenus && item.children ? h('ul', {
|
|
119
|
-
class: ['vxe-table--context-menu-clild-wrapper', {
|
|
120
|
-
'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
|
|
121
|
-
}]
|
|
122
|
-
}, item.children.map((child, cIndex) => {
|
|
45
|
+
methods: {
|
|
46
|
+
renderVN(h) {
|
|
47
|
+
const $xeMenuPanel = this;
|
|
48
|
+
const $xeTable = $xeMenuPanel.$xeTable;
|
|
49
|
+
const tableReactData = $xeTable;
|
|
50
|
+
const {
|
|
51
|
+
ctxMenuStore
|
|
52
|
+
} = tableReactData;
|
|
53
|
+
const menuOpts = $xeTable.computeMenuOpts;
|
|
54
|
+
const {
|
|
55
|
+
destroyOnClose
|
|
56
|
+
} = menuOpts;
|
|
57
|
+
const {
|
|
58
|
+
visible,
|
|
59
|
+
list,
|
|
60
|
+
className
|
|
61
|
+
} = ctxMenuStore;
|
|
62
|
+
return h('div', {
|
|
63
|
+
ref: 'refElem',
|
|
64
|
+
class: ['vxe-table--context-menu-wrapper', className, {
|
|
65
|
+
'is--visible': visible
|
|
66
|
+
}],
|
|
67
|
+
style: ctxMenuStore.style
|
|
68
|
+
}, (destroyOnClose ? visible : true) ? list.map((options, gIndex) => {
|
|
69
|
+
return options.every(item => item.visible === false) ? renderEmptyElement($xeTable) : h('ul', {
|
|
70
|
+
class: 'vxe-context-menu--option-wrapper',
|
|
71
|
+
key: gIndex
|
|
72
|
+
}, options.map((item, index) => {
|
|
123
73
|
const {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
'link--
|
|
74
|
+
children,
|
|
75
|
+
loading
|
|
76
|
+
} = item;
|
|
77
|
+
const hasChildMenus = children && children.some(child => child.visible !== false);
|
|
78
|
+
const prefixOpts = Object.assign({}, item.prefixConfig);
|
|
79
|
+
const prefixIcon = prefixOpts.icon || item.prefixIcon;
|
|
80
|
+
const suffixOpts = Object.assign({}, item.suffixConfig);
|
|
81
|
+
const suffixIcon = suffixOpts.icon || item.suffixIcon;
|
|
82
|
+
const menuContent = (0, _utils.getFuncText)(item.name);
|
|
83
|
+
return item.visible === false ? renderEmptyElement($xeTable) : h('li', {
|
|
84
|
+
class: [item.className, {
|
|
85
|
+
'link--loading': loading,
|
|
86
|
+
'link--disabled': item.disabled,
|
|
87
|
+
'link--active': item === ctxMenuStore.selected
|
|
136
88
|
}],
|
|
137
|
-
key: `${gIndex}_${index}
|
|
89
|
+
key: `${gIndex}_${index}`
|
|
138
90
|
}, [h('a', {
|
|
139
91
|
class: 'vxe-context-menu--link',
|
|
140
92
|
on: {
|
|
141
93
|
click(evnt) {
|
|
142
|
-
$xeTable.ctxMenuLinkEvent(evnt,
|
|
94
|
+
$xeTable.ctxMenuLinkEvent(evnt, item);
|
|
143
95
|
},
|
|
144
96
|
mouseover(evnt) {
|
|
145
|
-
$xeTable.ctxMenuMouseoverEvent(evnt, item
|
|
97
|
+
$xeTable.ctxMenuMouseoverEvent(evnt, item);
|
|
146
98
|
},
|
|
147
99
|
mouseout(evnt) {
|
|
148
100
|
$xeTable.ctxMenuMouseoutEvent(evnt, item);
|
|
149
101
|
}
|
|
150
102
|
}
|
|
151
103
|
}, [h('div', {
|
|
152
|
-
class: ['vxe-context-menu--link-prefix',
|
|
153
|
-
}, [
|
|
104
|
+
class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
|
|
105
|
+
}, [loading ? h('span', {
|
|
154
106
|
class: getIcon('TABLE_MENU_OPTION_LOADING')
|
|
155
|
-
}) :
|
|
156
|
-
class:
|
|
157
|
-
})]),
|
|
107
|
+
}) : prefixIcon && _xeUtils.default.isFunction(prefixIcon) ? h('span', {}, (0, _vn.getSlotVNs)(prefixIcon.call($xeTable, {}))) : h('span', {}, [h('i', {
|
|
108
|
+
class: prefixIcon
|
|
109
|
+
})]), prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)]), h('span', {
|
|
158
110
|
class: 'vxe-context-menu--link-content',
|
|
159
111
|
attrs: {
|
|
160
|
-
title:
|
|
112
|
+
title: menuContent
|
|
161
113
|
}
|
|
162
|
-
},
|
|
163
|
-
class: ['vxe-context-menu--link-suffix',
|
|
164
|
-
}, [
|
|
165
|
-
class:
|
|
166
|
-
}),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
114
|
+
}, loading ? getI18n('vxe.table.menuLoading') : menuContent), h('div', {
|
|
115
|
+
class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
|
|
116
|
+
}, [suffixIcon && _xeUtils.default.isFunction(suffixIcon) ? h('span', {}, (0, _vn.getSlotVNs)(suffixIcon.call($xeTable, {}))) : h('i', {
|
|
117
|
+
class: suffixIcon || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : '')
|
|
118
|
+
}), suffixOpts.content ? h('span', `${suffixOpts.content}`) : renderEmptyElement($xeTable)])]), hasChildMenus && item.children ? h('ul', {
|
|
119
|
+
class: ['vxe-table--context-menu-clild-wrapper', {
|
|
120
|
+
'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
|
|
121
|
+
}]
|
|
122
|
+
}, item.children.map((child, cIndex) => {
|
|
123
|
+
const {
|
|
124
|
+
loading: childLoading
|
|
125
|
+
} = child;
|
|
126
|
+
const childPrefixOpts = Object.assign({}, child.prefixConfig);
|
|
127
|
+
const childPrefixIcon = childPrefixOpts.icon || child.prefixIcon;
|
|
128
|
+
const childSuffixOpts = Object.assign({}, child.suffixConfig);
|
|
129
|
+
const childSuffixIcon = childSuffixOpts.icon || child.suffixIcon;
|
|
130
|
+
const childMenuContent = (0, _utils.getFuncText)(child.name);
|
|
131
|
+
return child.visible === false ? null : h('li', {
|
|
132
|
+
class: [child.className, {
|
|
133
|
+
'link--loading': childLoading,
|
|
134
|
+
'link--disabled': child.disabled,
|
|
135
|
+
'link--active': child === ctxMenuStore.selectChild
|
|
136
|
+
}],
|
|
137
|
+
key: `${gIndex}_${index}_${cIndex}`
|
|
138
|
+
}, [h('a', {
|
|
139
|
+
class: 'vxe-context-menu--link',
|
|
140
|
+
on: {
|
|
141
|
+
click(evnt) {
|
|
142
|
+
$xeTable.ctxMenuLinkEvent(evnt, child);
|
|
143
|
+
},
|
|
144
|
+
mouseover(evnt) {
|
|
145
|
+
$xeTable.ctxMenuMouseoverEvent(evnt, item, child);
|
|
146
|
+
},
|
|
147
|
+
mouseout(evnt) {
|
|
148
|
+
$xeTable.ctxMenuMouseoutEvent(evnt, item);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}, [h('div', {
|
|
152
|
+
class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
|
|
153
|
+
}, [child.loading ? h('span', {
|
|
154
|
+
class: getIcon('TABLE_MENU_OPTION_LOADING')
|
|
155
|
+
}) : childPrefixIcon && _xeUtils.default.isFunction(childPrefixIcon) ? h('span', {}, (0, _vn.getSlotVNs)(childPrefixIcon({}))) : h('span', {}, [h('i', {
|
|
156
|
+
class: childPrefixIcon
|
|
157
|
+
})]), childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : renderEmptyElement($xeTable)]), h('span', {
|
|
158
|
+
class: 'vxe-context-menu--link-content',
|
|
159
|
+
attrs: {
|
|
160
|
+
title: childMenuContent
|
|
161
|
+
}
|
|
162
|
+
}, childLoading ? getI18n('vxe.table.menuLoading') : childMenuContent), h('div', {
|
|
163
|
+
class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
|
|
164
|
+
}, [childSuffixIcon && _xeUtils.default.isFunction(childSuffixIcon) ? h('span', {}, (0, _vn.getSlotVNs)(childSuffixIcon.call($xeTable, {}))) : h('i', {
|
|
165
|
+
class: childSuffixIcon
|
|
166
|
+
}), childSuffixOpts.content ? h('span', `${childSuffixOpts.content}`) : renderEmptyElement($xeTable)])])]);
|
|
167
|
+
})) : null]);
|
|
168
|
+
}));
|
|
169
|
+
}) : []);
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
render(h) {
|
|
173
|
+
return this.renderVN(h);
|
|
170
174
|
}
|
|
171
|
-
};
|
|
175
|
+
});
|
|
176
|
+
/* define-vxe-component end */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _ui=require("../../../ui"),_xeUtils=_interopRequireDefault(require("xe-utils")),_utils=require("../../../ui/src/utils"),_vn=require("../../../ui/src/vn");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let{getIcon,getI18n,renderEmptyElement}=_ui.VxeUI;var _default=exports.default={name:"VxeTableMenuPanel",
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../../ui/src/comp"),_ui=require("../../../ui"),_xeUtils=_interopRequireDefault(require("xe-utils")),_utils=require("../../../ui/src/utils"),_vn=require("../../../ui/src/vn");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let{getIcon,getI18n,renderEmptyElement}=_ui.VxeUI;var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTableMenuPanel",inject:{$xeTable:{default:null}},computed:Object.assign({},{}),mounted(){var e=this.$xeTable.computeMenuOpts.transfer,n=this.$refs.refElem;e&&n&&document.body.appendChild(n)},beforeDestroy(){var e=this.$refs.refElem;e&&e.parentNode&&e.parentNode.removeChild(e)},methods:{renderVN(d){let x=this.$xeTable,m=x.ctxMenuStore;var e=x.computeMenuOpts.destroyOnClose,{visible:n,list:t,className:s}=m;return d("div",{ref:"refElem",class:["vxe-table--context-menu-wrapper",s,{"is--visible":n}],style:m.style},!e||n?t.map((e,u)=>e.every(e=>!1===e.visible)?renderEmptyElement(x):d("ul",{class:"vxe-context-menu--option-wrapper",key:u},e.map((o,r)=>{var{children:e,loading:n}=o,e=e&&e.some(e=>!1!==e.visible),t=Object.assign({},o.prefixConfig),s=t.icon||o.prefixIcon,l=Object.assign({},o.suffixConfig),i=l.icon||o.suffixIcon,a=(0,_utils.getFuncText)(o.name);return!1===o.visible?renderEmptyElement(x):d("li",{class:[o.className,{"link--loading":n,"link--disabled":o.disabled,"link--active":o===m.selected}],key:u+"_"+r},[d("a",{class:"vxe-context-menu--link",on:{click(e){x.ctxMenuLinkEvent(e,o)},mouseover(e){x.ctxMenuMouseoverEvent(e,o)},mouseout(e){x.ctxMenuMouseoutEvent(e,o)}}},[d("div",{class:["vxe-context-menu--link-prefix",t.className||""]},[n?d("span",{class:getIcon("TABLE_MENU_OPTION_LOADING")}):s&&_xeUtils.default.isFunction(s)?d("span",{},(0,_vn.getSlotVNs)(s.call(x,{}))):d("span",{},[d("i",{class:s})]),t.content?d("span",{},""+t.content):renderEmptyElement(x)]),d("span",{class:"vxe-context-menu--link-content",attrs:{title:a}},n?getI18n("vxe.table.menuLoading"):a),d("div",{class:["vxe-context-menu--link-suffix",l.className||""]},[i&&_xeUtils.default.isFunction(i)?d("span",{},(0,_vn.getSlotVNs)(i.call(x,{}))):d("i",{class:i||(e?getIcon().TABLE_MENU_OPTIONS:"")}),l.content?d("span",""+l.content):renderEmptyElement(x)])]),e&&o.children?d("ul",{class:["vxe-table--context-menu-clild-wrapper",{"is--show":o===m.selected&&m.showChild}]},o.children.map((n,e)=>{var t=n.loading,s=Object.assign({},n.prefixConfig),l=s.icon||n.prefixIcon,i=Object.assign({},n.suffixConfig),a=i.icon||n.suffixIcon,c=(0,_utils.getFuncText)(n.name);return!1===n.visible?null:d("li",{class:[n.className,{"link--loading":t,"link--disabled":n.disabled,"link--active":n===m.selectChild}],key:u+`_${r}_`+e},[d("a",{class:"vxe-context-menu--link",on:{click(e){x.ctxMenuLinkEvent(e,n)},mouseover(e){x.ctxMenuMouseoverEvent(e,o,n)},mouseout(e){x.ctxMenuMouseoutEvent(e,o)}}},[d("div",{class:["vxe-context-menu--link-prefix",s.className||""]},[n.loading?d("span",{class:getIcon("TABLE_MENU_OPTION_LOADING")}):l&&_xeUtils.default.isFunction(l)?d("span",{},(0,_vn.getSlotVNs)(l({}))):d("span",{},[d("i",{class:l})]),s.content?d("span",""+s.content):renderEmptyElement(x)]),d("span",{class:"vxe-context-menu--link-content",attrs:{title:c}},t?getI18n("vxe.table.menuLoading"):c),d("div",{class:["vxe-context-menu--link-suffix",i.className||""]},[a&&_xeUtils.default.isFunction(a)?d("span",{},(0,_vn.getSlotVNs)(a.call(x,{}))):d("i",{class:a}),i.content?d("span",""+i.content):renderEmptyElement(x)])])])})):null])}))):[])}},render(e){return this.renderVN(e)}});
|