vxe-table 4.19.20 → 4.19.22
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 +71 -36
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +8 -0
- package/es/locale/lang/de-DE.js +8 -0
- package/es/locale/lang/en-US.js +9 -1
- package/es/locale/lang/es-ES.js +8 -0
- package/es/locale/lang/fr-FR.js +8 -0
- package/es/locale/lang/hu-HU.js +8 -0
- package/es/locale/lang/hy-AM.js +8 -0
- package/es/locale/lang/id-ID.js +8 -0
- package/es/locale/lang/it-IT.js +8 -0
- package/es/locale/lang/ja-JP.js +8 -0
- package/es/locale/lang/ko-KR.js +8 -0
- package/es/locale/lang/ms-MY.js +8 -0
- package/es/locale/lang/nb-NO.js +8 -0
- package/es/locale/lang/pt-BR.js +8 -0
- package/es/locale/lang/ru-RU.js +8 -0
- package/es/locale/lang/th-TH.js +8 -0
- package/es/locale/lang/ug-CN.js +8 -0
- package/es/locale/lang/uk-UA.js +8 -0
- package/es/locale/lang/uz-UZ.js +8 -0
- package/es/locale/lang/vi-VN.js +8 -0
- package/es/locale/lang/zh-CHT.js +8 -0
- package/es/locale/lang/zh-CN.js +8 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +32 -26
- package/es/table/module/custom/panel.js +7 -0
- package/es/table/module/edit/hook.js +0 -1
- package/es/table/module/menu/hook.js +11 -7
- package/es/table/src/emits.js +5 -0
- package/es/table/src/table.js +7 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +64 -39
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +8 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +8 -0
- package/lib/locale/lang/de-DE.js +8 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +8 -0
- package/lib/locale/lang/en-US.js +9 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +9 -1
- package/lib/locale/lang/es-ES.js +8 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +8 -0
- package/lib/locale/lang/fr-FR.js +8 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +8 -0
- package/lib/locale/lang/hu-HU.js +8 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +8 -0
- package/lib/locale/lang/hy-AM.js +8 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +8 -0
- package/lib/locale/lang/id-ID.js +8 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +8 -0
- package/lib/locale/lang/it-IT.js +8 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +8 -0
- package/lib/locale/lang/ja-JP.js +8 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +8 -0
- package/lib/locale/lang/ko-KR.js +8 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +8 -0
- package/lib/locale/lang/ms-MY.js +8 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +8 -0
- package/lib/locale/lang/nb-NO.js +8 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +8 -0
- package/lib/locale/lang/pt-BR.js +8 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +8 -0
- package/lib/locale/lang/ru-RU.js +8 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +8 -0
- package/lib/locale/lang/th-TH.js +8 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +8 -0
- package/lib/locale/lang/ug-CN.js +8 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +8 -0
- package/lib/locale/lang/uk-UA.js +8 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +8 -0
- package/lib/locale/lang/uz-UZ.js +8 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +8 -0
- package/lib/locale/lang/vi-VN.js +8 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +8 -0
- package/lib/locale/lang/zh-CHT.js +8 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +8 -0
- package/lib/locale/lang/zh-CN.js +8 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +8 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +32 -26
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +7 -0
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +0 -1
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/menu/hook.js +10 -5
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/src/emits.js +1 -1
- package/lib/table/src/emits.min.js +1 -1
- package/lib/table/src/table.js +4 -4
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- 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 +2 -2
- package/packages/locale/lang/ar-EG.ts +8 -0
- package/packages/locale/lang/de-DE.ts +8 -0
- package/packages/locale/lang/en-US.ts +9 -1
- package/packages/locale/lang/es-ES.ts +8 -0
- package/packages/locale/lang/fr-FR.ts +8 -0
- package/packages/locale/lang/hu-HU.ts +8 -0
- package/packages/locale/lang/hy-AM.ts +8 -0
- package/packages/locale/lang/id-ID.ts +8 -0
- package/packages/locale/lang/it-IT.ts +8 -0
- package/packages/locale/lang/ja-JP.ts +8 -0
- package/packages/locale/lang/ko-KR.ts +8 -0
- package/packages/locale/lang/ms-MY.ts +8 -0
- package/packages/locale/lang/nb-NO.ts +8 -0
- package/packages/locale/lang/pt-BR.ts +8 -0
- package/packages/locale/lang/ru-RU.ts +8 -0
- package/packages/locale/lang/th-TH.ts +8 -0
- package/packages/locale/lang/ug-CN.ts +8 -0
- package/packages/locale/lang/uk-UA.ts +8 -0
- package/packages/locale/lang/uz-UZ.ts +8 -0
- package/packages/locale/lang/vi-VN.ts +8 -0
- package/packages/locale/lang/zh-CHT.ts +8 -0
- package/packages/locale/lang/zh-CN.ts +8 -0
- package/packages/table/module/custom/hook.ts +31 -25
- package/packages/table/module/custom/panel.ts +7 -0
- package/packages/table/module/edit/hook.ts +0 -1
- package/packages/table/module/menu/hook.ts +12 -7
- package/packages/table/src/emits.ts +5 -0
- package/packages/table/src/table.ts +6 -1
- package/styles/theme/base.scss +2 -1
- /package/es/{iconfont.1782439515438.ttf → iconfont.1782890314097.ttf} +0 -0
- /package/es/{iconfont.1782439515438.woff → iconfont.1782890314097.woff} +0 -0
- /package/es/{iconfont.1782439515438.woff2 → iconfont.1782890314097.woff2} +0 -0
- /package/lib/{iconfont.1782439515438.ttf → iconfont.1782890314097.ttf} +0 -0
- /package/lib/{iconfont.1782439515438.woff → iconfont.1782890314097.woff} +0 -0
- /package/lib/{iconfont.1782439515438.woff2 → iconfont.1782890314097.woff2} +0 -0
|
@@ -151,39 +151,41 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
151
151
|
}
|
|
152
152
|
return openCustom();
|
|
153
153
|
};
|
|
154
|
-
const saveCustom = () => {
|
|
154
|
+
const saveCustom = (isDirectly) => {
|
|
155
155
|
const { customColumnList, aggHandleFields, rowGroupList } = reactData;
|
|
156
156
|
const customOpts = computeCustomOpts.value;
|
|
157
157
|
const { allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues } = customOpts;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
else {
|
|
164
|
-
if (allowSort) {
|
|
165
|
-
const sortIndex = index + 1;
|
|
166
|
-
column.renderSortNumber = sortIndex;
|
|
158
|
+
if (!isDirectly) {
|
|
159
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
160
|
+
if (parentColumn) {
|
|
161
|
+
// 更新子列信息
|
|
162
|
+
column.fixed = parentColumn.fixed;
|
|
167
163
|
}
|
|
168
|
-
|
|
169
|
-
|
|
164
|
+
else {
|
|
165
|
+
if (allowSort) {
|
|
166
|
+
const sortIndex = index + 1;
|
|
167
|
+
column.renderSortNumber = sortIndex;
|
|
168
|
+
}
|
|
169
|
+
if (allowFixed) {
|
|
170
|
+
column.fixed = column.renderFixed;
|
|
171
|
+
}
|
|
170
172
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
if (allowResizable) {
|
|
174
|
+
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
175
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
176
|
+
column.resizeWidth = column.renderResizeWidth;
|
|
177
|
+
column.renderWidth = column.renderResizeWidth;
|
|
178
|
+
}
|
|
177
179
|
}
|
|
178
180
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
}
|
|
181
|
+
if (allowVisible) {
|
|
182
|
+
column.visible = column.renderVisible;
|
|
183
|
+
}
|
|
184
|
+
if (allowGroup && allowValues) {
|
|
185
|
+
column.aggFunc = column.renderAggFn;
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
187
189
|
reactData.isCustomStatus = true;
|
|
188
190
|
if (allowGroup && !!$xeTable.handlePivotTableAggData) {
|
|
189
191
|
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
@@ -365,11 +367,13 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
365
367
|
if (customStore.visible) {
|
|
366
368
|
closeCustom();
|
|
367
369
|
emitCustomEvent('close', evnt);
|
|
370
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt);
|
|
368
371
|
}
|
|
369
372
|
else {
|
|
370
373
|
customStore.btnEl = evnt.target;
|
|
371
374
|
openCustom();
|
|
372
375
|
emitCustomEvent('open', evnt);
|
|
376
|
+
$xeTable.dispatchEvent('custom-open', {}, evnt);
|
|
373
377
|
}
|
|
374
378
|
},
|
|
375
379
|
customOpenEvent(evnt) {
|
|
@@ -380,6 +384,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
380
384
|
customStore.btnEl = evnt.target;
|
|
381
385
|
$xeTable.openCustom();
|
|
382
386
|
$xeTable.emitCustomEvent('open', evnt);
|
|
387
|
+
$xeTable.dispatchEvent('custom-open', {}, evnt);
|
|
383
388
|
}
|
|
384
389
|
},
|
|
385
390
|
customCloseEvent(evnt) {
|
|
@@ -389,6 +394,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
389
394
|
customStore.activeBtn = false;
|
|
390
395
|
$xeTable.closeCustom();
|
|
391
396
|
$xeTable.emitCustomEvent('close', evnt);
|
|
397
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt);
|
|
392
398
|
}
|
|
393
399
|
},
|
|
394
400
|
handleUpdateCustomColumn,
|
|
@@ -75,23 +75,30 @@ export default defineVxeComponent({
|
|
|
75
75
|
$xeTable.saveCustom();
|
|
76
76
|
$xeTable.closeCustom();
|
|
77
77
|
$xeTable.emitCustomEvent('confirm', $event);
|
|
78
|
+
$xeTable.dispatchEvent('custom-confirm', {}, $event);
|
|
78
79
|
$xeTable.emitCustomEvent('close', $event);
|
|
80
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
79
81
|
};
|
|
80
82
|
const cancelCloseEvent = ({ $event }) => {
|
|
81
83
|
$xeTable.closeCustom();
|
|
82
84
|
$xeTable.emitCustomEvent('close', $event);
|
|
85
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
83
86
|
};
|
|
84
87
|
const cancelCustomEvent = ({ $event }) => {
|
|
85
88
|
$xeTable.cancelCustom();
|
|
86
89
|
$xeTable.closeCustom();
|
|
87
90
|
$xeTable.emitCustomEvent('cancel', $event);
|
|
91
|
+
$xeTable.dispatchEvent('custom-cancel', {}, $event);
|
|
88
92
|
$xeTable.emitCustomEvent('close', $event);
|
|
93
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
89
94
|
};
|
|
90
95
|
const handleResetCustomEvent = (evnt) => {
|
|
91
96
|
$xeTable.resetCustom(true);
|
|
92
97
|
$xeTable.closeCustom();
|
|
93
98
|
$xeTable.emitCustomEvent('reset', evnt);
|
|
99
|
+
$xeTable.dispatchEvent('custom-reset', {}, evnt);
|
|
94
100
|
$xeTable.emitCustomEvent('close', evnt);
|
|
101
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt);
|
|
95
102
|
};
|
|
96
103
|
const resetCustomEvent = ({ $event }) => {
|
|
97
104
|
if (VxeUI.modal) {
|
|
@@ -544,7 +544,6 @@ hooks.add('tableEditModule', {
|
|
|
544
544
|
return handleInsertRowAt(records, targetRowOrRowid, true);
|
|
545
545
|
},
|
|
546
546
|
insertChild(records, parentRowOrParentId) {
|
|
547
|
-
window.aa = internalData;
|
|
548
547
|
return handleInsertChildRowAt(records, parentRowOrParentId, null);
|
|
549
548
|
},
|
|
550
549
|
insertChildAt(records, parentRowOrParentId, targetRow) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { nextTick } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { VxeUI } from '../../../ui';
|
|
4
|
-
import { getDomNode, getAbsolutePos, getEventTargetNode } from '../../../ui/src/dom';
|
|
4
|
+
import { getDomNode, getAbsolutePos, getEventTargetNode, toCssUnit } from '../../../ui/src/dom';
|
|
5
5
|
import { isEnableConf, hasChildrenList } from '../../../ui/src/utils';
|
|
6
6
|
const { menus, hooks, globalEvents, GLOBAL_EVENT_KEYS } = VxeUI;
|
|
7
7
|
const tableMenuMethodKeys = ['closeMenu'];
|
|
@@ -23,7 +23,7 @@ hooks.add('tableMenuModule', {
|
|
|
23
23
|
const isContentMenu = computeIsContentMenu.value;
|
|
24
24
|
const menuOpts = computeMenuOpts.value;
|
|
25
25
|
const config = menuOpts[type];
|
|
26
|
-
const { zIndex, transfer, visibleMethod } = menuOpts;
|
|
26
|
+
const { zIndex, transfer, width, visibleMethod } = menuOpts;
|
|
27
27
|
if (config) {
|
|
28
28
|
const { options, disabled } = config;
|
|
29
29
|
if (disabled) {
|
|
@@ -49,17 +49,21 @@ hooks.add('tableMenuModule', {
|
|
|
49
49
|
}
|
|
50
50
|
const handleVisible = () => {
|
|
51
51
|
internalData._currMenuParams = params;
|
|
52
|
+
const ctxStyle = {
|
|
53
|
+
zIndex: zIndex || internalData.tZindex,
|
|
54
|
+
top: `${top}px`,
|
|
55
|
+
left: `${left}px`
|
|
56
|
+
};
|
|
57
|
+
if (width) {
|
|
58
|
+
ctxStyle['--vxe-ui-table-menu-item-width'] = toCssUnit(width);
|
|
59
|
+
}
|
|
52
60
|
Object.assign(ctxMenuStore, {
|
|
53
61
|
visible: true,
|
|
54
62
|
list: options,
|
|
55
63
|
selected: null,
|
|
56
64
|
selectChild: null,
|
|
57
65
|
showChild: false,
|
|
58
|
-
style:
|
|
59
|
-
zIndex: zIndex || internalData.tZindex,
|
|
60
|
-
top: `${top}px`,
|
|
61
|
-
left: `${left}px`
|
|
62
|
-
}
|
|
66
|
+
style: ctxStyle
|
|
63
67
|
});
|
|
64
68
|
nextTick(() => {
|
|
65
69
|
const tableMenu = refTableMenu.value;
|
package/es/table/src/emits.js
CHANGED
package/es/table/src/table.js
CHANGED
|
@@ -9166,12 +9166,16 @@ export default defineVxeComponent({
|
|
|
9166
9166
|
// 如果为 null 使用默认逻辑
|
|
9167
9167
|
if (XEUtils.eqNull(customContent)) {
|
|
9168
9168
|
isShow = isOver;
|
|
9169
|
+
content = cellText;
|
|
9169
9170
|
}
|
|
9170
9171
|
else if (customContent !== '' && customContent !== false) {
|
|
9171
9172
|
// 如果为 '' | false 则不显示
|
|
9172
9173
|
isShow = true;
|
|
9174
|
+
content = customContent;
|
|
9175
|
+
}
|
|
9176
|
+
else {
|
|
9177
|
+
content = cellText;
|
|
9173
9178
|
}
|
|
9174
|
-
content = cellText;
|
|
9175
9179
|
}
|
|
9176
9180
|
if (isShow && content) {
|
|
9177
9181
|
const tipContent = formatText(content);
|
|
@@ -11338,6 +11342,7 @@ export default defineVxeComponent({
|
|
|
11338
11342
|
if (evnt.dataTransfer) {
|
|
11339
11343
|
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
|
|
11340
11344
|
}
|
|
11345
|
+
$xeTable.closeTooltip();
|
|
11341
11346
|
},
|
|
11342
11347
|
handleRowDragSwapEvent(evnt, isSyncRow, dragRow, prevDragRow, prevDragPos, prevDragToChild) {
|
|
11343
11348
|
const { treeConfig, dragConfig } = props;
|
|
@@ -12002,6 +12007,7 @@ export default defineVxeComponent({
|
|
|
12002
12007
|
if (evnt.dataTransfer) {
|
|
12003
12008
|
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
|
|
12004
12009
|
}
|
|
12010
|
+
$xeTable.closeTooltip();
|
|
12005
12011
|
},
|
|
12006
12012
|
handleColDragSwapColumn() {
|
|
12007
12013
|
handleUpdateColumn();
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
const { log } = VxeUI;
|
|
3
|
-
const tableVersion = `table v${"4.19.
|
|
3
|
+
const tableVersion = `table v${"4.19.22"}`;
|
|
4
4
|
export function createComponentLog(name) {
|
|
5
5
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
6
6
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|