vxe-table 4.19.22 → 4.19.24
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 +634 -335
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/{iconfont.1782890314097.ttf → iconfont.1783331249334.ttf} +0 -0
- package/es/iconfont.1783331249334.woff +0 -0
- package/es/iconfont.1783331249334.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +12 -3
- package/es/locale/lang/de-DE.js +12 -3
- package/es/locale/lang/en-US.js +16 -7
- package/es/locale/lang/es-ES.js +12 -3
- package/es/locale/lang/fr-FR.js +12 -3
- package/es/locale/lang/hu-HU.js +12 -3
- package/es/locale/lang/hy-AM.js +12 -3
- package/es/locale/lang/id-ID.js +12 -3
- package/es/locale/lang/it-IT.js +11 -2
- package/es/locale/lang/ja-JP.js +12 -3
- package/es/locale/lang/ko-KR.js +12 -3
- package/es/locale/lang/ms-MY.js +12 -3
- package/es/locale/lang/nb-NO.js +12 -3
- package/es/locale/lang/pt-BR.js +12 -3
- package/es/locale/lang/ru-RU.js +12 -3
- package/es/locale/lang/th-TH.js +12 -3
- package/es/locale/lang/ug-CN.js +12 -3
- package/es/locale/lang/uk-UA.js +12 -3
- package/es/locale/lang/uz-UZ.js +12 -3
- package/es/locale/lang/vi-VN.js +11 -2
- package/es/locale/lang/zh-CHT.js +14 -5
- package/es/locale/lang/zh-CN.js +14 -5
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +83 -12
- package/es/table/module/custom/panel.js +398 -257
- package/es/table/src/cell.js +2 -2
- package/es/table/src/columnInfo.js +14 -8
- package/es/table/src/emits.js +3 -0
- package/es/table/src/table.js +78 -46
- package/es/table/src/util.js +32 -1
- package/es/table/style.css +96 -49
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +16 -4
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +96 -49
- package/es/vxe-table/style.min.css +1 -1
- package/lib/{iconfont.1782890314097.ttf → iconfont.1783331249334.ttf} +0 -0
- package/lib/iconfont.1783331249334.woff +0 -0
- package/lib/iconfont.1783331249334.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +521 -181
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +12 -3
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +12 -3
- package/lib/locale/lang/de-DE.js +12 -3
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +12 -3
- package/lib/locale/lang/en-US.js +16 -7
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +16 -7
- package/lib/locale/lang/es-ES.js +12 -3
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +12 -3
- package/lib/locale/lang/fr-FR.js +12 -3
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +12 -3
- package/lib/locale/lang/hu-HU.js +12 -3
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +12 -3
- package/lib/locale/lang/hy-AM.js +12 -3
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +12 -3
- package/lib/locale/lang/id-ID.js +12 -3
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +12 -3
- package/lib/locale/lang/it-IT.js +11 -2
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +11 -2
- package/lib/locale/lang/ja-JP.js +12 -3
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +12 -3
- package/lib/locale/lang/ko-KR.js +12 -3
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +12 -3
- package/lib/locale/lang/ms-MY.js +12 -3
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +12 -3
- package/lib/locale/lang/nb-NO.js +12 -3
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +12 -3
- package/lib/locale/lang/pt-BR.js +12 -3
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +12 -3
- package/lib/locale/lang/ru-RU.js +12 -3
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +12 -3
- package/lib/locale/lang/th-TH.js +12 -3
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +12 -3
- package/lib/locale/lang/ug-CN.js +12 -3
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +12 -3
- package/lib/locale/lang/uk-UA.js +12 -3
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +12 -3
- package/lib/locale/lang/uz-UZ.js +12 -3
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +12 -3
- package/lib/locale/lang/vi-VN.js +11 -2
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +11 -2
- package/lib/locale/lang/zh-CHT.js +14 -5
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +14 -5
- package/lib/locale/lang/zh-CN.js +14 -5
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +14 -5
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +90 -10
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +333 -141
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/cell.js +2 -1
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +17 -7
- package/lib/table/src/columnInfo.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 +10 -10
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +38 -1
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +96 -49
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +16 -4
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +96 -49
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +12 -3
- package/packages/locale/lang/de-DE.ts +12 -3
- package/packages/locale/lang/en-US.ts +16 -7
- package/packages/locale/lang/es-ES.ts +12 -3
- package/packages/locale/lang/fr-FR.ts +12 -3
- package/packages/locale/lang/hu-HU.ts +12 -3
- package/packages/locale/lang/hy-AM.ts +12 -3
- package/packages/locale/lang/id-ID.ts +12 -3
- package/packages/locale/lang/it-IT.ts +11 -2
- package/packages/locale/lang/ja-JP.ts +12 -3
- package/packages/locale/lang/ko-KR.ts +12 -3
- package/packages/locale/lang/ms-MY.ts +12 -3
- package/packages/locale/lang/nb-NO.ts +12 -3
- package/packages/locale/lang/pt-BR.ts +12 -3
- package/packages/locale/lang/ru-RU.ts +12 -3
- package/packages/locale/lang/th-TH.ts +12 -3
- package/packages/locale/lang/ug-CN.ts +12 -3
- package/packages/locale/lang/uk-UA.ts +12 -3
- package/packages/locale/lang/uz-UZ.ts +12 -3
- package/packages/locale/lang/vi-VN.ts +11 -2
- package/packages/locale/lang/zh-CHT.ts +14 -5
- package/packages/locale/lang/zh-CN.ts +14 -5
- package/packages/table/module/custom/hook.ts +83 -12
- package/packages/table/module/custom/panel.ts +481 -286
- package/packages/table/src/cell.ts +2 -2
- package/packages/table/src/columnInfo.ts +14 -8
- package/packages/table/src/emits.ts +3 -0
- package/packages/table/src/table.ts +89 -47
- package/packages/table/src/util.ts +35 -1
- package/packages/ui/index.ts +15 -3
- package/styles/components/icon.scss +29 -2
- package/styles/components/table-module/custom.scss +88 -67
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/styles/theme/base.scss +11 -0
- package/es/iconfont.1782890314097.woff +0 -0
- package/es/iconfont.1782890314097.woff2 +0 -0
- package/lib/iconfont.1782890314097.woff +0 -0
- package/lib/iconfont.1782890314097.woff2 +0 -0
|
@@ -7,6 +7,7 @@ var _util = require("../../src/util");
|
|
|
7
7
|
var _dom = require("../../../ui/src/dom");
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
const tableCustomMethodKeys = ['openCustom', 'closeCustom', 'getCustomVisible', 'toggleCustom', 'saveCustom', 'cancelCustom', 'resetCustom', 'toggleCustomAllCheckbox', 'setCustomAllCheckbox'];
|
|
10
|
+
const customColumnCssKeys = ['checkbox', 'sort', 'title', 'width', 'fixed', 'align', 'header-align', 'footer-align'];
|
|
10
11
|
_ui.VxeUI.hooks.add('tableCustomModule', {
|
|
11
12
|
setupTable($xeTable) {
|
|
12
13
|
const {
|
|
@@ -37,6 +38,8 @@ _ui.VxeUI.hooks.add('tableCustomModule', {
|
|
|
37
38
|
const showSimple = !(mode === 'modal' || mode === 'drawer');
|
|
38
39
|
const {
|
|
39
40
|
transfer,
|
|
41
|
+
minWidth,
|
|
42
|
+
maxWidth,
|
|
40
43
|
maxHeight
|
|
41
44
|
} = popupOptions || {};
|
|
42
45
|
const customSimpleMode = computeCustomSimpleMode.value;
|
|
@@ -45,7 +48,8 @@ _ui.VxeUI.hooks.add('tableCustomModule', {
|
|
|
45
48
|
let wrapperEl = refElem.value;
|
|
46
49
|
let popupTop = 0;
|
|
47
50
|
let popupMaxHeight = 0;
|
|
48
|
-
const
|
|
51
|
+
const defPupStys = {};
|
|
52
|
+
const panePupStys = {};
|
|
49
53
|
if ($xeGantt) {
|
|
50
54
|
const {
|
|
51
55
|
refGanttContainerElem
|
|
@@ -78,23 +82,40 @@ _ui.VxeUI.hooks.add('tableCustomModule', {
|
|
|
78
82
|
}
|
|
79
83
|
if (!placement || !['left', 'right', 'bottom-left', 'bottom-right'].includes(placement)) {
|
|
80
84
|
if (popupTop) {
|
|
81
|
-
|
|
85
|
+
defPupStys.top = (0, _dom.toCssUnit)(popupTop);
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
88
|
if (showSimple && transfer) {
|
|
85
89
|
if (placement === 'bottom-left' || placement === 'bottom-right') {
|
|
86
|
-
|
|
90
|
+
defPupStys.bottom = (0, _dom.toCssUnit)(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1);
|
|
87
91
|
}
|
|
88
92
|
if (placement === 'top-left' || placement === 'bottom-left') {
|
|
89
|
-
|
|
93
|
+
defPupStys.left = (0, _dom.toCssUnit)(tableRect.left);
|
|
90
94
|
} else if (!placement || placement === 'top-right' || placement === 'bottom-right') {
|
|
91
|
-
|
|
95
|
+
defPupStys.right = (0, _dom.toCssUnit)(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1);
|
|
92
96
|
}
|
|
93
97
|
}
|
|
98
|
+
// 同步表格的css变量到弹窗中
|
|
99
|
+
const bodyComputeStyle = getComputedStyle(bodyEl);
|
|
100
|
+
const tableComputeStyle = getComputedStyle(wrapperEl);
|
|
101
|
+
customColumnCssKeys.forEach(key => {
|
|
102
|
+
const currCssKey = `--vxe-ui-vxe-table-custom-column-${key}-${key === 'title' ? 'min-' : ''}width`;
|
|
103
|
+
const currCssVal = tableComputeStyle.getPropertyValue(currCssKey);
|
|
104
|
+
if (currCssVal && currCssVal !== bodyComputeStyle.getPropertyValue(currCssKey)) {
|
|
105
|
+
panePupStys[currCssKey] = currCssVal;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
if (minWidth) {
|
|
109
|
+
defPupStys['--vxe-ui-vxe-table-custom-default-min-width'] = (0, _dom.toCssUnit)(minWidth);
|
|
110
|
+
}
|
|
111
|
+
if (maxWidth) {
|
|
112
|
+
defPupStys['--vxe-ui-vxe-table-custom-default-max-width'] = (0, _dom.toCssUnit)(maxWidth);
|
|
113
|
+
}
|
|
94
114
|
if (popupMxHeight) {
|
|
95
|
-
|
|
115
|
+
defPupStys.maxHeight = (0, _dom.toCssUnit)(popupMxHeight);
|
|
96
116
|
}
|
|
97
|
-
customStore.
|
|
117
|
+
customStore.defPopupStyle = defPupStys;
|
|
118
|
+
customStore.panePopupStyle = panePupStys;
|
|
98
119
|
customStore.maxHeight = popupMxHeight;
|
|
99
120
|
return (0, _vue.nextTick)();
|
|
100
121
|
};
|
|
@@ -156,6 +177,9 @@ _ui.VxeUI.hooks.add('tableCustomModule', {
|
|
|
156
177
|
column.renderFixed = column.fixed;
|
|
157
178
|
column.renderVisible = column.visible;
|
|
158
179
|
column.renderResizeWidth = column.renderWidth;
|
|
180
|
+
column.renderAlign = column.align;
|
|
181
|
+
column.renderHeaderAlign = column.headerAlign;
|
|
182
|
+
column.renderFooterAlign = column.footerAlign;
|
|
159
183
|
sortMaps[colid] = column.renderSortNumber;
|
|
160
184
|
fixedMaps[colid] = column.fixed;
|
|
161
185
|
visibleMaps[colid] = column.visible;
|
|
@@ -200,10 +224,21 @@ _ui.VxeUI.hooks.add('tableCustomModule', {
|
|
|
200
224
|
allowSort,
|
|
201
225
|
allowFixed,
|
|
202
226
|
allowResizable,
|
|
227
|
+
allowAlign,
|
|
228
|
+
allowHeaderAlign,
|
|
229
|
+
allowFooterAlign,
|
|
203
230
|
allowGroup,
|
|
204
231
|
allowValues
|
|
205
232
|
} = customOpts;
|
|
206
|
-
if (
|
|
233
|
+
if (isDirectly) {
|
|
234
|
+
_xeUtils.default.eachTree(customColumnList, column => {
|
|
235
|
+
if (allowResizable) {
|
|
236
|
+
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
237
|
+
column.resizeWidth = Math.max(0, _xeUtils.default.toNumber(column.renderWidth));
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
} else {
|
|
207
242
|
_xeUtils.default.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
208
243
|
if (parentColumn) {
|
|
209
244
|
// 更新子列信息
|
|
@@ -228,6 +263,15 @@ _ui.VxeUI.hooks.add('tableCustomModule', {
|
|
|
228
263
|
if (allowVisible) {
|
|
229
264
|
column.visible = column.renderVisible;
|
|
230
265
|
}
|
|
266
|
+
if (allowAlign) {
|
|
267
|
+
column.align = column.renderAlign;
|
|
268
|
+
}
|
|
269
|
+
if (allowHeaderAlign) {
|
|
270
|
+
column.headerAlign = column.renderHeaderAlign;
|
|
271
|
+
}
|
|
272
|
+
if (allowFooterAlign) {
|
|
273
|
+
column.footerAlign = column.renderFooterAlign;
|
|
274
|
+
}
|
|
231
275
|
if (allowGroup && allowValues) {
|
|
232
276
|
column.aggFunc = column.renderAggFn;
|
|
233
277
|
}
|
|
@@ -267,7 +311,12 @@ _ui.VxeUI.hooks.add('tableCustomModule', {
|
|
|
267
311
|
allowVisible,
|
|
268
312
|
allowSort,
|
|
269
313
|
allowFixed,
|
|
270
|
-
|
|
314
|
+
allowAlign,
|
|
315
|
+
allowHeaderAlign,
|
|
316
|
+
allowFooterAlign,
|
|
317
|
+
allowResizable,
|
|
318
|
+
allowGroup,
|
|
319
|
+
allowValues
|
|
271
320
|
} = customOpts;
|
|
272
321
|
_xeUtils.default.eachTree(customColumnList, column => {
|
|
273
322
|
const colid = column.getKey();
|
|
@@ -287,6 +336,21 @@ _ui.VxeUI.hooks.add('tableCustomModule', {
|
|
|
287
336
|
if (allowResizable) {
|
|
288
337
|
column.renderResizeWidth = column.renderWidth;
|
|
289
338
|
}
|
|
339
|
+
if (allowAlign) {
|
|
340
|
+
column.align = column.renderAlign;
|
|
341
|
+
}
|
|
342
|
+
if (allowHeaderAlign) {
|
|
343
|
+
column.headerAlign = column.renderHeaderAlign;
|
|
344
|
+
}
|
|
345
|
+
if (allowFooterAlign) {
|
|
346
|
+
column.footerAlign = column.renderFooterAlign;
|
|
347
|
+
}
|
|
348
|
+
if (allowGroup) {
|
|
349
|
+
// 无
|
|
350
|
+
}
|
|
351
|
+
if (allowValues) {
|
|
352
|
+
// 无
|
|
353
|
+
}
|
|
290
354
|
}, {
|
|
291
355
|
children: 'children'
|
|
292
356
|
});
|
|
@@ -377,7 +441,10 @@ _ui.VxeUI.hooks.add('tableCustomModule', {
|
|
|
377
441
|
resizable: options === true,
|
|
378
442
|
fixed: options === true,
|
|
379
443
|
sort: options === true,
|
|
380
|
-
aggFunc: options === true
|
|
444
|
+
aggFunc: options === true,
|
|
445
|
+
align: options === true,
|
|
446
|
+
headerAlign: options === true,
|
|
447
|
+
footerAlign: options === true
|
|
381
448
|
}, options);
|
|
382
449
|
const allCols = [];
|
|
383
450
|
_xeUtils.default.eachTree(collectColumn, column => {
|
|
@@ -386,6 +453,7 @@ _ui.VxeUI.hooks.add('tableCustomModule', {
|
|
|
386
453
|
}
|
|
387
454
|
if (opts.fixed) {
|
|
388
455
|
column.fixed = column.defaultFixed;
|
|
456
|
+
column.renderFixed = column.defaultFixed;
|
|
389
457
|
}
|
|
390
458
|
if (opts.sort) {
|
|
391
459
|
column.renderSortNumber = column.sortNumber;
|
|
@@ -397,6 +465,18 @@ _ui.VxeUI.hooks.add('tableCustomModule', {
|
|
|
397
465
|
})) {
|
|
398
466
|
column.visible = column.defaultVisible;
|
|
399
467
|
}
|
|
468
|
+
if (opts.align) {
|
|
469
|
+
column.align = column.defaultAlign;
|
|
470
|
+
column.renderAlign = column.defaultAlign;
|
|
471
|
+
}
|
|
472
|
+
if (opts.headerAlign) {
|
|
473
|
+
column.headerAlign = column.defaultHeaderAlign;
|
|
474
|
+
column.renderHeaderAlign = column.defaultHeaderAlign;
|
|
475
|
+
}
|
|
476
|
+
if (opts.footerAlign) {
|
|
477
|
+
column.footerAlign = column.defaultFooterAlign;
|
|
478
|
+
column.renderFooterAlign = column.defaultFooterAlign;
|
|
479
|
+
}
|
|
400
480
|
if (opts.aggFunc) {
|
|
401
481
|
column.aggFunc = column.defaultAggFunc;
|
|
402
482
|
column.renderAggFn = column.defaultAggFunc;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _vue=require("vue"),_ui=require("../../../ui"),_xeUtils=_interopRequireDefault(require("xe-utils")),_util=require("../../src/util"),_dom=require("../../../ui/src/dom");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let tableCustomMethodKeys=["openCustom","closeCustom","getCustomVisible","toggleCustom","saveCustom","cancelCustom","resetCustom","toggleCustomAllCheckbox","setCustomAllCheckbox"];_ui.VxeUI.hooks.add("tableCustomModule",{setupTable(
|
|
1
|
+
var _vue=require("vue"),_ui=require("../../../ui"),_xeUtils=_interopRequireDefault(require("xe-utils")),_util=require("../../src/util"),_dom=require("../../../ui/src/dom");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let tableCustomMethodKeys=["openCustom","closeCustom","getCustomVisible","toggleCustom","saveCustom","cancelCustom","resetCustom","toggleCustomAllCheckbox","setCustomAllCheckbox"],customColumnCssKeys=["checkbox","sort","title","width","fixed","align","header-align","footer-align"];_ui.VxeUI.hooks.add("tableCustomModule",{setupTable(h){let{reactData:C,internalData:v}=h,{computeCustomOpts:f,computeRowGroupFields:s,computeCustomSimpleMode:x}=h.getComputeMaps(),A=h.getRefMaps().refElem;var e=h.xeGrid;let S=h.xeGantt,_=e||S,a=()=>{var e=C.customStore,{mode:t,placement:l,popupOptions:o}=f.value,t=!("modal"===t||"drawer"===t),{transfer:o,minWidth:r,maxWidth:i,maxHeight:s}=o||{},a="outside"===x.value,u=document.documentElement;let n=A.value,d=0,m=0;var c={};let g={};var h=(n=S&&(h=S.getRefMaps().refGanttContainerElem,h=h.value)?h:n).getBoundingClientRect();m=t&&o?(d=h.top+u.scrollTop,_xeUtils.default.eqNull(s)?360:s):a?(_&&n&&(d=n.offsetTop),_xeUtils.default.eqNull(s)?360:s):(n&&(m=n.clientHeight-22),Math.max(88,m));let v=0,b=("left"!==l&&"right"!==l&&(v=_xeUtils.default.eqNull(s)?m:s),l&&["left","right","bottom-left","bottom-right"].includes(l)||d&&(c.top=(0,_dom.toCssUnit)(d)),t&&o&&("bottom-left"!==l&&"bottom-right"!==l||(c.bottom=(0,_dom.toCssUnit)(u.scrollHeight-h.top-h.height+1)),"top-left"===l||"bottom-left"===l?c.left=(0,_dom.toCssUnit)(h.left):l&&"top-right"!==l&&"bottom-right"!==l||(c.right=(0,_dom.toCssUnit)(u.scrollWidth-h.left-h.width+1))),getComputedStyle(u)),p=getComputedStyle(n);return customColumnCssKeys.forEach(e=>{var e=`--vxe-ui-vxe-table-custom-column-${e}-${"title"===e?"min-":""}width`,t=p.getPropertyValue(e);t&&t!==b.getPropertyValue(e)&&(g[e]=t)}),r&&(c["--vxe-ui-vxe-table-custom-default-min-width"]=(0,_dom.toCssUnit)(r)),i&&(c["--vxe-ui-vxe-table-custom-default-max-width"]=(0,_dom.toCssUnit)(i)),v&&(c.maxHeight=(0,_dom.toCssUnit)(v)),e.defPopupStyle=c,e.panePopupStyle=g,e.maxHeight=v,(0,_vue.nextTick)()},l=()=>{var{initStore:e,customStore:t}=C,{mode:l,popupOptions:o}=f.value,l=!("modal"===l||"drawer"===l),o=(o||{}).transfer,r=x.value;let i=null;return l&&o?i=document.body:"outside"===r&&_&&(l=_.getRefMaps().refPopupContainerElem,o=l.value)&&(i=o),v.customPopupToElem!==i&&C.ctPopupFlag++,v.customPopupToElem=i,t.visible=!0,e.custom=!0,u(),n(),a(),(0,_vue.nextTick)().then(()=>a())},u=()=>{var e=C.customStore,t=v.collectColumn;if(e.visible){let l={},o={},r={};_xeUtils.default.eachTree(t,e=>{var t=e.getKey();e.renderFixed=e.fixed,e.renderVisible=e.visible,e.renderResizeWidth=e.renderWidth,e.renderAlign=e.align,e.renderHeaderAlign=e.headerAlign,e.renderFooterAlign=e.footerAlign,l[t]=e.renderSortNumber,o[t]=e.fixed,r[t]=e.visible}),e.oldSortMaps=l,e.oldFixedMaps=o,e.oldVisibleMaps=r,C.customColumnList=t.slice(0)}},o=()=>{var e=C.customStore,t=f.value;return e.visible&&(e.visible=!1,t.immediate||h.handleCustom()),(0,_vue.nextTick)()};let t=e=>{var t=C.customStore,l=C.customColumnList,o=f.value;let{checkMethod:r,visibleMethod:i}=o,s=!!e;return o.immediate?(_xeUtils.default.eachTree(l,e=>{i&&!i({$table:h,column:e})||r&&!r({$table:h,column:e})||(e.visible=s,e.renderVisible=s,e.halfVisible=!1)}),t.isAll=s,C.isCustomStatus=!0,h.handleCustom(),h.saveCustomStore("update:visible")):(_xeUtils.default.eachTree(l,e=>{i&&!i({$table:h,column:e})||r&&!r({$table:h,column:e})||(e.renderVisible=s,e.halfVisible=!1)}),t.isAll=s),h.checkCustomStatus(),(0,_vue.nextTick)()};e={getCustomVisible(){var e=C.customStore;return e.visible},openCustom:l,closeCustom:o,toggleCustom:()=>{var e=C.customStore;return(e.visible?o:l)()},saveCustom:e=>{let{customColumnList:t,aggHandleFields:l,rowGroupList:o}=C;let{allowVisible:i,allowSort:s,allowFixed:a,allowResizable:u,allowAlign:n,allowHeaderAlign:d,allowFooterAlign:m,allowGroup:c,allowValues:g}=f.value;return e?_xeUtils.default.eachTree(t,e=>{!u||!e.renderVisible||e.children&&e.children.length||(e.resizeWidth=Math.max(0,_xeUtils.default.toNumber(e.renderWidth)))}):_xeUtils.default.eachTree(t,(e,t,l,o,r)=>{r?e.fixed=r.fixed:(s&&(e.renderSortNumber=t+1),a&&(e.fixed=e.renderFixed)),!u||!e.renderVisible||e.children&&e.children.length||e.renderResizeWidth!==e.renderWidth&&(e.resizeWidth=e.renderResizeWidth,e.renderWidth=e.renderResizeWidth),i&&(e.visible=e.renderVisible),n&&(e.align=e.renderAlign),d&&(e.headerAlign=e.renderHeaderAlign),m&&(e.footerAlign=e.renderFooterAlign),c&&g&&(e.aggFunc=e.renderAggFn)}),C.isCustomStatus=!0,c&&h.handlePivotTableAggData&&(o.length!==l.length||o.some((e,t)=>e.field!==l[t])?l.length?h.setRowGroups(l):h.clearRowGroups():g&&h.handleUpdateAggData()),s&&(v.collectColumn=t),h.saveCustomStore("confirm")},cancelCustom:()=>{var{customColumnList:e,customStore:t}=C;let{oldSortMaps:r,oldFixedMaps:i,oldVisibleMaps:s}=t,{allowVisible:a,allowSort:u,allowFixed:n,allowAlign:d,allowHeaderAlign:m,allowFooterAlign:c,allowResizable:g,allowGroup:h,allowValues:v}=f.value;return _xeUtils.default.eachTree(e,e=>{var t=e.getKey(),l=!!s[t],o=i[t]||"";a&&(e.renderVisible=l,e.visible=l),n&&(e.renderFixed=o,e.fixed=o),u&&(e.renderSortNumber=r[t]||0),g&&(e.renderResizeWidth=e.renderWidth),d&&(e.align=e.renderAlign),m&&(e.headerAlign=e.renderHeaderAlign),c&&(e.footerAlign=e.renderFooterAlign),h,v},{children:"children"}),(0,_vue.nextTick)()},resetCustom(e){let t=C.rowGroupList;var l=v.collectColumn;let o=f.value.checkMethod,r=Object.assign({visible:!0,resizable:!0===e,fixed:!0===e,sort:!0===e,aggFunc:!0===e,align:!0===e,headerAlign:!0===e,footerAlign:!0===e},e),i=[];return _xeUtils.default.eachTree(l,e=>{r.resizable&&(e.resizeWidth=0),r.fixed&&(e.fixed=e.defaultFixed,e.renderFixed=e.defaultFixed),r.sort&&(e.renderSortNumber=e.sortNumber,e.parentId=e.defaultParentId),o&&!o({$table:h,column:e})||(e.visible=e.defaultVisible),r.align&&(e.align=e.defaultAlign,e.renderAlign=e.defaultAlign),r.headerAlign&&(e.headerAlign=e.defaultHeaderAlign,e.renderHeaderAlign=e.defaultHeaderAlign),r.footerAlign&&(e.footerAlign=e.defaultFooterAlign,e.renderFooterAlign=e.defaultFooterAlign),r.aggFunc&&(e.aggFunc=e.defaultAggFunc,e.renderAggFn=e.defaultAggFunc),e.renderResizeWidth=e.renderWidth,i.push(e)}),r.sort&&(e=_xeUtils.default.toArrayTree(_xeUtils.default.orderBy(i,"renderSortNumber"),{key:"id",parentKey:"parentId",children:"children"}),v.collectColumn=e,v.tableFullColumn=(0,_util.getColumnList)(e)),C.isCustomStatus=!1,h.handleCustom().then(()=>{var e;r.aggFunc&&h.handlePivotTableAggData&&(((e=s.value)||t).length?e&&e.length?h.setRowGroups(e):h.clearRowGroups():h.handleUpdateAggData()),h.saveCustomStore("reset")})},toggleCustomAllCheckbox(){var e=C.customStore,e=!e.isAll;return t(e)},setCustomAllCheckbox:t};let n=()=>{var e=C.customStore,t=v.collectColumn;let l=f.value.checkMethod;e.isAll=t.every(e=>!!l&&!l({$table:h,column:e})||e.renderVisible),e.isIndeterminate=!e.isAll&&t.some(e=>(!l||l({$table:h,column:e}))&&(e.renderVisible||e.halfVisible))},r=(e,t)=>{h.dispatchEvent("custom",{type:e},t)};var i={checkCustomStatus:n,emitCustomEvent:r,triggerCustomEvent(e){var t=h.reactData.customStore;t.visible?(o(),r("close",e),h.dispatchEvent("custom-close",{},e)):(t.btnEl=e.target,l(),r("open",e),h.dispatchEvent("custom-open",{},e))},customOpenEvent(e){var t=h.reactData.customStore;t.visible||(t.activeBtn=!0,t.btnEl=e.target,h.openCustom(),h.emitCustomEvent("open",e),h.dispatchEvent("custom-open",{},e))},customCloseEvent(e){var t=h.reactData.customStore;t.visible&&(t.activeBtn=!1,h.closeCustom(),h.emitCustomEvent("close",e),h.dispatchEvent("custom-close",{},e))},handleUpdateCustomColumn:u,handleCustomStyle(){return h.reactData.isCustomDragStatus=!1,a()}};return Object.assign(Object.assign({},e),i)},setupGrid(e){return e.extendTableMethods(tableCustomMethodKeys)},setupGantt(e){return e.extendTableMethods(tableCustomMethodKeys)}});
|