vxe-table 3.21.22 → 3.21.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/es/{iconfont.1782890276645.ttf → iconfont.1783331230583.ttf} +0 -0
- package/es/iconfont.1783331230583.woff +0 -0
- package/es/iconfont.1783331230583.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/mixin.js +84 -13
- package/es/table/module/custom/panel.js +485 -312
- package/es/table/src/cell.js +2 -2
- package/es/table/src/columnInfo.js +13 -7
- package/es/table/src/methods.js +102 -60
- package/es/table/src/util.js +31 -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.1782890276645.ttf → iconfont.1783331230583.ttf} +0 -0
- package/lib/iconfont.1783331230583.woff +0 -0
- package/lib/iconfont.1783331230583.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +560 -196
- 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/mixin.js +91 -11
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +376 -158
- 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 +16 -6
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +10 -9
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/util.js +35 -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/mixin.ts +85 -14
- package/packages/table/module/custom/panel.ts +538 -307
- package/packages/table/src/cell.ts +2 -2
- package/packages/table/src/columnInfo.ts +13 -7
- package/packages/table/src/methods.ts +118 -61
- package/packages/table/src/util.ts +34 -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.1782890276645.woff +0 -0
- package/es/iconfont.1782890276645.woff2 +0 -0
- package/lib/iconfont.1782890276645.woff +0 -0
- package/lib/iconfont.1782890276645.woff2 +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import { getColumnList } from '../../src/util';
|
|
3
3
|
import { toCssUnit } from '../../../ui/src/dom';
|
|
4
|
+
const customColumnCssKeys = ['checkbox', 'sort', 'title', 'width', 'fixed', 'align', 'header-align', 'footer-align'];
|
|
4
5
|
function updatePopupStyle($xeTable) {
|
|
5
6
|
const $xeGrid = $xeTable.$xeGrid;
|
|
6
7
|
const $xeGantt = $xeTable.$xeGantt;
|
|
@@ -10,14 +11,15 @@ function updatePopupStyle($xeTable) {
|
|
|
10
11
|
const customOpts = $xeTable.computeCustomOpts;
|
|
11
12
|
const { mode, placement, popupOptions } = customOpts;
|
|
12
13
|
const showSimple = !(mode === 'modal' || mode === 'drawer');
|
|
13
|
-
const { transfer, maxHeight } = popupOptions || {};
|
|
14
|
+
const { transfer, minWidth, maxWidth, maxHeight } = popupOptions || {};
|
|
14
15
|
const customSimpleMode = $xeTable.computeCustomSimpleMode;
|
|
15
16
|
const showCustomSimpleOutside = customSimpleMode === 'outside';
|
|
16
17
|
const bodyEl = document.documentElement;
|
|
17
18
|
let wrapperEl = $xeTable.$refs.refElem;
|
|
18
19
|
let popupTop = 0;
|
|
19
20
|
let popupMaxHeight = 0;
|
|
20
|
-
const
|
|
21
|
+
const defPupStys = {};
|
|
22
|
+
const panePupStys = {};
|
|
21
23
|
if ($xeGantt) {
|
|
22
24
|
const ganttContainerElem = $xeGantt.$refs.refGanttContainerElem;
|
|
23
25
|
if (ganttContainerElem) {
|
|
@@ -49,24 +51,41 @@ function updatePopupStyle($xeTable) {
|
|
|
49
51
|
}
|
|
50
52
|
if (!placement || !(['left', 'right', 'bottom-left', 'bottom-right'].includes(placement))) {
|
|
51
53
|
if (popupTop) {
|
|
52
|
-
|
|
54
|
+
defPupStys.top = toCssUnit(popupTop);
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
if (showSimple && transfer) {
|
|
56
58
|
if (placement === 'bottom-left' || placement === 'bottom-right') {
|
|
57
|
-
|
|
59
|
+
defPupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1);
|
|
58
60
|
}
|
|
59
61
|
if (placement === 'top-left' || placement === 'bottom-left') {
|
|
60
|
-
|
|
62
|
+
defPupStys.left = toCssUnit(tableRect.left);
|
|
61
63
|
}
|
|
62
64
|
else if (!placement || placement === 'top-right' || placement === 'bottom-right') {
|
|
63
|
-
|
|
65
|
+
defPupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1);
|
|
64
66
|
}
|
|
65
67
|
}
|
|
68
|
+
// 同步表格的css变量到弹窗中
|
|
69
|
+
const bodyComputeStyle = getComputedStyle(bodyEl);
|
|
70
|
+
const tableComputeStyle = getComputedStyle(wrapperEl);
|
|
71
|
+
customColumnCssKeys.forEach(key => {
|
|
72
|
+
const currCssKey = `--vxe-ui-vxe-table-custom-column-${key}-${key === 'title' ? 'min-' : ''}width`;
|
|
73
|
+
const currCssVal = tableComputeStyle.getPropertyValue(currCssKey);
|
|
74
|
+
if (currCssVal && currCssVal !== bodyComputeStyle.getPropertyValue(currCssKey)) {
|
|
75
|
+
panePupStys[currCssKey] = currCssVal;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
if (minWidth) {
|
|
79
|
+
defPupStys['--vxe-ui-vxe-table-custom-default-min-width'] = toCssUnit(minWidth);
|
|
80
|
+
}
|
|
81
|
+
if (maxWidth) {
|
|
82
|
+
defPupStys['--vxe-ui-vxe-table-custom-default-max-width'] = toCssUnit(maxWidth);
|
|
83
|
+
}
|
|
66
84
|
if (popupMxHeight) {
|
|
67
|
-
|
|
85
|
+
defPupStys.maxHeight = toCssUnit(popupMxHeight);
|
|
68
86
|
}
|
|
69
|
-
customStore.
|
|
87
|
+
customStore.defPopupStyle = defPupStys;
|
|
88
|
+
customStore.panePopupStyle = panePupStys;
|
|
70
89
|
customStore.maxHeight = popupMxHeight;
|
|
71
90
|
return $xeTable.$nextTick();
|
|
72
91
|
}
|
|
@@ -156,8 +175,17 @@ export default {
|
|
|
156
175
|
const internalData = $xeTable;
|
|
157
176
|
const { customColumnList, aggHandleFields, rowGroupList } = reactData;
|
|
158
177
|
const customOpts = $xeTable.computeCustomOpts;
|
|
159
|
-
const { allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues } = customOpts;
|
|
160
|
-
if (
|
|
178
|
+
const { allowVisible, allowSort, allowFixed, allowResizable, allowAlign, allowHeaderAlign, allowFooterAlign, allowGroup, allowValues } = customOpts;
|
|
179
|
+
if (isDirectly) {
|
|
180
|
+
XEUtils.eachTree(customColumnList, (column) => {
|
|
181
|
+
if (allowResizable) {
|
|
182
|
+
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
183
|
+
column.resizeWidth = Math.max(0, XEUtils.toNumber(column.renderWidth));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
161
189
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
162
190
|
if (parentColumn) {
|
|
163
191
|
// 更新子列信息
|
|
@@ -183,13 +211,22 @@ export default {
|
|
|
183
211
|
if (allowVisible) {
|
|
184
212
|
column.visible = column.renderVisible;
|
|
185
213
|
}
|
|
214
|
+
if (allowAlign) {
|
|
215
|
+
column.align = column.renderAlign;
|
|
216
|
+
}
|
|
217
|
+
if (allowHeaderAlign) {
|
|
218
|
+
column.headerAlign = column.renderHeaderAlign;
|
|
219
|
+
}
|
|
220
|
+
if (allowFooterAlign) {
|
|
221
|
+
column.footerAlign = column.renderFooterAlign;
|
|
222
|
+
}
|
|
186
223
|
if (allowGroup && allowValues) {
|
|
187
224
|
column.aggFunc = column.renderAggFn;
|
|
188
225
|
}
|
|
189
226
|
});
|
|
190
227
|
}
|
|
191
228
|
reactData.isCustomStatus = true;
|
|
192
|
-
if (allowGroup &&
|
|
229
|
+
if (allowGroup && !!$xeTable.handlePivotTableAggData) {
|
|
193
230
|
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
194
231
|
// 更新数据分组
|
|
195
232
|
if (aggHandleFields.length) {
|
|
@@ -215,7 +252,7 @@ export default {
|
|
|
215
252
|
const { customColumnList, customStore } = reactData;
|
|
216
253
|
const { oldSortMaps, oldFixedMaps, oldVisibleMaps } = customStore;
|
|
217
254
|
const customOpts = $xeTable.computeCustomOpts;
|
|
218
|
-
const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts;
|
|
255
|
+
const { allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues } = customOpts;
|
|
219
256
|
XEUtils.eachTree(customColumnList, column => {
|
|
220
257
|
const colid = column.getKey();
|
|
221
258
|
const visible = !!oldVisibleMaps[colid];
|
|
@@ -234,6 +271,21 @@ export default {
|
|
|
234
271
|
if (allowResizable) {
|
|
235
272
|
column.renderResizeWidth = column.renderWidth;
|
|
236
273
|
}
|
|
274
|
+
if (allowAlign) {
|
|
275
|
+
column.align = column.renderAlign;
|
|
276
|
+
}
|
|
277
|
+
if (allowHeaderAlign) {
|
|
278
|
+
column.headerAlign = column.renderHeaderAlign;
|
|
279
|
+
}
|
|
280
|
+
if (allowFooterAlign) {
|
|
281
|
+
column.footerAlign = column.renderFooterAlign;
|
|
282
|
+
}
|
|
283
|
+
if (allowGroup) {
|
|
284
|
+
// 无
|
|
285
|
+
}
|
|
286
|
+
if (allowValues) {
|
|
287
|
+
// 无
|
|
288
|
+
}
|
|
237
289
|
}, { children: 'children' });
|
|
238
290
|
return $xeTable.$nextTick();
|
|
239
291
|
},
|
|
@@ -250,7 +302,10 @@ export default {
|
|
|
250
302
|
resizable: options === true,
|
|
251
303
|
fixed: options === true,
|
|
252
304
|
sort: options === true,
|
|
253
|
-
aggFunc: options === true
|
|
305
|
+
aggFunc: options === true,
|
|
306
|
+
align: options === true,
|
|
307
|
+
headerAlign: options === true,
|
|
308
|
+
footerAlign: options === true
|
|
254
309
|
}, options);
|
|
255
310
|
const allCols = [];
|
|
256
311
|
XEUtils.eachTree(collectColumn, (column) => {
|
|
@@ -259,6 +314,7 @@ export default {
|
|
|
259
314
|
}
|
|
260
315
|
if (opts.fixed) {
|
|
261
316
|
column.fixed = column.defaultFixed;
|
|
317
|
+
column.renderFixed = column.defaultFixed;
|
|
262
318
|
}
|
|
263
319
|
if (opts.sort) {
|
|
264
320
|
column.renderSortNumber = column.sortNumber;
|
|
@@ -267,6 +323,18 @@ export default {
|
|
|
267
323
|
if (!checkMethod || checkMethod({ $table: $xeTable, column })) {
|
|
268
324
|
column.visible = column.defaultVisible;
|
|
269
325
|
}
|
|
326
|
+
if (opts.align) {
|
|
327
|
+
column.align = column.defaultAlign;
|
|
328
|
+
column.renderAlign = column.defaultAlign;
|
|
329
|
+
}
|
|
330
|
+
if (opts.headerAlign) {
|
|
331
|
+
column.headerAlign = column.defaultHeaderAlign;
|
|
332
|
+
column.renderHeaderAlign = column.defaultHeaderAlign;
|
|
333
|
+
}
|
|
334
|
+
if (opts.footerAlign) {
|
|
335
|
+
column.footerAlign = column.defaultFooterAlign;
|
|
336
|
+
column.renderFooterAlign = column.defaultFooterAlign;
|
|
337
|
+
}
|
|
270
338
|
if (opts.aggFunc) {
|
|
271
339
|
column.aggFunc = column.defaultAggFunc;
|
|
272
340
|
column.renderAggFn = column.defaultAggFunc;
|
|
@@ -414,6 +482,9 @@ export default {
|
|
|
414
482
|
column.renderFixed = column.fixed;
|
|
415
483
|
column.renderVisible = column.visible;
|
|
416
484
|
column.renderResizeWidth = column.renderWidth;
|
|
485
|
+
column.renderAlign = column.align;
|
|
486
|
+
column.renderHeaderAlign = column.headerAlign;
|
|
487
|
+
column.renderFooterAlign = column.footerAlign;
|
|
417
488
|
sortMaps[colid] = column.renderSortNumber;
|
|
418
489
|
fixedMaps[colid] = column.fixed;
|
|
419
490
|
visibleMaps[colid] = column.visible;
|