vxe-table 3.9.0-rc.9 → 3.9.0
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/README.md +1 -1
- package/es/grid/src/grid.js +120 -66
- package/es/grid/style.css +0 -1
- package/es/grid/style.min.css +1 -1
- package/es/index.esm.js +22 -3
- package/es/locale/lang/en-US.js +2 -1
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/hu-HU.js +2 -1
- package/es/locale/lang/ja-JP.js +2 -1
- package/es/locale/lang/ko-KR.js +2 -1
- package/es/locale/lang/pt-BR.js +2 -1
- package/es/locale/lang/ru-RU.js +2 -1
- package/es/locale/lang/uk-UA.js +2 -1
- package/es/locale/lang/vi-VN.js +2 -1
- package/es/locale/lang/zh-CHT.js +2 -1
- package/es/locale/lang/zh-CN.js +2 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +183 -173
- package/es/table/module/edit/mixin.js +33 -24
- package/es/table/module/export/export-panel.js +32 -4
- package/es/table/module/export/import-panel.js +25 -6
- package/es/table/module/export/mixin.js +11 -11
- package/es/table/module/menu/mixin.js +2 -2
- package/es/table/module/validator/mixin.js +4 -4
- package/es/table/render/index.js +17 -11
- package/es/table/src/body.js +1 -0
- package/es/table/src/columnInfo.js +3 -3
- package/es/table/src/methods.js +54 -42
- package/es/table/src/props.js +65 -15
- package/es/table/src/table.js +91 -57
- package/es/table/src/util.js +3 -2
- package/es/table/style.css +37 -48
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +21 -7
- package/es/toolbar/style.css +0 -1
- package/es/toolbar/style.min.css +1 -1
- package/es/ui/index.js +5 -3
- package/es/ui/src/log.js +1 -1
- package/es/vxe-grid/style.css +0 -1
- package/es/vxe-grid/style.min.css +1 -1
- package/es/vxe-table/style.css +37 -48
- package/es/vxe-table/style.min.css +1 -1
- package/es/vxe-toolbar/style.css +0 -1
- package/es/vxe-toolbar/style.min.css +1 -1
- package/lib/colgroup/index.js +3 -3
- package/lib/colgroup/index.min.js +1 -1
- package/lib/column/index.js +3 -3
- package/lib/column/index.min.js +1 -1
- package/lib/components.js +9 -11
- package/lib/components.min.js +1 -1
- package/lib/grid/index.js +3 -3
- package/lib/grid/index.min.js +1 -1
- package/lib/grid/src/grid.js +581 -491
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +0 -1
- package/lib/grid/style/style.min.css +1 -1
- package/lib/index.common.js +3 -4
- package/lib/index.umd.js +9174 -17260
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -1
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -1
- package/lib/locale/lang/hu-HU.js +2 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -1
- package/lib/locale/lang/ja-JP.js +2 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -1
- package/lib/locale/lang/ko-KR.js +2 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -1
- package/lib/locale/lang/pt-BR.js +2 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -1
- package/lib/locale/lang/ru-RU.js +2 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +2 -1
- package/lib/locale/lang/uk-UA.js +2 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +2 -1
- package/lib/locale/lang/vi-VN.js +2 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +2 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -1
- package/lib/locale/lang/zh-CN.js +2 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/index.js +4 -4
- package/lib/table/index.min.js +1 -1
- package/lib/table/module/custom/mixin.js +53 -44
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +310 -239
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +436 -371
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/export-panel.js +136 -106
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +75 -54
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +592 -597
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/export/util.js +6 -4
- package/lib/table/module/export/util.min.js +1 -1
- package/lib/table/module/filter/mixin.js +147 -118
- package/lib/table/module/filter/mixin.min.js +1 -1
- package/lib/table/module/filter/panel.js +86 -65
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +163 -151
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +125 -114
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/menu/panel.js +36 -34
- package/lib/table/module/menu/panel.min.js +1 -1
- package/lib/table/module/validator/mixin.js +225 -214
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +401 -297
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +411 -349
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +470 -344
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +10 -10
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +46 -55
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +157 -132
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/group.js +1 -1
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/header.js +170 -153
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +2758 -2478
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +33 -74
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +465 -424
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +143 -131
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +37 -48
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/index.js +3 -3
- package/lib/toolbar/index.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +332 -284
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +0 -1
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/ui/index.js +50 -41
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/comp.js +2 -3
- package/lib/ui/src/comp.min.js +1 -1
- package/lib/ui/src/dom.js +29 -28
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +6 -4
- package/lib/ui/src/log.min.js +1 -1
- package/lib/ui/src/utils.js +7 -7
- package/lib/v-x-e-table/index.js +3 -4
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/vxe-colgroup/index.js +3 -4
- package/lib/vxe-colgroup/index.min.js +1 -1
- package/lib/vxe-column/index.js +3 -4
- package/lib/vxe-column/index.min.js +1 -1
- package/lib/vxe-grid/index.js +3 -4
- package/lib/vxe-grid/index.min.js +1 -1
- package/lib/vxe-grid/style/style.css +0 -1
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/lib/vxe-table/index.js +3 -4
- package/lib/vxe-table/index.min.js +1 -1
- package/lib/vxe-table/style/style.css +37 -48
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-toolbar/index.js +3 -4
- package/lib/vxe-toolbar/index.min.js +1 -1
- package/lib/vxe-toolbar/style/style.css +0 -1
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/lib/vxe-ui/index.js +3 -4
- package/lib/vxe-ui/index.min.js +1 -1
- package/lib/vxe-v-x-e-table/index.js +3 -4
- package/lib/vxe-v-x-e-table/index.min.js +1 -1
- package/package.json +5 -4
- package/packages/grid/src/grid.ts +127 -65
- package/packages/locale/lang/en-US.ts +2 -1
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +2 -1
- package/packages/locale/lang/ja-JP.ts +2 -1
- package/packages/locale/lang/ko-KR.ts +2 -1
- package/packages/locale/lang/pt-BR.ts +2 -1
- package/packages/locale/lang/ru-RU.ts +2 -1
- package/packages/locale/lang/uk-UA.ts +2 -1
- package/packages/locale/lang/vi-VN.ts +2 -1
- package/packages/locale/lang/zh-CHT.ts +2 -1
- package/packages/locale/lang/zh-CN.ts +2 -1
- package/packages/table/module/custom/panel.ts +186 -175
- package/packages/table/module/edit/mixin.ts +32 -23
- package/packages/table/module/export/export-panel.ts +36 -4
- package/packages/table/module/export/import-panel.ts +29 -6
- package/packages/table/module/export/mixin.ts +11 -11
- package/packages/table/module/menu/mixin.ts +2 -2
- package/packages/table/module/validator/mixin.ts +4 -4
- package/packages/table/render/index.ts +20 -11
- package/packages/table/src/body.ts +1 -0
- package/packages/table/src/columnInfo.ts +3 -3
- package/packages/table/src/methods.ts +53 -42
- package/packages/table/src/props.ts +68 -15
- package/packages/table/src/table.ts +99 -54
- package/packages/table/src/util.ts +3 -2
- package/packages/toolbar/src/toolbar.ts +21 -7
- package/packages/ui/index.ts +3 -1
- package/styles/components/table.scss +82 -17
- package/types/all.d.ts +1 -0
- /package/es/{iconfont.1726453742001.ttf → iconfont.1728348263835.ttf} +0 -0
- /package/es/{iconfont.1726453742001.woff → iconfont.1728348263835.woff} +0 -0
- /package/es/{iconfont.1726453742001.woff2 → iconfont.1728348263835.woff2} +0 -0
- /package/lib/{iconfont.1726453742001.ttf → iconfont.1728348263835.ttf} +0 -0
- /package/lib/{iconfont.1726453742001.woff → iconfont.1728348263835.woff} +0 -0
- /package/lib/{iconfont.1726453742001.woff2 → iconfont.1728348263835.woff2} +0 -0
package/es/table/src/table.js
CHANGED
|
@@ -119,6 +119,9 @@ export default {
|
|
|
119
119
|
};
|
|
120
120
|
},
|
|
121
121
|
inject: {
|
|
122
|
+
$xeTabs: {
|
|
123
|
+
default: null
|
|
124
|
+
},
|
|
122
125
|
$xeGrid: {
|
|
123
126
|
default: null
|
|
124
127
|
},
|
|
@@ -345,8 +348,7 @@ export default {
|
|
|
345
348
|
_isLoading: false
|
|
346
349
|
};
|
|
347
350
|
},
|
|
348
|
-
computed: {
|
|
349
|
-
tableId() {
|
|
351
|
+
computed: Object.assign(Object.assign({}, {}), { tableId() {
|
|
350
352
|
const { id } = this;
|
|
351
353
|
if (id) {
|
|
352
354
|
if (XEUtils.isFunction(id)) {
|
|
@@ -360,19 +362,19 @@ export default {
|
|
|
360
362
|
return this.computeValidOpts;
|
|
361
363
|
},
|
|
362
364
|
computeValidOpts() {
|
|
363
|
-
return Object.assign({ message: 'default' }, getConfig().table.validConfig, this.validConfig);
|
|
365
|
+
return Object.assign({ message: 'default' }, XEUtils.clone(getConfig().table.validConfig, true), this.validConfig);
|
|
364
366
|
},
|
|
365
367
|
sXOpts() {
|
|
366
368
|
return this.computeSXOpts;
|
|
367
369
|
},
|
|
368
370
|
computeSXOpts() {
|
|
369
|
-
return Object.assign({}, getConfig().table.scrollX, this.scrollX);
|
|
371
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.scrollX, true), this.scrollX);
|
|
370
372
|
},
|
|
371
373
|
sYOpts() {
|
|
372
374
|
return this.computeSYOpts;
|
|
373
375
|
},
|
|
374
376
|
computeSYOpts() {
|
|
375
|
-
return Object.assign({}, getConfig().table.scrollY, this.scrollY);
|
|
377
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.scrollY, true), this.scrollY);
|
|
376
378
|
},
|
|
377
379
|
rowHeightMaps() {
|
|
378
380
|
return {
|
|
@@ -386,49 +388,49 @@ export default {
|
|
|
386
388
|
return this.computeColumnOpts;
|
|
387
389
|
},
|
|
388
390
|
computeColumnOpts() {
|
|
389
|
-
return Object.assign({}, getConfig().table.columnConfig, this.columnConfig);
|
|
391
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.columnConfig, true), this.columnConfig);
|
|
390
392
|
},
|
|
391
393
|
rowOpts() {
|
|
392
394
|
return this.computeRowOpts;
|
|
393
395
|
},
|
|
394
396
|
computeRowOpts() {
|
|
395
|
-
return Object.assign({}, getConfig().table.rowConfig, this.rowConfig);
|
|
397
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.rowConfig, true), this.rowConfig);
|
|
396
398
|
},
|
|
397
399
|
resizeOpts() {
|
|
398
400
|
return this.computeResizeOpts;
|
|
399
401
|
},
|
|
400
402
|
computeResizeOpts() {
|
|
401
|
-
return Object.assign({}, getConfig().table.resizeConfig, this.resizeConfig);
|
|
403
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.resizeConfig, true), this.resizeConfig);
|
|
402
404
|
},
|
|
403
405
|
resizableOpts() {
|
|
404
406
|
return this.computeResizableOpts;
|
|
405
407
|
},
|
|
406
408
|
computeResizableOpts() {
|
|
407
|
-
return Object.assign({}, getConfig().table.resizableConfig, this.resizableConfig);
|
|
409
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.resizableConfig, true), this.resizableConfig);
|
|
408
410
|
},
|
|
409
411
|
seqOpts() {
|
|
410
412
|
return this.computeSeqOpts;
|
|
411
413
|
},
|
|
412
414
|
computeSeqOpts() {
|
|
413
|
-
return Object.assign({ startIndex: 0 }, getConfig().table.seqConfig, this.seqConfig);
|
|
415
|
+
return Object.assign({ startIndex: 0 }, XEUtils.clone(getConfig().table.seqConfig, true), this.seqConfig);
|
|
414
416
|
},
|
|
415
417
|
radioOpts() {
|
|
416
418
|
return this.computeRadioOpts;
|
|
417
419
|
},
|
|
418
420
|
computeRadioOpts() {
|
|
419
|
-
return Object.assign({}, getConfig().table.radioConfig, this.radioConfig);
|
|
421
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.radioConfig, true), this.radioConfig);
|
|
420
422
|
},
|
|
421
423
|
checkboxOpts() {
|
|
422
424
|
return this.computeCheckboxOpts;
|
|
423
425
|
},
|
|
424
426
|
computeCheckboxOpts() {
|
|
425
|
-
return Object.assign({}, getConfig().table.checkboxConfig, this.checkboxConfig);
|
|
427
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.checkboxConfig, true), this.checkboxConfig);
|
|
426
428
|
},
|
|
427
429
|
tooltipOpts() {
|
|
428
430
|
return this.computeTooltipOpts;
|
|
429
431
|
},
|
|
430
432
|
computeTooltipOpts() {
|
|
431
|
-
return Object.assign({}, getConfig().tooltip, getConfig().table.tooltipConfig, this.tooltipConfig);
|
|
433
|
+
return Object.assign({}, XEUtils.clone(getConfig().tooltip, true), XEUtils.clone(getConfig().table.tooltipConfig, true), this.tooltipConfig);
|
|
432
434
|
},
|
|
433
435
|
tipConfig() {
|
|
434
436
|
return Object.assign({}, this.tooltipOpts);
|
|
@@ -440,53 +442,49 @@ export default {
|
|
|
440
442
|
return this.computeEditOpts;
|
|
441
443
|
},
|
|
442
444
|
computeEditOpts() {
|
|
443
|
-
return Object.assign({}, getConfig().table.editConfig, this.editConfig);
|
|
445
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.editConfig, true), this.editConfig);
|
|
444
446
|
},
|
|
445
447
|
sortOpts() {
|
|
446
448
|
return this.computeSortOpts;
|
|
447
449
|
},
|
|
448
450
|
computeSortOpts() {
|
|
449
|
-
return Object.assign({ orders: ['asc', 'desc', null] }, getConfig().table.sortConfig, this.sortConfig);
|
|
451
|
+
return Object.assign({ orders: ['asc', 'desc', null] }, XEUtils.clone(getConfig().table.sortConfig, true), this.sortConfig);
|
|
450
452
|
},
|
|
451
453
|
filterOpts() {
|
|
452
454
|
return this.computeFilterOpts;
|
|
453
455
|
},
|
|
454
456
|
computeFilterOpts() {
|
|
455
|
-
return Object.assign({}, getConfig().table.filterConfig, this.filterConfig);
|
|
457
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.filterConfig, true), this.filterConfig);
|
|
456
458
|
},
|
|
457
459
|
mouseOpts() {
|
|
458
460
|
return this.computeMouseOpts;
|
|
459
461
|
},
|
|
460
462
|
computeMouseOpts() {
|
|
461
|
-
return Object.assign({}, getConfig().table.mouseConfig, this.mouseConfig);
|
|
463
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.mouseConfig, true), this.mouseConfig);
|
|
462
464
|
},
|
|
463
465
|
areaOpts() {
|
|
464
466
|
return this.computeAreaOpts;
|
|
465
467
|
},
|
|
466
468
|
computeAreaOpts() {
|
|
467
|
-
return Object.assign({}, getConfig().table.areaConfig, this.areaConfig);
|
|
469
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.areaConfig, true), this.areaConfig);
|
|
468
470
|
},
|
|
469
471
|
keyboardOpts() {
|
|
470
472
|
return this.computeKeyboardOpts;
|
|
471
473
|
},
|
|
472
474
|
computeKeyboardOpts() {
|
|
473
|
-
return Object.assign({}, getConfig().table.keyboardConfig, this.keyboardConfig);
|
|
475
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.keyboardConfig, true), this.keyboardConfig);
|
|
474
476
|
},
|
|
475
477
|
clipOpts() {
|
|
476
478
|
return this.computeClipOpts;
|
|
477
479
|
},
|
|
478
480
|
computeClipOpts() {
|
|
479
|
-
return Object.assign({}, getConfig().table.clipConfig, this.clipConfig);
|
|
481
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.clipConfig, true), this.clipConfig);
|
|
480
482
|
},
|
|
481
483
|
fnrOpts() {
|
|
482
484
|
return this.computeFNROpts;
|
|
483
485
|
},
|
|
484
486
|
computeFNROpts() {
|
|
485
|
-
return Object.assign({}, getConfig().table.fnrConfig, this.fnrConfig);
|
|
486
|
-
},
|
|
487
|
-
hasTip() {
|
|
488
|
-
return true;
|
|
489
|
-
// return VXETable._tooltip
|
|
487
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.fnrConfig, true), this.fnrConfig);
|
|
490
488
|
},
|
|
491
489
|
headerCtxMenu() {
|
|
492
490
|
const headerOpts = this.ctxMenuOpts.header;
|
|
@@ -516,49 +514,49 @@ export default {
|
|
|
516
514
|
return this.computeMenuOpts;
|
|
517
515
|
},
|
|
518
516
|
computeMenuOpts() {
|
|
519
|
-
return Object.assign({}, getConfig().table.menuConfig, this.contextMenu, this.menuConfig);
|
|
517
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.menuConfig, true), this.contextMenu, this.menuConfig);
|
|
520
518
|
},
|
|
521
519
|
exportOpts() {
|
|
522
520
|
return this.computeExportOpts;
|
|
523
521
|
},
|
|
524
522
|
computeExportOpts() {
|
|
525
|
-
return Object.assign({}, getConfig().table.exportConfig, this.exportConfig);
|
|
523
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.exportConfig, true), this.exportConfig);
|
|
526
524
|
},
|
|
527
525
|
importOpts() {
|
|
528
526
|
return this.computeImportOpts;
|
|
529
527
|
},
|
|
530
528
|
computeImportOpts() {
|
|
531
|
-
return Object.assign({}, getConfig().table.importConfig, this.importConfig);
|
|
529
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.importConfig, true), this.importConfig);
|
|
532
530
|
},
|
|
533
531
|
printOpts() {
|
|
534
532
|
return this.computePrintOpts;
|
|
535
533
|
},
|
|
536
534
|
computePrintOpts() {
|
|
537
|
-
return Object.assign({}, getConfig().table.printConfig, this.printConfig);
|
|
535
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.printConfig, true), this.printConfig);
|
|
538
536
|
},
|
|
539
537
|
expandOpts() {
|
|
540
538
|
return this.computeExpandOpts;
|
|
541
539
|
},
|
|
542
540
|
computeExpandOpts() {
|
|
543
|
-
return Object.assign({}, getConfig().table.expandConfig, this.expandConfig);
|
|
541
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.expandConfig, true), this.expandConfig);
|
|
544
542
|
},
|
|
545
543
|
treeOpts() {
|
|
546
544
|
return this.computeTreeOpts;
|
|
547
545
|
},
|
|
548
546
|
computeTreeOpts() {
|
|
549
|
-
return Object.assign({}, getConfig().table.treeConfig, this.treeConfig);
|
|
547
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.treeConfig, true), this.treeConfig);
|
|
550
548
|
},
|
|
551
549
|
emptyOpts() {
|
|
552
550
|
return this.computeEmptyOpts;
|
|
553
551
|
},
|
|
554
552
|
computeEmptyOpts() {
|
|
555
|
-
return Object.assign({}, getConfig().table.emptyRender, this.emptyRender);
|
|
553
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.emptyRender, true), this.emptyRender);
|
|
556
554
|
},
|
|
557
555
|
loadingOpts() {
|
|
558
556
|
return this.computeLoadingOpts;
|
|
559
557
|
},
|
|
560
558
|
computeLoadingOpts() {
|
|
561
|
-
return Object.assign({}, getConfig().table.loadingConfig, this.loadingConfig);
|
|
559
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.loadingConfig, true), this.loadingConfig);
|
|
562
560
|
},
|
|
563
561
|
cellOffsetWidth() {
|
|
564
562
|
return this.border ? Math.max(2, Math.ceil(this.scrollbarWidth / this.tableColumn.length)) : 1;
|
|
@@ -567,7 +565,7 @@ export default {
|
|
|
567
565
|
return this.computeCustomOpts;
|
|
568
566
|
},
|
|
569
567
|
computeCustomOpts() {
|
|
570
|
-
return Object.assign({}, getConfig().table.customConfig, this.customConfig);
|
|
568
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.customConfig, true), this.customConfig);
|
|
571
569
|
},
|
|
572
570
|
autoWidthColumnList() {
|
|
573
571
|
const { tableColumn, visibleColumn } = this;
|
|
@@ -620,8 +618,12 @@ export default {
|
|
|
620
618
|
return true;
|
|
621
619
|
}
|
|
622
620
|
return false;
|
|
623
|
-
}
|
|
624
|
-
|
|
621
|
+
},
|
|
622
|
+
tabsResizeFlag() {
|
|
623
|
+
const $xeTable = this;
|
|
624
|
+
const $xeTabs = $xeTable.$xeTabs;
|
|
625
|
+
return $xeTabs ? $xeTabs.reactData.resizeFlag : null;
|
|
626
|
+
} }),
|
|
625
627
|
watch: {
|
|
626
628
|
data(value) {
|
|
627
629
|
const { inited, initStatus } = this;
|
|
@@ -681,6 +683,9 @@ export default {
|
|
|
681
683
|
});
|
|
682
684
|
}
|
|
683
685
|
},
|
|
686
|
+
tabsResizeFlag() {
|
|
687
|
+
this.handleGlobalResizeEvent();
|
|
688
|
+
},
|
|
684
689
|
mergeCells(value) {
|
|
685
690
|
this.clearMergeCells();
|
|
686
691
|
this.$nextTick(() => this.setMergeCells(value));
|
|
@@ -739,7 +744,7 @@ export default {
|
|
|
739
744
|
fullColumnIdData: {},
|
|
740
745
|
fullColumnFieldData: {}
|
|
741
746
|
});
|
|
742
|
-
if (process.env.
|
|
747
|
+
if (process.env.NODE_ENV === 'development') {
|
|
743
748
|
if (this.rowId) {
|
|
744
749
|
warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField']);
|
|
745
750
|
}
|
|
@@ -788,7 +793,7 @@ export default {
|
|
|
788
793
|
warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)).join(',') || XEUtils.keys(exportOpts._typeMaps).join(',')]);
|
|
789
794
|
}
|
|
790
795
|
}
|
|
791
|
-
if (process.env.
|
|
796
|
+
if (process.env.NODE_ENV === 'development') {
|
|
792
797
|
const customOpts = this.customOpts;
|
|
793
798
|
if (!this.id && this.customConfig && (customOpts.storage === true || (customOpts.storage && customOpts.storage.resizable) || (customOpts.storage && customOpts.storage.visible))) {
|
|
794
799
|
errLog('vxe.error.reqProp', ['id']);
|
|
@@ -828,7 +833,7 @@ export default {
|
|
|
828
833
|
}
|
|
829
834
|
}
|
|
830
835
|
// v4 中只支持对象类型
|
|
831
|
-
if (process.env.
|
|
836
|
+
if (process.env.NODE_ENV === 'development') {
|
|
832
837
|
// 在 v3.0 中废弃 context-menu
|
|
833
838
|
if (this.contextMenu) {
|
|
834
839
|
warnLog('vxe.error.delProp', ['context-menu', 'menu-config']);
|
|
@@ -871,7 +876,7 @@ export default {
|
|
|
871
876
|
}
|
|
872
877
|
}
|
|
873
878
|
// 检查是否有安装需要的模块
|
|
874
|
-
if (process.env.
|
|
879
|
+
if (process.env.NODE_ENV === 'development') {
|
|
875
880
|
if (this.editConfig && !this._insert) {
|
|
876
881
|
errLog('vxe.error.reqModule', ['Edit']);
|
|
877
882
|
}
|
|
@@ -917,7 +922,9 @@ export default {
|
|
|
917
922
|
this.preventEvent(null, 'created');
|
|
918
923
|
},
|
|
919
924
|
mounted() {
|
|
920
|
-
|
|
925
|
+
const $xeTable = this;
|
|
926
|
+
const props = $xeTable;
|
|
927
|
+
if (process.env.NODE_ENV === 'development') {
|
|
921
928
|
const { $listeners } = this;
|
|
922
929
|
if (!this.menuConfig && ($listeners['menu-click'] || $listeners['cell-menu'] || $listeners['header-cell-menu'] || $listeners['footer-cell-menu'])) {
|
|
923
930
|
warnLog('vxe.error.reqProp', ['menu-config']);
|
|
@@ -926,12 +933,32 @@ export default {
|
|
|
926
933
|
warnLog('vxe.error.reqProp', ['tooltip-config']);
|
|
927
934
|
}
|
|
928
935
|
}
|
|
936
|
+
if (process.env.NODE_ENV === 'development') {
|
|
937
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
938
|
+
const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading');
|
|
939
|
+
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
|
|
940
|
+
$xeTable.$nextTick(() => {
|
|
941
|
+
if (props.loading) {
|
|
942
|
+
if (!VxeUILoadingComponent) {
|
|
943
|
+
errLog('vxe.error.reqComp', ['vxe-loading']);
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
if ((props.showOverflow === true || props.showOverflow === 'tooltip') ||
|
|
947
|
+
(props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip') ||
|
|
948
|
+
(props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip') ||
|
|
949
|
+
props.tooltipConfig || props.editRules) {
|
|
950
|
+
if (!VxeUITooltipComponent) {
|
|
951
|
+
errLog('vxe.error.reqComp', ['vxe-tooltip']);
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
});
|
|
955
|
+
}
|
|
929
956
|
if (this.autoResize) {
|
|
930
957
|
const handleWrapperResize = this.resizeOpts.refreshDelay ? XEUtils.throttle(() => this.recalculate(true), this.resizeOpts.refreshDelay, { leading: true, trailing: true }) : null;
|
|
931
958
|
const resizeObserver = globalResize.create(handleWrapperResize
|
|
932
959
|
? () => {
|
|
933
960
|
if (this.autoResize) {
|
|
934
|
-
|
|
961
|
+
handleWrapperResize();
|
|
935
962
|
}
|
|
936
963
|
}
|
|
937
964
|
: () => {
|
|
@@ -973,9 +1000,13 @@ export default {
|
|
|
973
1000
|
this.preventEvent(null, 'destroyed');
|
|
974
1001
|
},
|
|
975
1002
|
render(h) {
|
|
976
|
-
|
|
1003
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
1004
|
+
const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading');
|
|
1005
|
+
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
|
|
1006
|
+
const { _e, $scopedSlots, tId, isCalcColumn, tableData, tableColumn, tableGroupColumn, isGroup, loading, stripe, showHeader, height, tableBorder, treeOpts, treeConfig, mouseConfig, mouseOpts, computeSize, validOpts, showFooter, overflowX, overflowY, scrollXLoad, scrollYLoad, scrollbarHeight, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, validTipOpts, initStore, columnStore, filterStore, customStore, ctxMenuStore, ctxMenuOpts, footerTableData, columnOpts, rowOpts, checkboxOpts, loadingOpts, editRules } = this;
|
|
977
1007
|
const { leftList, rightList } = columnStore;
|
|
978
1008
|
const currLoading = this._isLoading || loading;
|
|
1009
|
+
const vSize = computeSize;
|
|
979
1010
|
return h('div', {
|
|
980
1011
|
class: ['vxe-table', 'vxe-table--render-default', `tid_${tId}`, vSize ? `size--${vSize}` : '', `border--${tableBorder}`, {
|
|
981
1012
|
[`valid-msg--${validOpts.msgMode}`]: !!editRules,
|
|
@@ -995,6 +1026,7 @@ export default {
|
|
|
995
1026
|
'is--fixed-left': leftList.length,
|
|
996
1027
|
'is--fixed-right': rightList.length,
|
|
997
1028
|
'is--animat': !!this.animat,
|
|
1029
|
+
'is--padding': this.padding,
|
|
998
1030
|
'is--round': this.round,
|
|
999
1031
|
'is--stripe': !treeConfig && stripe,
|
|
1000
1032
|
'is--loading': currLoading,
|
|
@@ -1108,14 +1140,16 @@ export default {
|
|
|
1108
1140
|
/**
|
|
1109
1141
|
* 加载中
|
|
1110
1142
|
*/
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1143
|
+
VxeUILoadingComponent
|
|
1144
|
+
? h(VxeUILoadingComponent, {
|
|
1145
|
+
class: 'vxe-table--loading',
|
|
1146
|
+
props: {
|
|
1147
|
+
value: currLoading,
|
|
1148
|
+
icon: loadingOpts.icon,
|
|
1149
|
+
text: loadingOpts.text
|
|
1150
|
+
}
|
|
1151
|
+
}, this.callSlot($scopedSlots.loading, {}, h))
|
|
1152
|
+
: _e(),
|
|
1119
1153
|
/**
|
|
1120
1154
|
* 自定义列
|
|
1121
1155
|
*/
|
|
@@ -1176,8 +1210,8 @@ export default {
|
|
|
1176
1210
|
/**
|
|
1177
1211
|
* 通用提示
|
|
1178
1212
|
*/
|
|
1179
|
-
|
|
1180
|
-
? h(
|
|
1213
|
+
VxeUITooltipComponent
|
|
1214
|
+
? h(VxeUITooltipComponent, {
|
|
1181
1215
|
ref: 'commTip',
|
|
1182
1216
|
props: {
|
|
1183
1217
|
isArrow: false,
|
|
@@ -1188,8 +1222,8 @@ export default {
|
|
|
1188
1222
|
/**
|
|
1189
1223
|
* 工具提示
|
|
1190
1224
|
*/
|
|
1191
|
-
|
|
1192
|
-
? h(
|
|
1225
|
+
VxeUITooltipComponent
|
|
1226
|
+
? h(VxeUITooltipComponent, {
|
|
1193
1227
|
ref: 'tooltip',
|
|
1194
1228
|
props: Object.assign({}, this.tipConfig, this.tooltipStore.currOpts)
|
|
1195
1229
|
})
|
|
@@ -1197,8 +1231,8 @@ export default {
|
|
|
1197
1231
|
/**
|
|
1198
1232
|
* 校验提示
|
|
1199
1233
|
*/
|
|
1200
|
-
|
|
1201
|
-
? h(
|
|
1234
|
+
VxeUITooltipComponent && this.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip')
|
|
1235
|
+
? h(VxeUITooltipComponent, {
|
|
1202
1236
|
ref: 'validTip',
|
|
1203
1237
|
class: [{
|
|
1204
1238
|
'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete'
|
package/es/table/src/util.js
CHANGED
|
@@ -135,7 +135,7 @@ export function assembleColumn(_vm) {
|
|
|
135
135
|
const groupConfig = $xecolumn ? $xecolumn.columnConfig : null;
|
|
136
136
|
columnConfig.slots = _vm.$scopedSlots;
|
|
137
137
|
if (groupConfig) {
|
|
138
|
-
if (process.env.
|
|
138
|
+
if (process.env.NODE_ENV === 'development') {
|
|
139
139
|
if ($xecolumn.$options._componentTag === 'vxe-table-column') {
|
|
140
140
|
errLog('vxe.error.groupTag', [`<vxe-table-colgroup title=${$xecolumn.title} ...>`, `<vxe-table-column title=${$xecolumn.title} ...>`]);
|
|
141
141
|
}
|
|
@@ -251,7 +251,8 @@ function countTreeExpand(prevRow, params) {
|
|
|
251
251
|
return count;
|
|
252
252
|
}
|
|
253
253
|
export function getOffsetSize($xetable) {
|
|
254
|
-
|
|
254
|
+
const vSize = $xetable.computeSize;
|
|
255
|
+
return lineOffsetSizes[vSize] || 0;
|
|
255
256
|
}
|
|
256
257
|
export function calcTreeLine(params, items, rIndex) {
|
|
257
258
|
const { $table } = params;
|