vxe-table 3.9.0-rc.8 → 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 -8
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/hu-HU.d.ts +2 -0
- package/es/locale/lang/hu-HU.js +497 -501
- package/es/locale/lang/ja-JP.js +2 -8
- package/es/locale/lang/ko-KR.d.ts +2 -0
- package/es/locale/lang/ko-KR.js +2 -8
- package/es/locale/lang/pt-BR.js +2 -8
- package/es/locale/lang/ru-RU.d.ts +2 -0
- package/es/locale/lang/ru-RU.js +497 -503
- package/es/locale/lang/uk-UA.d.ts +2 -0
- package/es/locale/lang/uk-UA.js +667 -0
- package/es/locale/lang/vi-VN.js +2 -8
- package/es/locale/lang/zh-CHT.d.ts +2 -0
- package/es/locale/lang/zh-CHT.js +667 -0
- package/es/locale/lang/zh-CN.js +2 -8
- package/es/locale/lang/zh-HK.js +2 -2
- package/es/locale/lang/zh-MO.js +2 -2
- package/es/locale/lang/zh-TC.js +2 -673
- package/es/locale/lang/zh-TW.js +2 -2
- 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 +175 -60
- 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 +9212 -17224
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -8
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -8
- 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.d.ts +2 -0
- package/lib/locale/lang/hu-HU.js +497 -501
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +687 -0
- package/lib/locale/lang/ja-JP.js +2 -8
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -8
- package/lib/locale/lang/ko-KR.d.ts +2 -0
- package/lib/locale/lang/ko-KR.js +2 -8
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +687 -0
- package/lib/locale/lang/pt-BR.js +2 -8
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -8
- package/lib/locale/lang/ru-RU.d.ts +2 -0
- package/lib/locale/lang/ru-RU.js +497 -503
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +687 -0
- package/lib/locale/lang/uk-UA.d.ts +2 -0
- package/lib/locale/lang/uk-UA.js +673 -0
- package/lib/locale/lang/uk-UA.min.js +1 -0
- package/lib/locale/lang/uk-UA.umd.js +687 -0
- package/lib/locale/lang/vi-VN.js +2 -8
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.d.ts +2 -0
- package/lib/locale/lang/zh-CHT.js +673 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -0
- package/lib/locale/lang/zh-CHT.umd.js +687 -0
- package/lib/locale/lang/zh-CN.js +2 -8
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -8
- package/lib/locale/lang/zh-HK.js +2 -2
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +7 -677
- package/lib/locale/lang/zh-MO.js +2 -2
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +7 -677
- package/lib/locale/lang/zh-TC.js +3 -673
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +7 -677
- package/lib/locale/lang/zh-TW.js +2 -2
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +7 -677
- 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 +519 -397
- 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 -10
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +497 -503
- package/packages/locale/lang/ja-JP.ts +2 -10
- package/packages/locale/lang/ko-KR.ts +2 -10
- package/packages/locale/lang/pt-BR.ts +2 -10
- package/packages/locale/lang/ru-RU.ts +497 -505
- package/packages/locale/lang/uk-UA.ts +667 -0
- package/packages/locale/lang/vi-VN.ts +2 -10
- package/packages/locale/lang/zh-CHT.ts +667 -0
- package/packages/locale/lang/zh-CN.ts +2 -10
- package/packages/locale/lang/zh-HK.ts +2 -2
- package/packages/locale/lang/zh-MO.ts +2 -2
- package/packages/locale/lang/zh-TC.ts +2 -674
- package/packages/locale/lang/zh-TW.ts +2 -2
- 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 +183 -57
- 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.1726318179195.ttf → iconfont.1728348263835.ttf} +0 -0
- /package/es/{iconfont.1726318179195.woff → iconfont.1728348263835.woff} +0 -0
- /package/es/{iconfont.1726318179195.woff2 → iconfont.1728348263835.woff2} +0 -0
- /package/lib/{iconfont.1726318179195.ttf → iconfont.1728348263835.ttf} +0 -0
- /package/lib/{iconfont.1726318179195.woff → iconfont.1728348263835.woff} +0 -0
- /package/lib/{iconfont.1726318179195.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)) {
|
|
@@ -357,13 +359,22 @@ export default {
|
|
|
357
359
|
return '';
|
|
358
360
|
},
|
|
359
361
|
validOpts() {
|
|
360
|
-
return
|
|
362
|
+
return this.computeValidOpts;
|
|
363
|
+
},
|
|
364
|
+
computeValidOpts() {
|
|
365
|
+
return Object.assign({ message: 'default' }, XEUtils.clone(getConfig().table.validConfig, true), this.validConfig);
|
|
361
366
|
},
|
|
362
367
|
sXOpts() {
|
|
363
|
-
return
|
|
368
|
+
return this.computeSXOpts;
|
|
369
|
+
},
|
|
370
|
+
computeSXOpts() {
|
|
371
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.scrollX, true), this.scrollX);
|
|
364
372
|
},
|
|
365
373
|
sYOpts() {
|
|
366
|
-
return
|
|
374
|
+
return this.computeSYOpts;
|
|
375
|
+
},
|
|
376
|
+
computeSYOpts() {
|
|
377
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.scrollY, true), this.scrollY);
|
|
367
378
|
},
|
|
368
379
|
rowHeightMaps() {
|
|
369
380
|
return {
|
|
@@ -374,28 +385,52 @@ export default {
|
|
|
374
385
|
};
|
|
375
386
|
},
|
|
376
387
|
columnOpts() {
|
|
377
|
-
return
|
|
388
|
+
return this.computeColumnOpts;
|
|
389
|
+
},
|
|
390
|
+
computeColumnOpts() {
|
|
391
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.columnConfig, true), this.columnConfig);
|
|
378
392
|
},
|
|
379
393
|
rowOpts() {
|
|
380
|
-
return
|
|
394
|
+
return this.computeRowOpts;
|
|
395
|
+
},
|
|
396
|
+
computeRowOpts() {
|
|
397
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.rowConfig, true), this.rowConfig);
|
|
381
398
|
},
|
|
382
399
|
resizeOpts() {
|
|
383
|
-
return
|
|
400
|
+
return this.computeResizeOpts;
|
|
401
|
+
},
|
|
402
|
+
computeResizeOpts() {
|
|
403
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.resizeConfig, true), this.resizeConfig);
|
|
384
404
|
},
|
|
385
405
|
resizableOpts() {
|
|
386
|
-
return
|
|
406
|
+
return this.computeResizableOpts;
|
|
407
|
+
},
|
|
408
|
+
computeResizableOpts() {
|
|
409
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.resizableConfig, true), this.resizableConfig);
|
|
387
410
|
},
|
|
388
411
|
seqOpts() {
|
|
389
|
-
return
|
|
412
|
+
return this.computeSeqOpts;
|
|
413
|
+
},
|
|
414
|
+
computeSeqOpts() {
|
|
415
|
+
return Object.assign({ startIndex: 0 }, XEUtils.clone(getConfig().table.seqConfig, true), this.seqConfig);
|
|
390
416
|
},
|
|
391
417
|
radioOpts() {
|
|
392
|
-
return
|
|
418
|
+
return this.computeRadioOpts;
|
|
419
|
+
},
|
|
420
|
+
computeRadioOpts() {
|
|
421
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.radioConfig, true), this.radioConfig);
|
|
393
422
|
},
|
|
394
423
|
checkboxOpts() {
|
|
395
|
-
return
|
|
424
|
+
return this.computeCheckboxOpts;
|
|
425
|
+
},
|
|
426
|
+
computeCheckboxOpts() {
|
|
427
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.checkboxConfig, true), this.checkboxConfig);
|
|
396
428
|
},
|
|
397
429
|
tooltipOpts() {
|
|
398
|
-
return
|
|
430
|
+
return this.computeTooltipOpts;
|
|
431
|
+
},
|
|
432
|
+
computeTooltipOpts() {
|
|
433
|
+
return Object.assign({}, XEUtils.clone(getConfig().tooltip, true), XEUtils.clone(getConfig().table.tooltipConfig, true), this.tooltipConfig);
|
|
399
434
|
},
|
|
400
435
|
tipConfig() {
|
|
401
436
|
return Object.assign({}, this.tooltipOpts);
|
|
@@ -404,32 +439,52 @@ export default {
|
|
|
404
439
|
return Object.assign({ isArrow: false }, this.tooltipOpts);
|
|
405
440
|
},
|
|
406
441
|
editOpts() {
|
|
407
|
-
return
|
|
442
|
+
return this.computeEditOpts;
|
|
443
|
+
},
|
|
444
|
+
computeEditOpts() {
|
|
445
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.editConfig, true), this.editConfig);
|
|
408
446
|
},
|
|
409
447
|
sortOpts() {
|
|
410
|
-
return
|
|
448
|
+
return this.computeSortOpts;
|
|
449
|
+
},
|
|
450
|
+
computeSortOpts() {
|
|
451
|
+
return Object.assign({ orders: ['asc', 'desc', null] }, XEUtils.clone(getConfig().table.sortConfig, true), this.sortConfig);
|
|
411
452
|
},
|
|
412
453
|
filterOpts() {
|
|
413
|
-
return
|
|
454
|
+
return this.computeFilterOpts;
|
|
455
|
+
},
|
|
456
|
+
computeFilterOpts() {
|
|
457
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.filterConfig, true), this.filterConfig);
|
|
414
458
|
},
|
|
415
459
|
mouseOpts() {
|
|
416
|
-
return
|
|
460
|
+
return this.computeMouseOpts;
|
|
461
|
+
},
|
|
462
|
+
computeMouseOpts() {
|
|
463
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.mouseConfig, true), this.mouseConfig);
|
|
417
464
|
},
|
|
418
465
|
areaOpts() {
|
|
419
|
-
return
|
|
466
|
+
return this.computeAreaOpts;
|
|
467
|
+
},
|
|
468
|
+
computeAreaOpts() {
|
|
469
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.areaConfig, true), this.areaConfig);
|
|
420
470
|
},
|
|
421
471
|
keyboardOpts() {
|
|
422
|
-
return
|
|
472
|
+
return this.computeKeyboardOpts;
|
|
473
|
+
},
|
|
474
|
+
computeKeyboardOpts() {
|
|
475
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.keyboardConfig, true), this.keyboardConfig);
|
|
423
476
|
},
|
|
424
477
|
clipOpts() {
|
|
425
|
-
return
|
|
478
|
+
return this.computeClipOpts;
|
|
479
|
+
},
|
|
480
|
+
computeClipOpts() {
|
|
481
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.clipConfig, true), this.clipConfig);
|
|
426
482
|
},
|
|
427
483
|
fnrOpts() {
|
|
428
|
-
return
|
|
484
|
+
return this.computeFNROpts;
|
|
429
485
|
},
|
|
430
|
-
|
|
431
|
-
return true;
|
|
432
|
-
// return VXETable._tooltip
|
|
486
|
+
computeFNROpts() {
|
|
487
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.fnrConfig, true), this.fnrConfig);
|
|
433
488
|
},
|
|
434
489
|
headerCtxMenu() {
|
|
435
490
|
const headerOpts = this.ctxMenuOpts.header;
|
|
@@ -446,9 +501,6 @@ export default {
|
|
|
446
501
|
isCtxMenu() {
|
|
447
502
|
return !!((this.contextMenu || this.menuConfig) && isEnableConf(this.ctxMenuOpts) && (this.headerCtxMenu.length || this.bodyCtxMenu.length || this.footerCtxMenu.length));
|
|
448
503
|
},
|
|
449
|
-
ctxMenuOpts() {
|
|
450
|
-
return Object.assign({}, getConfig().table.menuConfig, this.contextMenu, this.menuConfig);
|
|
451
|
-
},
|
|
452
504
|
ctxMenuList() {
|
|
453
505
|
const rest = [];
|
|
454
506
|
this.ctxMenuStore.list.forEach((list) => {
|
|
@@ -458,36 +510,63 @@ export default {
|
|
|
458
510
|
});
|
|
459
511
|
return rest;
|
|
460
512
|
},
|
|
513
|
+
ctxMenuOpts() {
|
|
514
|
+
return this.computeMenuOpts;
|
|
515
|
+
},
|
|
516
|
+
computeMenuOpts() {
|
|
517
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.menuConfig, true), this.contextMenu, this.menuConfig);
|
|
518
|
+
},
|
|
461
519
|
exportOpts() {
|
|
462
|
-
return
|
|
520
|
+
return this.computeExportOpts;
|
|
521
|
+
},
|
|
522
|
+
computeExportOpts() {
|
|
523
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.exportConfig, true), this.exportConfig);
|
|
463
524
|
},
|
|
464
525
|
importOpts() {
|
|
465
|
-
return
|
|
526
|
+
return this.computeImportOpts;
|
|
527
|
+
},
|
|
528
|
+
computeImportOpts() {
|
|
529
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.importConfig, true), this.importConfig);
|
|
466
530
|
},
|
|
467
531
|
printOpts() {
|
|
468
|
-
return
|
|
532
|
+
return this.computePrintOpts;
|
|
533
|
+
},
|
|
534
|
+
computePrintOpts() {
|
|
535
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.printConfig, true), this.printConfig);
|
|
469
536
|
},
|
|
470
537
|
expandOpts() {
|
|
471
|
-
return
|
|
538
|
+
return this.computeExpandOpts;
|
|
539
|
+
},
|
|
540
|
+
computeExpandOpts() {
|
|
541
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.expandConfig, true), this.expandConfig);
|
|
472
542
|
},
|
|
473
543
|
treeOpts() {
|
|
474
|
-
return
|
|
544
|
+
return this.computeTreeOpts;
|
|
545
|
+
},
|
|
546
|
+
computeTreeOpts() {
|
|
547
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.treeConfig, true), this.treeConfig);
|
|
475
548
|
},
|
|
476
549
|
emptyOpts() {
|
|
477
|
-
return
|
|
550
|
+
return this.computeEmptyOpts;
|
|
551
|
+
},
|
|
552
|
+
computeEmptyOpts() {
|
|
553
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.emptyRender, true), this.emptyRender);
|
|
478
554
|
},
|
|
479
555
|
loadingOpts() {
|
|
480
|
-
return
|
|
556
|
+
return this.computeLoadingOpts;
|
|
557
|
+
},
|
|
558
|
+
computeLoadingOpts() {
|
|
559
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.loadingConfig, true), this.loadingConfig);
|
|
481
560
|
},
|
|
482
561
|
cellOffsetWidth() {
|
|
483
562
|
return this.border ? Math.max(2, Math.ceil(this.scrollbarWidth / this.tableColumn.length)) : 1;
|
|
484
563
|
},
|
|
485
|
-
computeCustomOpts() {
|
|
486
|
-
return Object.assign({}, getConfig().table.customConfig, this.customConfig);
|
|
487
|
-
},
|
|
488
564
|
customOpts() {
|
|
489
565
|
return this.computeCustomOpts;
|
|
490
566
|
},
|
|
567
|
+
computeCustomOpts() {
|
|
568
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.customConfig, true), this.customConfig);
|
|
569
|
+
},
|
|
491
570
|
autoWidthColumnList() {
|
|
492
571
|
const { tableColumn, visibleColumn } = this;
|
|
493
572
|
return tableColumn.length || visibleColumn.length ? visibleColumn.filter((column) => column.width === 'auto' || column.minWidth === 'auto') : [];
|
|
@@ -539,8 +618,12 @@ export default {
|
|
|
539
618
|
return true;
|
|
540
619
|
}
|
|
541
620
|
return false;
|
|
542
|
-
}
|
|
543
|
-
|
|
621
|
+
},
|
|
622
|
+
tabsResizeFlag() {
|
|
623
|
+
const $xeTable = this;
|
|
624
|
+
const $xeTabs = $xeTable.$xeTabs;
|
|
625
|
+
return $xeTabs ? $xeTabs.reactData.resizeFlag : null;
|
|
626
|
+
} }),
|
|
544
627
|
watch: {
|
|
545
628
|
data(value) {
|
|
546
629
|
const { inited, initStatus } = this;
|
|
@@ -600,6 +683,9 @@ export default {
|
|
|
600
683
|
});
|
|
601
684
|
}
|
|
602
685
|
},
|
|
686
|
+
tabsResizeFlag() {
|
|
687
|
+
this.handleGlobalResizeEvent();
|
|
688
|
+
},
|
|
603
689
|
mergeCells(value) {
|
|
604
690
|
this.clearMergeCells();
|
|
605
691
|
this.$nextTick(() => this.setMergeCells(value));
|
|
@@ -658,7 +744,7 @@ export default {
|
|
|
658
744
|
fullColumnIdData: {},
|
|
659
745
|
fullColumnFieldData: {}
|
|
660
746
|
});
|
|
661
|
-
if (process.env.
|
|
747
|
+
if (process.env.NODE_ENV === 'development') {
|
|
662
748
|
if (this.rowId) {
|
|
663
749
|
warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField']);
|
|
664
750
|
}
|
|
@@ -707,7 +793,7 @@ export default {
|
|
|
707
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(',')]);
|
|
708
794
|
}
|
|
709
795
|
}
|
|
710
|
-
if (process.env.
|
|
796
|
+
if (process.env.NODE_ENV === 'development') {
|
|
711
797
|
const customOpts = this.customOpts;
|
|
712
798
|
if (!this.id && this.customConfig && (customOpts.storage === true || (customOpts.storage && customOpts.storage.resizable) || (customOpts.storage && customOpts.storage.visible))) {
|
|
713
799
|
errLog('vxe.error.reqProp', ['id']);
|
|
@@ -747,7 +833,7 @@ export default {
|
|
|
747
833
|
}
|
|
748
834
|
}
|
|
749
835
|
// v4 中只支持对象类型
|
|
750
|
-
if (process.env.
|
|
836
|
+
if (process.env.NODE_ENV === 'development') {
|
|
751
837
|
// 在 v3.0 中废弃 context-menu
|
|
752
838
|
if (this.contextMenu) {
|
|
753
839
|
warnLog('vxe.error.delProp', ['context-menu', 'menu-config']);
|
|
@@ -790,7 +876,7 @@ export default {
|
|
|
790
876
|
}
|
|
791
877
|
}
|
|
792
878
|
// 检查是否有安装需要的模块
|
|
793
|
-
if (process.env.
|
|
879
|
+
if (process.env.NODE_ENV === 'development') {
|
|
794
880
|
if (this.editConfig && !this._insert) {
|
|
795
881
|
errLog('vxe.error.reqModule', ['Edit']);
|
|
796
882
|
}
|
|
@@ -836,7 +922,9 @@ export default {
|
|
|
836
922
|
this.preventEvent(null, 'created');
|
|
837
923
|
},
|
|
838
924
|
mounted() {
|
|
839
|
-
|
|
925
|
+
const $xeTable = this;
|
|
926
|
+
const props = $xeTable;
|
|
927
|
+
if (process.env.NODE_ENV === 'development') {
|
|
840
928
|
const { $listeners } = this;
|
|
841
929
|
if (!this.menuConfig && ($listeners['menu-click'] || $listeners['cell-menu'] || $listeners['header-cell-menu'] || $listeners['footer-cell-menu'])) {
|
|
842
930
|
warnLog('vxe.error.reqProp', ['menu-config']);
|
|
@@ -845,12 +933,32 @@ export default {
|
|
|
845
933
|
warnLog('vxe.error.reqProp', ['tooltip-config']);
|
|
846
934
|
}
|
|
847
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
|
+
}
|
|
848
956
|
if (this.autoResize) {
|
|
849
957
|
const handleWrapperResize = this.resizeOpts.refreshDelay ? XEUtils.throttle(() => this.recalculate(true), this.resizeOpts.refreshDelay, { leading: true, trailing: true }) : null;
|
|
850
958
|
const resizeObserver = globalResize.create(handleWrapperResize
|
|
851
959
|
? () => {
|
|
852
960
|
if (this.autoResize) {
|
|
853
|
-
|
|
961
|
+
handleWrapperResize();
|
|
854
962
|
}
|
|
855
963
|
}
|
|
856
964
|
: () => {
|
|
@@ -892,9 +1000,13 @@ export default {
|
|
|
892
1000
|
this.preventEvent(null, 'destroyed');
|
|
893
1001
|
},
|
|
894
1002
|
render(h) {
|
|
895
|
-
|
|
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;
|
|
896
1007
|
const { leftList, rightList } = columnStore;
|
|
897
1008
|
const currLoading = this._isLoading || loading;
|
|
1009
|
+
const vSize = computeSize;
|
|
898
1010
|
return h('div', {
|
|
899
1011
|
class: ['vxe-table', 'vxe-table--render-default', `tid_${tId}`, vSize ? `size--${vSize}` : '', `border--${tableBorder}`, {
|
|
900
1012
|
[`valid-msg--${validOpts.msgMode}`]: !!editRules,
|
|
@@ -914,6 +1026,7 @@ export default {
|
|
|
914
1026
|
'is--fixed-left': leftList.length,
|
|
915
1027
|
'is--fixed-right': rightList.length,
|
|
916
1028
|
'is--animat': !!this.animat,
|
|
1029
|
+
'is--padding': this.padding,
|
|
917
1030
|
'is--round': this.round,
|
|
918
1031
|
'is--stripe': !treeConfig && stripe,
|
|
919
1032
|
'is--loading': currLoading,
|
|
@@ -1027,14 +1140,16 @@ export default {
|
|
|
1027
1140
|
/**
|
|
1028
1141
|
* 加载中
|
|
1029
1142
|
*/
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
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(),
|
|
1038
1153
|
/**
|
|
1039
1154
|
* 自定义列
|
|
1040
1155
|
*/
|
|
@@ -1095,8 +1210,8 @@ export default {
|
|
|
1095
1210
|
/**
|
|
1096
1211
|
* 通用提示
|
|
1097
1212
|
*/
|
|
1098
|
-
|
|
1099
|
-
? h(
|
|
1213
|
+
VxeUITooltipComponent
|
|
1214
|
+
? h(VxeUITooltipComponent, {
|
|
1100
1215
|
ref: 'commTip',
|
|
1101
1216
|
props: {
|
|
1102
1217
|
isArrow: false,
|
|
@@ -1107,8 +1222,8 @@ export default {
|
|
|
1107
1222
|
/**
|
|
1108
1223
|
* 工具提示
|
|
1109
1224
|
*/
|
|
1110
|
-
|
|
1111
|
-
? h(
|
|
1225
|
+
VxeUITooltipComponent
|
|
1226
|
+
? h(VxeUITooltipComponent, {
|
|
1112
1227
|
ref: 'tooltip',
|
|
1113
1228
|
props: Object.assign({}, this.tipConfig, this.tooltipStore.currOpts)
|
|
1114
1229
|
})
|
|
@@ -1116,8 +1231,8 @@ export default {
|
|
|
1116
1231
|
/**
|
|
1117
1232
|
* 校验提示
|
|
1118
1233
|
*/
|
|
1119
|
-
|
|
1120
|
-
? h(
|
|
1234
|
+
VxeUITooltipComponent && this.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip')
|
|
1235
|
+
? h(VxeUITooltipComponent, {
|
|
1121
1236
|
ref: 'validTip',
|
|
1122
1237
|
class: [{
|
|
1123
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;
|