vxe-table 4.23.7 → 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 +5859 -4018
- package/es/colgroup/index.js +1 -1
- package/es/column/index.js +1 -1
- package/es/components.d.ts +3 -0
- package/es/components.js +4 -8
- package/es/grid/index.js +1 -1
- package/es/grid/src/emits.js +1 -15
- package/es/grid/src/grid.js +398 -121
- package/es/grid/src/props.js +1 -1
- package/es/index.esm.js +6 -0
- package/es/index.js +6 -0
- package/es/table/index.js +1 -1
- package/es/table/module/custom/hook.js +50 -43
- package/es/table/module/custom/panel.js +778 -528
- package/es/table/module/edit/hook.js +141 -63
- package/es/table/module/export/export-panel.js +400 -317
- package/es/table/module/export/hook.js +396 -338
- package/es/table/module/export/import-panel.js +153 -124
- package/es/table/module/filter/hook.js +17 -3
- package/es/table/module/filter/panel.js +147 -85
- package/es/table/module/keyboard/hook.js +9 -5
- package/es/table/module/menu/hook.js +1 -1
- package/es/table/module/menu/panel.js +198 -127
- package/es/table/module/validator/hook.js +1 -1
- package/es/table/render/index.js +152 -99
- package/es/table/src/body.js +356 -234
- package/es/table/src/cell.js +427 -270
- package/es/table/src/columnInfo.js +2 -1
- package/es/table/src/footer.js +145 -100
- package/es/table/src/group.js +7 -3
- package/es/table/src/header.js +230 -173
- package/es/table/src/props.js +1 -1
- package/es/table/src/table.js +1504 -1031
- package/es/table/src/util.js +15 -19
- package/es/toolbar/index.js +1 -1
- package/es/toolbar/src/toolbar.js +133 -76
- package/es/ui/index.d.ts +0 -1
- package/es/ui/index.js +1 -2
- 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/es/v-x-e-table/index.d.ts +0 -1
- package/es/v-x-e-table/index.js +0 -1
- package/lib/colgroup/index.js +5 -5
- package/lib/column/index.js +5 -5
- package/lib/components.js +8 -12
- package/lib/grid/index.js +4 -4
- package/lib/grid/src/emits.js +1 -15
- package/lib/grid/src/grid.js +419 -142
- package/lib/grid/src/props.js +2 -2
- package/lib/index.common.js +6 -0
- package/lib/index.js +6 -0
- package/lib/index.umd.js +5825 -3945
- package/lib/index.umd.min.js +3 -3
- package/lib/table/index.js +5 -5
- package/lib/table/module/custom/hook.js +51 -44
- package/lib/table/module/custom/panel.js +790 -540
- package/lib/table/module/edit/hook.js +142 -64
- package/lib/table/module/export/export-panel.js +406 -323
- package/lib/table/module/export/hook.js +419 -361
- package/lib/table/module/export/import-panel.js +157 -128
- package/lib/table/module/filter/hook.js +18 -4
- package/lib/table/module/filter/panel.js +149 -87
- package/lib/table/module/keyboard/hook.js +10 -6
- package/lib/table/module/menu/hook.js +2 -2
- package/lib/table/module/menu/panel.js +199 -128
- package/lib/table/module/validator/hook.js +2 -2
- package/lib/table/render/index.js +153 -100
- package/lib/table/src/body.js +357 -235
- package/lib/table/src/cell.js +428 -271
- package/lib/table/src/columnInfo.js +3 -2
- package/lib/table/src/footer.js +146 -101
- package/lib/table/src/group.js +7 -3
- package/lib/table/src/header.js +231 -174
- package/lib/table/src/props.js +2 -2
- package/lib/table/src/table.js +1487 -1045
- package/lib/table/src/util.js +15 -19
- package/lib/toolbar/index.js +4 -4
- package/lib/toolbar/src/toolbar.js +135 -78
- package/lib/ui/index.js +1 -3
- package/lib/ui/src/dom.js +9 -6
- package/lib/ui/src/log.js +1 -1
- package/lib/v-x-e-table/index.js +0 -2
- package/package.json +8 -3
- package/packages/colgroup/index.ts +22 -22
- package/packages/column/index.ts +22 -22
- package/packages/components.ts +41 -43
- 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 -4
- 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 -521
- 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 -4
- package/packages/v-x-e-table/index.ts +3 -4
- package/types/all.d.ts +76 -76
- package/types/index.d.ts +4 -4
- /package/dist/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/dist/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
- /package/dist/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/es/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/es/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
- /package/es/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/lib/{iconfont.1792979665397.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/lib/{iconfont.1792979665397.woff → iconfont.1793009263429.woff} +0 -0
- /package/lib/{iconfont.1792979665397.woff2 → iconfont.1793009263429.woff2} +0 -0
|
@@ -32,13 +32,13 @@ __export(columnInfo_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(columnInfo_exports);
|
|
34
34
|
var import_xe_utils = __toESM(require("xe-utils"));
|
|
35
|
-
var
|
|
35
|
+
var import_core = require("@vxe-ui/core");
|
|
36
36
|
var import_util = require("./util");
|
|
37
37
|
var import_utils = require("../../ui/src/utils");
|
|
38
38
|
var import_dom = require("../../ui/src/dom");
|
|
39
39
|
var import_log = require("../../ui/src/log");
|
|
40
40
|
const { warnLog, errLog } = (0, import_log.createComponentLog)("table");
|
|
41
|
-
const { getI18n, formats, renderer } =
|
|
41
|
+
const { getI18n, formats, renderer } = import_core.VxeUI;
|
|
42
42
|
class ColumnInfo {
|
|
43
43
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
44
44
|
constructor($xeTable, colConfs, { renderHeader, renderCell, renderFooter, renderData } = {}) {
|
|
@@ -212,6 +212,7 @@ class ColumnInfo {
|
|
|
212
212
|
slots: colConfs.slots
|
|
213
213
|
});
|
|
214
214
|
if (ctFilterOptions && (!filters || !filters.length)) {
|
|
215
|
+
;
|
|
215
216
|
this.filters = (0, import_util.toFilters)(ctFilterOptions({ $table: $xeTable, column: this }), colId);
|
|
216
217
|
}
|
|
217
218
|
if ($xeGGWrapper) {
|
package/lib/table/src/footer.js
CHANGED
|
@@ -34,11 +34,11 @@ module.exports = __toCommonJS(footer_exports);
|
|
|
34
34
|
var import_vue = require("vue");
|
|
35
35
|
var import_comp = require("../../ui/src/comp");
|
|
36
36
|
var import_xe_utils = __toESM(require("xe-utils"));
|
|
37
|
-
var
|
|
37
|
+
var import_core = require("@vxe-ui/core");
|
|
38
38
|
var import_dom = require("../../ui/src/dom");
|
|
39
39
|
var import_util = require("./util");
|
|
40
40
|
var import_utils = require("../../ui/src/utils");
|
|
41
|
-
const { renderer, renderEmptyElement } =
|
|
41
|
+
const { renderer, renderEmptyElement } = import_core.VxeUI;
|
|
42
42
|
const sourceType = "table";
|
|
43
43
|
const renderType = "footer";
|
|
44
44
|
var footer_default = (0, import_comp.defineVxeComponent)({
|
|
@@ -198,49 +198,73 @@ var footer_default = (0, import_comp.defineVxeComponent)({
|
|
|
198
198
|
} else {
|
|
199
199
|
tcStyle.minHeight = `${currCellHeight}px`;
|
|
200
200
|
}
|
|
201
|
-
return (0, import_vue.h)(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
201
|
+
return (0, import_vue.h)(
|
|
202
|
+
"td",
|
|
203
|
+
{
|
|
204
|
+
class: [
|
|
205
|
+
"vxe-table--column vxe-footer--column",
|
|
206
|
+
column.id,
|
|
207
|
+
{
|
|
208
|
+
[`col--${footAlign}`]: footAlign,
|
|
209
|
+
[`col--${type}`]: type,
|
|
210
|
+
"col--last": isLastColumn,
|
|
211
|
+
"fixed--width": !isAutoCellWidth,
|
|
212
|
+
"fixed--hidden": fixedHiddenColumn,
|
|
213
|
+
"is--pg-top": isCellPaddingTop,
|
|
214
|
+
"is--pg-bottom": isCellPaddingBottom,
|
|
215
|
+
"is--pg-left": isCellPaddingLeft,
|
|
216
|
+
"is--pg-right": isCellPaddingRight,
|
|
217
|
+
"col--ellipsis": hasEllipsis,
|
|
218
|
+
"col--current": currColFlag && currentCol === column
|
|
219
|
+
},
|
|
220
|
+
(0, import_dom.getPropClass)(footerClassName, cellParams),
|
|
221
|
+
(0, import_dom.getPropClass)(footerCellClassName, cellParams)
|
|
222
|
+
],
|
|
223
|
+
...attrs,
|
|
224
|
+
style: footerCellStyle ? import_xe_utils.default.isFunction(footerCellStyle) ? footerCellStyle(cellParams) : footerCellStyle : null,
|
|
225
|
+
...tfOns,
|
|
226
|
+
key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag ? column.id : $columnIndex
|
|
227
|
+
},
|
|
228
|
+
[
|
|
229
|
+
(0, import_vue.h)(
|
|
230
|
+
"div",
|
|
231
|
+
{
|
|
232
|
+
class: [
|
|
233
|
+
"vxe-cell",
|
|
234
|
+
{
|
|
235
|
+
"c--title": showTitle,
|
|
236
|
+
"c--tooltip": showTooltip,
|
|
237
|
+
"c--ellipsis": showEllipsis
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
style: tcStyle
|
|
241
|
+
},
|
|
242
|
+
isVNPreEmptyStatus ? [] : [
|
|
243
|
+
(0, import_vue.h)(
|
|
244
|
+
"div",
|
|
245
|
+
{
|
|
246
|
+
colid,
|
|
247
|
+
class: "vxe-cell--wrapper vxe-footer-cell--wrapper"
|
|
248
|
+
},
|
|
249
|
+
column.renderFooter(cellParams)
|
|
250
|
+
)
|
|
251
|
+
]
|
|
252
|
+
),
|
|
253
|
+
/**
|
|
254
|
+
* 列宽拖动
|
|
255
|
+
*/
|
|
256
|
+
!fixedHiddenColumn && showResizable && isAllColumnDrag ? (0, import_vue.h)("div", {
|
|
257
|
+
class: [
|
|
258
|
+
"vxe-cell--col-resizable",
|
|
259
|
+
{
|
|
260
|
+
"is--line": !border || border === "none"
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
onMousedown: (evnt) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
|
|
264
|
+
onDblclick: (evnt) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
|
|
265
|
+
}) : renderEmptyElement($xeTable)
|
|
266
|
+
]
|
|
267
|
+
);
|
|
244
268
|
});
|
|
245
269
|
};
|
|
246
270
|
const renderHeads = (isOptimizeMode, renderColumnList) => {
|
|
@@ -249,14 +273,15 @@ var footer_default = (0, import_comp.defineVxeComponent)({
|
|
|
249
273
|
return footerTableData.map((row, _rowIndex) => {
|
|
250
274
|
const $rowIndex = _rowIndex;
|
|
251
275
|
const rowParams = { $table: $xeTable, row, rowIndex: _rowIndex, _rowIndex, $rowIndex, fixed: fixedType, type: renderType };
|
|
252
|
-
return (0, import_vue.h)(
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
footerRowClassName ? import_xe_utils.default.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ""
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
276
|
+
return (0, import_vue.h)(
|
|
277
|
+
"tr",
|
|
278
|
+
{
|
|
279
|
+
key: _rowIndex,
|
|
280
|
+
class: ["vxe-footer--row", footerRowClassName ? import_xe_utils.default.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ""],
|
|
281
|
+
style: footerRowStyle ? import_xe_utils.default.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : null
|
|
282
|
+
},
|
|
283
|
+
renderRows(isOptimizeMode, renderColumnList, footerTableData, row, _rowIndex, _rowIndex)
|
|
284
|
+
);
|
|
260
285
|
});
|
|
261
286
|
};
|
|
262
287
|
const renderVN = () => {
|
|
@@ -297,54 +322,74 @@ var footer_default = (0, import_comp.defineVxeComponent)({
|
|
|
297
322
|
}
|
|
298
323
|
}
|
|
299
324
|
}
|
|
300
|
-
return (0, import_vue.h)(
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
325
|
+
return (0, import_vue.h)(
|
|
326
|
+
"div",
|
|
327
|
+
{
|
|
328
|
+
ref: refElem,
|
|
329
|
+
class: ["vxe-table--footer-wrapper", fixedType ? `fixed-${fixedType}--wrapper` : "body--wrapper"],
|
|
330
|
+
xid: xID
|
|
331
|
+
},
|
|
332
|
+
[
|
|
333
|
+
(0, import_vue.h)(
|
|
334
|
+
"div",
|
|
335
|
+
{
|
|
336
|
+
ref: refFooterScroll,
|
|
337
|
+
class: "vxe-table--footer-inner-wrapper",
|
|
338
|
+
onScroll(evnt) {
|
|
339
|
+
$xeTable.triggerFooterScrollEvent(evnt, fixedType);
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
[
|
|
343
|
+
fixedType ? renderEmptyElement($xeTable) : (0, import_vue.h)("div", {
|
|
344
|
+
ref: refFooterXSpace,
|
|
345
|
+
class: "vxe-body--x-space"
|
|
346
|
+
}),
|
|
347
|
+
(0, import_vue.h)(
|
|
348
|
+
"table",
|
|
349
|
+
{
|
|
350
|
+
ref: refFooterTable,
|
|
351
|
+
class: "vxe-table--footer",
|
|
352
|
+
xid: xID,
|
|
353
|
+
cellspacing: 0,
|
|
354
|
+
cellpadding: 0,
|
|
355
|
+
border: 0,
|
|
356
|
+
xvm: isOptimizeMode ? "1" : null
|
|
357
|
+
},
|
|
358
|
+
[
|
|
359
|
+
/**
|
|
360
|
+
* 列宽
|
|
361
|
+
*/
|
|
362
|
+
(0, import_vue.h)(
|
|
363
|
+
"colgroup",
|
|
364
|
+
{
|
|
365
|
+
ref: refFooterColgroup
|
|
366
|
+
},
|
|
367
|
+
renderColumnList.map((column, $columnIndex) => {
|
|
368
|
+
return (0, import_vue.h)("col", {
|
|
369
|
+
name: column.id,
|
|
370
|
+
key: $columnIndex,
|
|
371
|
+
style: {
|
|
372
|
+
width: `${column.renderWidth}px`
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
})
|
|
376
|
+
),
|
|
377
|
+
/**
|
|
378
|
+
* 底部
|
|
379
|
+
*/
|
|
380
|
+
(0, import_vue.h)(
|
|
381
|
+
"tfoot",
|
|
382
|
+
{
|
|
383
|
+
ref: refFooterTFoot
|
|
384
|
+
},
|
|
385
|
+
renderHeads(isOptimizeMode, renderColumnList)
|
|
386
|
+
)
|
|
387
|
+
]
|
|
388
|
+
)
|
|
389
|
+
]
|
|
390
|
+
)
|
|
391
|
+
]
|
|
392
|
+
);
|
|
348
393
|
};
|
|
349
394
|
(0, import_vue.onMounted)(() => {
|
|
350
395
|
(0, import_vue.nextTick)(() => {
|
package/lib/table/src/group.js
CHANGED
|
@@ -68,9 +68,13 @@ var group_default = (0, import_comp.defineVxeComponent)({
|
|
|
68
68
|
});
|
|
69
69
|
const renderVN = () => {
|
|
70
70
|
const defaultSlot = slots.default;
|
|
71
|
-
return (0, import_vue.h)(
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
return (0, import_vue.h)(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
ref: refElem
|
|
75
|
+
},
|
|
76
|
+
defaultSlot ? defaultSlot() : []
|
|
77
|
+
);
|
|
74
78
|
};
|
|
75
79
|
const $xeColgroup = { columnConfig };
|
|
76
80
|
(0, import_vue.provide)("$xeColgroup", $xeColgroup);
|