vxe-table 4.23.8 → 4.23.9
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/dist/all.esm.js +5715 -3783
- package/es/components.d.ts +1 -0
- package/es/components.js +2 -7
- package/es/grid/src/emits.js +1 -15
- package/es/grid/src/grid.js +397 -120
- package/es/index.esm.js +1 -0
- package/es/index.js +1 -0
- package/es/table/module/custom/hook.js +49 -42
- package/es/table/module/custom/panel.js +777 -527
- package/es/table/module/edit/hook.js +140 -62
- package/es/table/module/export/export-panel.js +399 -316
- package/es/table/module/export/hook.js +395 -337
- package/es/table/module/export/import-panel.js +152 -123
- package/es/table/module/filter/hook.js +16 -2
- package/es/table/module/filter/panel.js +146 -84
- package/es/table/module/keyboard/hook.js +8 -4
- package/es/table/module/menu/panel.js +197 -126
- package/es/table/render/index.js +151 -98
- package/es/table/src/body.js +355 -233
- package/es/table/src/cell.js +426 -269
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/footer.js +144 -99
- package/es/table/src/group.js +7 -3
- package/es/table/src/header.js +229 -172
- package/es/table/src/table.js +1503 -1030
- package/es/table/src/util.js +15 -19
- package/es/toolbar/src/toolbar.js +132 -75
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +9 -6
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.d.ts +1 -1
- package/lib/components.js +2 -7
- package/lib/grid/src/emits.js +1 -15
- package/lib/grid/src/grid.js +397 -120
- package/lib/index.common.js +1 -0
- package/lib/index.js +1 -0
- package/lib/index.umd.js +5732 -3800
- package/lib/index.umd.min.js +3 -3
- package/lib/table/module/custom/hook.js +49 -42
- package/lib/table/module/custom/panel.js +777 -527
- package/lib/table/module/edit/hook.js +140 -62
- package/lib/table/module/export/export-panel.js +399 -316
- package/lib/table/module/export/hook.js +395 -337
- package/lib/table/module/export/import-panel.js +152 -123
- package/lib/table/module/filter/hook.js +16 -2
- package/lib/table/module/filter/panel.js +146 -84
- package/lib/table/module/keyboard/hook.js +8 -4
- package/lib/table/module/menu/panel.js +197 -126
- package/lib/table/render/index.js +151 -98
- package/lib/table/src/body.js +355 -233
- package/lib/table/src/cell.js +426 -269
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/footer.js +144 -99
- package/lib/table/src/group.js +7 -3
- package/lib/table/src/header.js +229 -172
- package/lib/table/src/table.js +1471 -1029
- package/lib/table/src/util.js +15 -19
- package/lib/toolbar/src/toolbar.js +132 -75
- package/lib/ui/index.js +1 -1
- package/lib/ui/src/dom.js +9 -6
- package/lib/ui/src/log.js +1 -1
- package/package.json +2 -2
- package/packages/colgroup/index.ts +22 -22
- package/packages/column/index.ts +22 -22
- package/packages/components.ts +41 -44
- package/packages/grid/index.ts +18 -18
- package/packages/grid/src/emits.ts +5 -19
- package/packages/grid/src/grid.ts +2229 -1925
- package/packages/grid/src/props.ts +22 -23
- package/packages/index.ts +11 -11
- package/packages/locale/lang/fr-FR.ts +15 -15
- package/packages/locale/lang/it-IT.ts +4 -4
- package/packages/locale/lang/uk-UA.ts +1 -1
- package/packages/locale/lang/uz-UZ.ts +13 -13
- package/packages/locale/lang/zh-CN.ts +907 -907
- package/packages/table/index.ts +26 -26
- package/packages/table/module/custom/hook.ts +510 -503
- package/packages/table/module/custom/panel.ts +2002 -1743
- package/packages/table/module/edit/hook.ts +1224 -1131
- package/packages/table/module/export/export-panel.ts +697 -611
- package/packages/table/module/export/hook.ts +2160 -2059
- package/packages/table/module/export/import-panel.ts +319 -279
- package/packages/table/module/export/util.ts +25 -24
- package/packages/table/module/filter/hook.ts +519 -501
- package/packages/table/module/filter/panel.ts +368 -304
- package/packages/table/module/keyboard/hook.ts +498 -494
- package/packages/table/module/menu/hook.ts +330 -330
- package/packages/table/module/menu/panel.ts +272 -201
- package/packages/table/module/validator/hook.ts +653 -635
- package/packages/table/render/index.ts +1819 -1744
- package/packages/table/src/body.ts +1078 -955
- package/packages/table/src/cell.ts +1524 -1359
- package/packages/table/src/column.ts +192 -192
- package/packages/table/src/columnInfo.ts +232 -232
- package/packages/table/src/emits.ts +134 -134
- package/packages/table/src/footer.ts +425 -380
- package/packages/table/src/group.ts +67 -63
- package/packages/table/src/header.ts +642 -581
- package/packages/table/src/props.ts +336 -336
- package/packages/table/src/store.ts +14 -14
- package/packages/table/src/table.ts +16011 -15454
- package/packages/table/src/use/cell-view.ts +41 -44
- package/packages/table/src/use/index.ts +1 -1
- package/packages/table/src/util.ts +1206 -1216
- package/packages/toolbar/index.ts +18 -18
- package/packages/toolbar/src/toolbar.ts +768 -706
- package/packages/ui/index.ts +519 -520
- package/packages/ui/src/anime.ts +51 -52
- package/packages/ui/src/comp.ts +3 -3
- package/packages/ui/src/dom.ts +466 -463
- package/packages/ui/src/log.ts +19 -19
- package/packages/ui/src/utils.ts +66 -66
- package/packages/ui/src/vn.ts +55 -55
- package/packages/v-x-e-table/index.d.ts +3 -3
- package/packages/v-x-e-table/index.ts +3 -3
- package/types/all.d.ts +76 -76
- package/types/index.d.ts +4 -4
- /package/dist/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/dist/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/dist/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/es/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/es/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/es/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/lib/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/lib/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/lib/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
|
@@ -27,135 +27,206 @@ var panel_default = defineVxeComponent({
|
|
|
27
27
|
const menuOpts = computeMenuOpts.value;
|
|
28
28
|
const { transfer, destroyOnClose, className } = menuOpts;
|
|
29
29
|
const { visible, list } = ctxMenuStore;
|
|
30
|
-
return h(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const hasChildMenus = children && children.some((child) => child.visible !== false);
|
|
47
|
-
const prefixOpts = Object.assign({}, item.prefixConfig);
|
|
48
|
-
const prefixIcon = prefixOpts.icon || item.prefixIcon;
|
|
49
|
-
const suffixOpts = Object.assign({}, item.suffixConfig);
|
|
50
|
-
const suffixIcon = suffixOpts.icon || item.suffixIcon;
|
|
51
|
-
const menuContent = getFuncText(item.name);
|
|
52
|
-
return item.visible === false ? renderEmptyElement($xeTable) : h("li", {
|
|
53
|
-
class: ["vxe-table--context-menu--option", item.className, {
|
|
54
|
-
"link--loading": loading,
|
|
55
|
-
"link--disabled": item.disabled,
|
|
56
|
-
"link--active": item === ctxMenuStore.selected
|
|
57
|
-
}],
|
|
58
|
-
key: `${gIndex}_${index}`
|
|
59
|
-
}, [
|
|
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);
|
|
30
|
+
return h(
|
|
31
|
+
Teleport,
|
|
32
|
+
{
|
|
33
|
+
to: "body",
|
|
34
|
+
disabled: !transfer
|
|
35
|
+
},
|
|
36
|
+
[
|
|
37
|
+
h(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
ref: refElem,
|
|
41
|
+
class: [
|
|
42
|
+
"vxe-table--context-menu-wrapper",
|
|
43
|
+
className,
|
|
44
|
+
{
|
|
45
|
+
"is--visible": visible
|
|
70
46
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
const { loading: childLoading } = child;
|
|
103
|
-
const childPrefixOpts = Object.assign({}, child.prefixConfig);
|
|
104
|
-
const childPrefixIcon = childPrefixOpts.icon || child.prefixIcon;
|
|
105
|
-
const childSuffixOpts = Object.assign({}, child.suffixConfig);
|
|
106
|
-
const childSuffixIcon = childSuffixOpts.icon || child.suffixIcon;
|
|
107
|
-
const childMenuContent = getFuncText(child.name);
|
|
108
|
-
return child.visible === false ? null : h("li", {
|
|
109
|
-
class: ["vxe-table--context-menu--option", child.className, {
|
|
110
|
-
"link--loading": childLoading,
|
|
111
|
-
"link--disabled": child.disabled,
|
|
112
|
-
"link--active": child === ctxMenuStore.selectChild
|
|
113
|
-
}],
|
|
114
|
-
key: `${gIndex}_${index}_${cIndex}`
|
|
115
|
-
}, [
|
|
116
|
-
h("a", {
|
|
117
|
-
class: "vxe-context-menu--link",
|
|
118
|
-
onClick(evnt) {
|
|
119
|
-
$xeTable.ctxMenuLinkEvent(evnt, child);
|
|
120
|
-
},
|
|
121
|
-
onMouseover(evnt) {
|
|
122
|
-
$xeTable.ctxMenuMouseoverEvent(evnt, item, child);
|
|
47
|
+
],
|
|
48
|
+
style: ctxMenuStore.style
|
|
49
|
+
},
|
|
50
|
+
(destroyOnClose ? visible : true) ? list.map((options, gIndex) => {
|
|
51
|
+
return options.every((item) => item.visible === false) ? renderEmptyElement($xeTable) : h(
|
|
52
|
+
"ul",
|
|
53
|
+
{
|
|
54
|
+
class: "vxe-table--context-menu-group-wrapper",
|
|
55
|
+
key: gIndex
|
|
56
|
+
},
|
|
57
|
+
options.map((item, index) => {
|
|
58
|
+
const { children, loading } = item;
|
|
59
|
+
const hasChildMenus = children && children.some((child) => child.visible !== false);
|
|
60
|
+
const prefixOpts = Object.assign({}, item.prefixConfig);
|
|
61
|
+
const prefixIcon = prefixOpts.icon || item.prefixIcon;
|
|
62
|
+
const suffixOpts = Object.assign({}, item.suffixConfig);
|
|
63
|
+
const suffixIcon = suffixOpts.icon || item.suffixIcon;
|
|
64
|
+
const menuContent = getFuncText(item.name);
|
|
65
|
+
return item.visible === false ? renderEmptyElement($xeTable) : h(
|
|
66
|
+
"li",
|
|
67
|
+
{
|
|
68
|
+
class: [
|
|
69
|
+
"vxe-table--context-menu--option",
|
|
70
|
+
item.className,
|
|
71
|
+
{
|
|
72
|
+
"link--loading": loading,
|
|
73
|
+
"link--disabled": item.disabled,
|
|
74
|
+
"link--active": item === ctxMenuStore.selected
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
key: `${gIndex}_${index}`
|
|
123
78
|
},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
79
|
+
[
|
|
80
|
+
h(
|
|
81
|
+
"a",
|
|
82
|
+
{
|
|
83
|
+
class: "vxe-context-menu--link",
|
|
84
|
+
onClick(evnt) {
|
|
85
|
+
$xeTable.ctxMenuLinkEvent(evnt, item);
|
|
86
|
+
},
|
|
87
|
+
onMouseover(evnt) {
|
|
88
|
+
$xeTable.ctxMenuMouseoverEvent(evnt, item);
|
|
89
|
+
},
|
|
90
|
+
onMouseout(evnt) {
|
|
91
|
+
$xeTable.ctxMenuMouseoutEvent(evnt, item);
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
[
|
|
95
|
+
h(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
class: ["vxe-context-menu--link-prefix", prefixOpts.className || ""]
|
|
99
|
+
},
|
|
100
|
+
[
|
|
101
|
+
loading ? h("span", {
|
|
102
|
+
class: getIcon("TABLE_MENU_OPTION_LOADING")
|
|
103
|
+
}) : prefixIcon && XEUtils.isFunction(prefixIcon) ? h("span", {}, getSlotVNs(prefixIcon({}))) : h("span", {}, [
|
|
104
|
+
h("i", {
|
|
105
|
+
class: prefixIcon
|
|
106
|
+
})
|
|
107
|
+
]),
|
|
108
|
+
prefixOpts.content ? h("span", {}, `${prefixOpts.content}`) : renderEmptyElement($xeTable)
|
|
109
|
+
]
|
|
110
|
+
),
|
|
111
|
+
h(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
class: "vxe-context-menu--link-content",
|
|
115
|
+
title: menuContent
|
|
116
|
+
},
|
|
117
|
+
loading ? getI18n("vxe.table.menuLoading") : menuContent
|
|
118
|
+
),
|
|
119
|
+
h(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
class: ["vxe-context-menu--link-suffix", suffixOpts.className || ""]
|
|
123
|
+
},
|
|
124
|
+
[
|
|
125
|
+
suffixIcon && XEUtils.isFunction(suffixIcon) ? h("span", {}, getSlotVNs(suffixIcon({}))) : h("i", {
|
|
126
|
+
class: suffixIcon || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : "")
|
|
127
|
+
}),
|
|
128
|
+
suffixOpts.content ? h("span", `${suffixOpts.content}`) : renderEmptyElement($xeTable)
|
|
129
|
+
]
|
|
130
|
+
)
|
|
131
|
+
]
|
|
132
|
+
),
|
|
133
|
+
hasChildMenus && children ? h(
|
|
134
|
+
"ul",
|
|
135
|
+
{
|
|
136
|
+
class: [
|
|
137
|
+
"vxe-table--context-menu-clild-wrapper",
|
|
138
|
+
{
|
|
139
|
+
"is--show": item === ctxMenuStore.selected && ctxMenuStore.showChild
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
children.map((child, cIndex) => {
|
|
144
|
+
const { loading: childLoading } = child;
|
|
145
|
+
const childPrefixOpts = Object.assign({}, child.prefixConfig);
|
|
146
|
+
const childPrefixIcon = childPrefixOpts.icon || child.prefixIcon;
|
|
147
|
+
const childSuffixOpts = Object.assign({}, child.suffixConfig);
|
|
148
|
+
const childSuffixIcon = childSuffixOpts.icon || child.suffixIcon;
|
|
149
|
+
const childMenuContent = getFuncText(child.name);
|
|
150
|
+
return child.visible === false ? null : h(
|
|
151
|
+
"li",
|
|
152
|
+
{
|
|
153
|
+
class: [
|
|
154
|
+
"vxe-table--context-menu--option",
|
|
155
|
+
child.className,
|
|
156
|
+
{
|
|
157
|
+
"link--loading": childLoading,
|
|
158
|
+
"link--disabled": child.disabled,
|
|
159
|
+
"link--active": child === ctxMenuStore.selectChild
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
key: `${gIndex}_${index}_${cIndex}`
|
|
163
|
+
},
|
|
164
|
+
[
|
|
165
|
+
h(
|
|
166
|
+
"a",
|
|
167
|
+
{
|
|
168
|
+
class: "vxe-context-menu--link",
|
|
169
|
+
onClick(evnt) {
|
|
170
|
+
$xeTable.ctxMenuLinkEvent(evnt, child);
|
|
171
|
+
},
|
|
172
|
+
onMouseover(evnt) {
|
|
173
|
+
$xeTable.ctxMenuMouseoverEvent(evnt, item, child);
|
|
174
|
+
},
|
|
175
|
+
onMouseout(evnt) {
|
|
176
|
+
$xeTable.ctxMenuMouseoutEvent(evnt, item);
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
[
|
|
180
|
+
h(
|
|
181
|
+
"div",
|
|
182
|
+
{
|
|
183
|
+
class: ["vxe-context-menu--link-prefix", childPrefixOpts.className || ""]
|
|
184
|
+
},
|
|
185
|
+
[
|
|
186
|
+
child.loading ? h("span", {
|
|
187
|
+
class: getIcon("TABLE_MENU_OPTION_LOADING")
|
|
188
|
+
}) : childPrefixIcon && XEUtils.isFunction(childPrefixIcon) ? h("span", {}, getSlotVNs(childPrefixIcon({}))) : h("span", {}, [
|
|
189
|
+
h("i", {
|
|
190
|
+
class: childPrefixIcon
|
|
191
|
+
})
|
|
192
|
+
]),
|
|
193
|
+
childPrefixOpts.content ? h("span", `${childPrefixOpts.content}`) : renderEmptyElement($xeTable)
|
|
194
|
+
]
|
|
195
|
+
),
|
|
196
|
+
h(
|
|
197
|
+
"div",
|
|
198
|
+
{
|
|
199
|
+
class: "vxe-context-menu--link-content",
|
|
200
|
+
title: childMenuContent
|
|
201
|
+
},
|
|
202
|
+
childLoading ? getI18n("vxe.table.menuLoading") : childMenuContent
|
|
203
|
+
),
|
|
204
|
+
h(
|
|
205
|
+
"div",
|
|
206
|
+
{
|
|
207
|
+
class: ["vxe-context-menu--link-suffix", childSuffixOpts.className || ""]
|
|
208
|
+
},
|
|
209
|
+
[
|
|
210
|
+
childSuffixIcon && XEUtils.isFunction(childSuffixIcon) ? h("span", {}, getSlotVNs(childSuffixIcon({}))) : h("i", {
|
|
211
|
+
class: childSuffixIcon
|
|
212
|
+
}),
|
|
213
|
+
childSuffixOpts.content ? h("span", `${childSuffixOpts.content}`) : renderEmptyElement($xeTable)
|
|
214
|
+
]
|
|
215
|
+
)
|
|
216
|
+
]
|
|
217
|
+
)
|
|
218
|
+
]
|
|
219
|
+
);
|
|
136
220
|
})
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}, [
|
|
147
|
-
childSuffixIcon && XEUtils.isFunction(childSuffixIcon) ? h("span", {}, getSlotVNs(childSuffixIcon({}))) : h("i", {
|
|
148
|
-
class: childSuffixIcon
|
|
149
|
-
}),
|
|
150
|
-
childSuffixOpts.content ? h("span", `${childSuffixOpts.content}`) : renderEmptyElement($xeTable)
|
|
151
|
-
])
|
|
152
|
-
])
|
|
153
|
-
]);
|
|
154
|
-
})) : null
|
|
155
|
-
]);
|
|
156
|
-
}));
|
|
157
|
-
}) : [])
|
|
158
|
-
]);
|
|
221
|
+
) : null
|
|
222
|
+
]
|
|
223
|
+
);
|
|
224
|
+
})
|
|
225
|
+
);
|
|
226
|
+
}) : []
|
|
227
|
+
)
|
|
228
|
+
]
|
|
229
|
+
);
|
|
159
230
|
};
|
|
160
231
|
$xeMenuPanel.renderVN = renderVN;
|
|
161
232
|
return $xeMenuPanel;
|
package/es/table/render/index.js
CHANGED
|
@@ -72,14 +72,22 @@ function isImmediateCell(renderOpts, params) {
|
|
|
72
72
|
function getCellLabelVNs(renderOpts, params, cellLabel, opts) {
|
|
73
73
|
const { placeholder } = renderOpts;
|
|
74
74
|
return [
|
|
75
|
-
h(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
h(
|
|
76
|
+
"span",
|
|
77
|
+
{
|
|
78
|
+
key: 1,
|
|
79
|
+
class: ["vxe-cell--label", opts ? opts.class : ""]
|
|
80
|
+
},
|
|
81
|
+
placeholder && isEmptyValue(cellLabel) ? [
|
|
82
|
+
h(
|
|
83
|
+
"span",
|
|
84
|
+
{
|
|
85
|
+
class: "vxe-cell--placeholder"
|
|
86
|
+
},
|
|
87
|
+
formatText(getFuncText(placeholder), 1)
|
|
88
|
+
)
|
|
89
|
+
] : formatText(cellLabel, 1)
|
|
90
|
+
)
|
|
83
91
|
];
|
|
84
92
|
}
|
|
85
93
|
function getNativeElementOns(renderOpts, params, eFns) {
|
|
@@ -223,30 +231,35 @@ function getFilterOns(renderOpts, params, option) {
|
|
|
223
231
|
function getFloatingFilterOns(renderOpts, params, option) {
|
|
224
232
|
const { $table, column } = params;
|
|
225
233
|
if (hasInputType(renderOpts)) {
|
|
226
|
-
return getComponentOns(
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
saveFilterEvent(params);
|
|
234
|
+
return getComponentOns(
|
|
235
|
+
renderOpts,
|
|
236
|
+
params,
|
|
237
|
+
{
|
|
238
|
+
model(value) {
|
|
239
|
+
option.data = value;
|
|
240
|
+
},
|
|
241
|
+
change() {
|
|
242
|
+
updateFilterChangeOption(params, !isEmptyValue(option.data), option);
|
|
243
|
+
},
|
|
244
|
+
clear() {
|
|
245
|
+
updateFilterChangeOption(params, !isEmptyValue(option.data), option);
|
|
246
|
+
saveFilterEvent(params);
|
|
247
|
+
},
|
|
248
|
+
blur() {
|
|
249
|
+
$table.saveFilterByEvent(new Event("change"), column);
|
|
250
|
+
}
|
|
244
251
|
},
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
252
|
+
renderOpts.name === "VxeNumberInput" ? {
|
|
253
|
+
[getOnName("plus-number")]() {
|
|
254
|
+
updateFilterChangeOption(params, !isEmptyValue(option.data), option);
|
|
255
|
+
saveFilterEvent(params);
|
|
256
|
+
},
|
|
257
|
+
[getOnName("minus-number")]() {
|
|
258
|
+
updateFilterChangeOption(params, !isEmptyValue(option.data), option);
|
|
259
|
+
saveFilterEvent(params);
|
|
260
|
+
}
|
|
261
|
+
} : {}
|
|
262
|
+
);
|
|
250
263
|
}
|
|
251
264
|
return getComponentOns(renderOpts, params, {
|
|
252
265
|
model(value) {
|
|
@@ -314,9 +327,13 @@ function nativeInputCellRender(renderOpts, renderParams) {
|
|
|
314
327
|
const { row, column } = renderParams;
|
|
315
328
|
const cellValue = XEUtils.get(row, column.field);
|
|
316
329
|
const cellVNs = [
|
|
317
|
-
h(
|
|
318
|
-
|
|
319
|
-
|
|
330
|
+
h(
|
|
331
|
+
"span",
|
|
332
|
+
{
|
|
333
|
+
key: 1
|
|
334
|
+
},
|
|
335
|
+
cellValue
|
|
336
|
+
)
|
|
320
337
|
];
|
|
321
338
|
return getNativeInputRenderCellVNs(cellValue, cellVNs, renderOpts, renderParams);
|
|
322
339
|
}
|
|
@@ -413,10 +430,14 @@ function renderNativeOptgroups(renderOpts, params, renderOptionsMethods) {
|
|
|
413
430
|
const groupLabel = optionGroupProps.label || "label";
|
|
414
431
|
if (optionGroups) {
|
|
415
432
|
return optionGroups.map((group, gIndex) => {
|
|
416
|
-
return h(
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
433
|
+
return h(
|
|
434
|
+
"optgroup",
|
|
435
|
+
{
|
|
436
|
+
key: gIndex,
|
|
437
|
+
label: group[groupLabel]
|
|
438
|
+
},
|
|
439
|
+
renderOptionsMethods(group[groupOptions], renderOpts, params)
|
|
440
|
+
);
|
|
420
441
|
});
|
|
421
442
|
}
|
|
422
443
|
return [];
|
|
@@ -430,13 +451,17 @@ function renderNativeOptions(options, renderOpts, params) {
|
|
|
430
451
|
const cellValue = isImmediateCell(renderOpts, params) ? getCellValue(row, column) : column.model.value;
|
|
431
452
|
if (options) {
|
|
432
453
|
return options.map((option, oIndex) => {
|
|
433
|
-
return h(
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
454
|
+
return h(
|
|
455
|
+
"option",
|
|
456
|
+
{
|
|
457
|
+
key: oIndex,
|
|
458
|
+
value: option[valueProp],
|
|
459
|
+
disabled: option[disabledProp],
|
|
460
|
+
/* eslint-disable eqeqeq */
|
|
461
|
+
selected: option[valueProp] == cellValue
|
|
462
|
+
},
|
|
463
|
+
option[labelProp]
|
|
464
|
+
);
|
|
440
465
|
});
|
|
441
466
|
}
|
|
442
467
|
return [];
|
|
@@ -477,9 +502,7 @@ function defaultFloatingFilterRender(renderOpts, params) {
|
|
|
477
502
|
];
|
|
478
503
|
}
|
|
479
504
|
function defaultFilterOptions() {
|
|
480
|
-
return [
|
|
481
|
-
{ data: null }
|
|
482
|
-
];
|
|
505
|
+
return [{ data: null }];
|
|
483
506
|
}
|
|
484
507
|
function oldFilterRender(renderOpts, params) {
|
|
485
508
|
const { column } = params;
|
|
@@ -598,16 +621,17 @@ function handleTreeSelectCellValue(cellValue, renderOpts) {
|
|
|
598
621
|
const childrenProp = optionProps.children || "children";
|
|
599
622
|
if (!(cellValue === null || cellValue === void 0)) {
|
|
600
623
|
const keyMaps = {};
|
|
601
|
-
XEUtils.eachTree(
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
624
|
+
XEUtils.eachTree(
|
|
625
|
+
options,
|
|
626
|
+
(item) => {
|
|
627
|
+
keyMaps[XEUtils.get(item, valueProp)] = item;
|
|
628
|
+
},
|
|
629
|
+
{ children: childrenProp }
|
|
630
|
+
);
|
|
631
|
+
return XEUtils.map(XEUtils.isArray(cellValue) ? cellValue : [cellValue], (value) => {
|
|
632
|
+
const item = keyMaps[value];
|
|
633
|
+
return item ? XEUtils.get(item, labelProp) : item;
|
|
634
|
+
}).join(", ");
|
|
611
635
|
}
|
|
612
636
|
return "";
|
|
613
637
|
}
|
|
@@ -669,9 +693,14 @@ function handleNumberCell(cellValue, renderOpts, params) {
|
|
|
669
693
|
}
|
|
670
694
|
}
|
|
671
695
|
}
|
|
672
|
-
return getCellLabelVNs(
|
|
673
|
-
|
|
674
|
-
|
|
696
|
+
return getCellLabelVNs(
|
|
697
|
+
renderOpts,
|
|
698
|
+
params,
|
|
699
|
+
cellValue,
|
|
700
|
+
isNegative ? {
|
|
701
|
+
class: "is--negative"
|
|
702
|
+
} : {}
|
|
703
|
+
);
|
|
675
704
|
}
|
|
676
705
|
function handleFormatDatePicker(renderOpts, renderParams) {
|
|
677
706
|
const { props = {} } = renderOpts;
|
|
@@ -728,10 +757,14 @@ function handleSetSelectValue(renderOpts, renderParams) {
|
|
|
728
757
|
}
|
|
729
758
|
}
|
|
730
759
|
if (isMultiVal) {
|
|
731
|
-
XEUtils.set(
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
760
|
+
XEUtils.set(
|
|
761
|
+
row,
|
|
762
|
+
field,
|
|
763
|
+
(isMultiVal ? cellValue.split(",") : [cellValue]).map((label) => {
|
|
764
|
+
const item = labelMpas[label];
|
|
765
|
+
return item ? item[valueProp] : label;
|
|
766
|
+
})
|
|
767
|
+
);
|
|
735
768
|
} else {
|
|
736
769
|
XEUtils.set(row, field, cellValue);
|
|
737
770
|
}
|
|
@@ -1054,19 +1087,24 @@ renderer.mixin({
|
|
|
1054
1087
|
return [
|
|
1055
1088
|
h(getDefaultComponent(renderOpts), {
|
|
1056
1089
|
...getCellEditProps(renderOpts, params, cellValue, seProps),
|
|
1057
|
-
...getComponentOns(
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1090
|
+
...getComponentOns(
|
|
1091
|
+
renderOpts,
|
|
1092
|
+
params,
|
|
1093
|
+
{
|
|
1094
|
+
model(cellValue2) {
|
|
1095
|
+
model.update = true;
|
|
1096
|
+
model.value = cellValue2;
|
|
1097
|
+
setCellValue(row, column, cellValue2);
|
|
1098
|
+
},
|
|
1099
|
+
change() {
|
|
1100
|
+
$table.updateStatus(params);
|
|
1101
|
+
},
|
|
1102
|
+
blur() {
|
|
1103
|
+
$table.handleCellRuleUpdateStatus("blur", params);
|
|
1104
|
+
}
|
|
1062
1105
|
},
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
},
|
|
1066
|
-
blur() {
|
|
1067
|
-
$table.handleCellRuleUpdateStatus("blur", params);
|
|
1068
|
-
}
|
|
1069
|
-
}, seOs)
|
|
1106
|
+
seOs
|
|
1107
|
+
)
|
|
1070
1108
|
})
|
|
1071
1109
|
];
|
|
1072
1110
|
},
|
|
@@ -1094,13 +1132,18 @@ renderer.mixin({
|
|
|
1094
1132
|
return [
|
|
1095
1133
|
h(getDefaultComponent(renderOpts), {
|
|
1096
1134
|
...getCellEditProps(renderOpts, params, cellValue, seProps),
|
|
1097
|
-
...getComponentOns(
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1135
|
+
...getComponentOns(
|
|
1136
|
+
renderOpts,
|
|
1137
|
+
params,
|
|
1138
|
+
{
|
|
1139
|
+
model(cellValue2) {
|
|
1140
|
+
model.update = true;
|
|
1141
|
+
model.value = cellValue2;
|
|
1142
|
+
setCellValue(row, column, cellValue2);
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
seOs
|
|
1146
|
+
)
|
|
1104
1147
|
})
|
|
1105
1148
|
];
|
|
1106
1149
|
},
|
|
@@ -1409,20 +1452,30 @@ renderer.mixin({
|
|
|
1409
1452
|
const customSize = props ? props.size : null;
|
|
1410
1453
|
const vSize = customSize || computeSize.value;
|
|
1411
1454
|
const cellValue = XEUtils.get(row, column.field);
|
|
1412
|
-
return h(
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1455
|
+
return h(
|
|
1456
|
+
"span",
|
|
1457
|
+
{
|
|
1458
|
+
class: [
|
|
1459
|
+
"vxe-color-picker--readonly",
|
|
1460
|
+
{
|
|
1461
|
+
[`size--${vSize}`]: vSize
|
|
1462
|
+
}
|
|
1463
|
+
]
|
|
1464
|
+
},
|
|
1465
|
+
[
|
|
1466
|
+
h("div", {
|
|
1467
|
+
class: [
|
|
1468
|
+
"vxe-color-picker--readonly-color",
|
|
1469
|
+
{
|
|
1470
|
+
"is--empty": !cellValue
|
|
1471
|
+
}
|
|
1472
|
+
],
|
|
1473
|
+
style: cellValue ? {
|
|
1474
|
+
backgroundColor: cellValue
|
|
1475
|
+
} : void 0
|
|
1476
|
+
})
|
|
1477
|
+
]
|
|
1478
|
+
);
|
|
1426
1479
|
}
|
|
1427
1480
|
},
|
|
1428
1481
|
VxeIconPicker: {
|