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
|
@@ -23,6 +23,8 @@ import keyboardMixin from '../module/keyboard/mixin'
|
|
|
23
23
|
import validatorMixin from '../module/validator/mixin'
|
|
24
24
|
import customMixin from '../module/custom/mixin'
|
|
25
25
|
|
|
26
|
+
import type { VxeLoadingComponent, VxeTooltipComponent, VxeTabsConstructor, VxeTabsPrivateMethods } from 'vxe-pc-ui'
|
|
27
|
+
|
|
26
28
|
const { getConfig, getI18n, renderer, globalResize, globalEvents, globalMixins } = VxeUI
|
|
27
29
|
|
|
28
30
|
/**
|
|
@@ -124,6 +126,9 @@ export default {
|
|
|
124
126
|
}
|
|
125
127
|
},
|
|
126
128
|
inject: {
|
|
129
|
+
$xeTabs: {
|
|
130
|
+
default: null
|
|
131
|
+
},
|
|
127
132
|
$xeGrid: {
|
|
128
133
|
default: null
|
|
129
134
|
},
|
|
@@ -351,6 +356,9 @@ export default {
|
|
|
351
356
|
}
|
|
352
357
|
},
|
|
353
358
|
computed: {
|
|
359
|
+
...({} as {
|
|
360
|
+
$xeTabs(): (VxeTabsConstructor & VxeTabsPrivateMethods) | null
|
|
361
|
+
}),
|
|
354
362
|
tableId () {
|
|
355
363
|
const { id } = this
|
|
356
364
|
if (id) {
|
|
@@ -365,19 +373,19 @@ export default {
|
|
|
365
373
|
return this.computeValidOpts
|
|
366
374
|
},
|
|
367
375
|
computeValidOpts () {
|
|
368
|
-
return Object.assign({ message: 'default' }, getConfig().table.validConfig, this.validConfig)
|
|
376
|
+
return Object.assign({ message: 'default' }, XEUtils.clone(getConfig().table.validConfig, true), this.validConfig)
|
|
369
377
|
},
|
|
370
378
|
sXOpts () {
|
|
371
379
|
return this.computeSXOpts
|
|
372
380
|
},
|
|
373
381
|
computeSXOpts () {
|
|
374
|
-
return Object.assign({}, getConfig().table.scrollX, this.scrollX)
|
|
382
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.scrollX, true), this.scrollX)
|
|
375
383
|
},
|
|
376
384
|
sYOpts () {
|
|
377
385
|
return this.computeSYOpts
|
|
378
386
|
},
|
|
379
387
|
computeSYOpts () {
|
|
380
|
-
return Object.assign({}, getConfig().table.scrollY, this.scrollY)
|
|
388
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.scrollY, true), this.scrollY)
|
|
381
389
|
},
|
|
382
390
|
rowHeightMaps () {
|
|
383
391
|
return {
|
|
@@ -391,49 +399,49 @@ export default {
|
|
|
391
399
|
return this.computeColumnOpts
|
|
392
400
|
},
|
|
393
401
|
computeColumnOpts () {
|
|
394
|
-
return Object.assign({}, getConfig().table.columnConfig, this.columnConfig)
|
|
402
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.columnConfig, true), this.columnConfig)
|
|
395
403
|
},
|
|
396
404
|
rowOpts () {
|
|
397
405
|
return this.computeRowOpts
|
|
398
406
|
},
|
|
399
407
|
computeRowOpts () {
|
|
400
|
-
return Object.assign({}, getConfig().table.rowConfig, this.rowConfig)
|
|
408
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.rowConfig, true), this.rowConfig)
|
|
401
409
|
},
|
|
402
410
|
resizeOpts () {
|
|
403
411
|
return this.computeResizeOpts
|
|
404
412
|
},
|
|
405
413
|
computeResizeOpts () {
|
|
406
|
-
return Object.assign({}, getConfig().table.resizeConfig, this.resizeConfig)
|
|
414
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.resizeConfig, true), this.resizeConfig)
|
|
407
415
|
},
|
|
408
416
|
resizableOpts () {
|
|
409
417
|
return this.computeResizableOpts
|
|
410
418
|
},
|
|
411
419
|
computeResizableOpts () {
|
|
412
|
-
return Object.assign({}, getConfig().table.resizableConfig, this.resizableConfig)
|
|
420
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.resizableConfig, true), this.resizableConfig)
|
|
413
421
|
},
|
|
414
422
|
seqOpts () {
|
|
415
423
|
return this.computeSeqOpts
|
|
416
424
|
},
|
|
417
425
|
computeSeqOpts () {
|
|
418
|
-
return Object.assign({ startIndex: 0 }, getConfig().table.seqConfig, this.seqConfig)
|
|
426
|
+
return Object.assign({ startIndex: 0 }, XEUtils.clone(getConfig().table.seqConfig, true), this.seqConfig)
|
|
419
427
|
},
|
|
420
428
|
radioOpts () {
|
|
421
429
|
return this.computeRadioOpts
|
|
422
430
|
},
|
|
423
431
|
computeRadioOpts () {
|
|
424
|
-
return Object.assign({}, getConfig().table.radioConfig, this.radioConfig)
|
|
432
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.radioConfig, true), this.radioConfig)
|
|
425
433
|
},
|
|
426
434
|
checkboxOpts () {
|
|
427
435
|
return this.computeCheckboxOpts
|
|
428
436
|
},
|
|
429
437
|
computeCheckboxOpts () {
|
|
430
|
-
return Object.assign({}, getConfig().table.checkboxConfig, this.checkboxConfig)
|
|
438
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.checkboxConfig, true), this.checkboxConfig)
|
|
431
439
|
},
|
|
432
440
|
tooltipOpts () {
|
|
433
441
|
return this.computeTooltipOpts
|
|
434
442
|
},
|
|
435
443
|
computeTooltipOpts () {
|
|
436
|
-
return Object.assign({}, getConfig().tooltip, getConfig().table.tooltipConfig, this.tooltipConfig)
|
|
444
|
+
return Object.assign({}, XEUtils.clone(getConfig().tooltip, true), XEUtils.clone(getConfig().table.tooltipConfig, true), this.tooltipConfig)
|
|
437
445
|
},
|
|
438
446
|
tipConfig () {
|
|
439
447
|
return { ...this.tooltipOpts }
|
|
@@ -445,53 +453,49 @@ export default {
|
|
|
445
453
|
return this.computeEditOpts
|
|
446
454
|
},
|
|
447
455
|
computeEditOpts () {
|
|
448
|
-
return Object.assign({}, getConfig().table.editConfig, this.editConfig)
|
|
456
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.editConfig, true), this.editConfig)
|
|
449
457
|
},
|
|
450
458
|
sortOpts () {
|
|
451
459
|
return this.computeSortOpts
|
|
452
460
|
},
|
|
453
461
|
computeSortOpts () {
|
|
454
|
-
return Object.assign({ orders: ['asc', 'desc', null] }, getConfig().table.sortConfig, this.sortConfig)
|
|
462
|
+
return Object.assign({ orders: ['asc', 'desc', null] }, XEUtils.clone(getConfig().table.sortConfig, true), this.sortConfig)
|
|
455
463
|
},
|
|
456
464
|
filterOpts () {
|
|
457
465
|
return this.computeFilterOpts
|
|
458
466
|
},
|
|
459
467
|
computeFilterOpts () {
|
|
460
|
-
return Object.assign({}, getConfig().table.filterConfig, this.filterConfig)
|
|
468
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.filterConfig, true), this.filterConfig)
|
|
461
469
|
},
|
|
462
470
|
mouseOpts () {
|
|
463
471
|
return this.computeMouseOpts
|
|
464
472
|
},
|
|
465
473
|
computeMouseOpts () {
|
|
466
|
-
return Object.assign({}, getConfig().table.mouseConfig, this.mouseConfig)
|
|
474
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.mouseConfig, true), this.mouseConfig)
|
|
467
475
|
},
|
|
468
476
|
areaOpts () {
|
|
469
477
|
return this.computeAreaOpts
|
|
470
478
|
},
|
|
471
479
|
computeAreaOpts () {
|
|
472
|
-
return Object.assign({}, getConfig().table.areaConfig, this.areaConfig)
|
|
480
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.areaConfig, true), this.areaConfig)
|
|
473
481
|
},
|
|
474
482
|
keyboardOpts () {
|
|
475
483
|
return this.computeKeyboardOpts
|
|
476
484
|
},
|
|
477
485
|
computeKeyboardOpts () {
|
|
478
|
-
return Object.assign({}, getConfig().table.keyboardConfig, this.keyboardConfig)
|
|
486
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.keyboardConfig, true), this.keyboardConfig)
|
|
479
487
|
},
|
|
480
488
|
clipOpts () {
|
|
481
489
|
return this.computeClipOpts
|
|
482
490
|
},
|
|
483
491
|
computeClipOpts () {
|
|
484
|
-
return Object.assign({}, getConfig().table.clipConfig, this.clipConfig)
|
|
492
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.clipConfig, true), this.clipConfig)
|
|
485
493
|
},
|
|
486
494
|
fnrOpts () {
|
|
487
495
|
return this.computeFNROpts
|
|
488
496
|
},
|
|
489
497
|
computeFNROpts () {
|
|
490
|
-
return Object.assign({}, getConfig().table.fnrConfig, this.fnrConfig)
|
|
491
|
-
},
|
|
492
|
-
hasTip () {
|
|
493
|
-
return true
|
|
494
|
-
// return VXETable._tooltip
|
|
498
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.fnrConfig, true), this.fnrConfig)
|
|
495
499
|
},
|
|
496
500
|
headerCtxMenu () {
|
|
497
501
|
const headerOpts = this.ctxMenuOpts.header
|
|
@@ -521,49 +525,49 @@ export default {
|
|
|
521
525
|
return this.computeMenuOpts
|
|
522
526
|
},
|
|
523
527
|
computeMenuOpts () {
|
|
524
|
-
return Object.assign({}, getConfig().table.menuConfig, this.contextMenu, this.menuConfig)
|
|
528
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.menuConfig, true), this.contextMenu, this.menuConfig)
|
|
525
529
|
},
|
|
526
530
|
exportOpts () {
|
|
527
531
|
return this.computeExportOpts
|
|
528
532
|
},
|
|
529
533
|
computeExportOpts () {
|
|
530
|
-
return Object.assign({}, getConfig().table.exportConfig, this.exportConfig)
|
|
534
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.exportConfig, true), this.exportConfig)
|
|
531
535
|
},
|
|
532
536
|
importOpts () {
|
|
533
537
|
return this.computeImportOpts
|
|
534
538
|
},
|
|
535
539
|
computeImportOpts () {
|
|
536
|
-
return Object.assign({}, getConfig().table.importConfig, this.importConfig)
|
|
540
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.importConfig, true), this.importConfig)
|
|
537
541
|
},
|
|
538
542
|
printOpts () {
|
|
539
543
|
return this.computePrintOpts
|
|
540
544
|
},
|
|
541
545
|
computePrintOpts () {
|
|
542
|
-
return Object.assign({}, getConfig().table.printConfig, this.printConfig)
|
|
546
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.printConfig, true), this.printConfig)
|
|
543
547
|
},
|
|
544
548
|
expandOpts () {
|
|
545
549
|
return this.computeExpandOpts
|
|
546
550
|
},
|
|
547
551
|
computeExpandOpts () {
|
|
548
|
-
return Object.assign({}, getConfig().table.expandConfig, this.expandConfig)
|
|
552
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.expandConfig, true), this.expandConfig)
|
|
549
553
|
},
|
|
550
554
|
treeOpts () {
|
|
551
555
|
return this.computeTreeOpts
|
|
552
556
|
},
|
|
553
557
|
computeTreeOpts () {
|
|
554
|
-
return Object.assign({}, getConfig().table.treeConfig, this.treeConfig)
|
|
558
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.treeConfig, true), this.treeConfig)
|
|
555
559
|
},
|
|
556
560
|
emptyOpts () {
|
|
557
561
|
return this.computeEmptyOpts
|
|
558
562
|
},
|
|
559
563
|
computeEmptyOpts () {
|
|
560
|
-
return Object.assign({}, getConfig().table.emptyRender, this.emptyRender)
|
|
564
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.emptyRender, true), this.emptyRender)
|
|
561
565
|
},
|
|
562
566
|
loadingOpts () {
|
|
563
567
|
return this.computeLoadingOpts
|
|
564
568
|
},
|
|
565
569
|
computeLoadingOpts () {
|
|
566
|
-
return Object.assign({}, getConfig().table.loadingConfig, this.loadingConfig)
|
|
570
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.loadingConfig, true), this.loadingConfig)
|
|
567
571
|
},
|
|
568
572
|
cellOffsetWidth () {
|
|
569
573
|
return this.border ? Math.max(2, Math.ceil(this.scrollbarWidth / this.tableColumn.length)) : 1
|
|
@@ -572,7 +576,7 @@ export default {
|
|
|
572
576
|
return this.computeCustomOpts
|
|
573
577
|
},
|
|
574
578
|
computeCustomOpts () {
|
|
575
|
-
return Object.assign({}, getConfig().table.customConfig, this.customConfig)
|
|
579
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.customConfig, true), this.customConfig)
|
|
576
580
|
},
|
|
577
581
|
autoWidthColumnList () {
|
|
578
582
|
const { tableColumn, visibleColumn } = this
|
|
@@ -625,6 +629,12 @@ export default {
|
|
|
625
629
|
return true
|
|
626
630
|
}
|
|
627
631
|
return false
|
|
632
|
+
},
|
|
633
|
+
tabsResizeFlag () {
|
|
634
|
+
const $xeTable = this
|
|
635
|
+
const $xeTabs = $xeTable.$xeTabs
|
|
636
|
+
|
|
637
|
+
return $xeTabs ? $xeTabs.reactData.resizeFlag : null
|
|
628
638
|
}
|
|
629
639
|
} as any,
|
|
630
640
|
watch: {
|
|
@@ -686,6 +696,9 @@ export default {
|
|
|
686
696
|
})
|
|
687
697
|
}
|
|
688
698
|
},
|
|
699
|
+
tabsResizeFlag () {
|
|
700
|
+
this.handleGlobalResizeEvent()
|
|
701
|
+
},
|
|
689
702
|
mergeCells (value: any) {
|
|
690
703
|
this.clearMergeCells()
|
|
691
704
|
this.$nextTick(() => this.setMergeCells(value))
|
|
@@ -745,7 +758,7 @@ export default {
|
|
|
745
758
|
fullColumnFieldData: {}
|
|
746
759
|
})
|
|
747
760
|
|
|
748
|
-
if (process.env.
|
|
761
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
749
762
|
if (this.rowId) {
|
|
750
763
|
warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField'])
|
|
751
764
|
}
|
|
@@ -795,7 +808,7 @@ export default {
|
|
|
795
808
|
}
|
|
796
809
|
}
|
|
797
810
|
|
|
798
|
-
if (process.env.
|
|
811
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
799
812
|
const customOpts = this.customOpts
|
|
800
813
|
if (!this.id && this.customConfig && (customOpts.storage === true || (customOpts.storage && customOpts.storage.resizable) || (customOpts.storage && customOpts.storage.visible))) {
|
|
801
814
|
errLog('vxe.error.reqProp', ['id'])
|
|
@@ -836,7 +849,7 @@ export default {
|
|
|
836
849
|
}
|
|
837
850
|
|
|
838
851
|
// v4 中只支持对象类型
|
|
839
|
-
if (process.env.
|
|
852
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
840
853
|
// 在 v3.0 中废弃 context-menu
|
|
841
854
|
if (this.contextMenu) {
|
|
842
855
|
warnLog('vxe.error.delProp', ['context-menu', 'menu-config'])
|
|
@@ -880,7 +893,7 @@ export default {
|
|
|
880
893
|
}
|
|
881
894
|
|
|
882
895
|
// 检查是否有安装需要的模块
|
|
883
|
-
if (process.env.
|
|
896
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
884
897
|
if (this.editConfig && !this._insert) {
|
|
885
898
|
errLog('vxe.error.reqModule', ['Edit'])
|
|
886
899
|
}
|
|
@@ -927,7 +940,10 @@ export default {
|
|
|
927
940
|
this.preventEvent(null, 'created')
|
|
928
941
|
},
|
|
929
942
|
mounted () {
|
|
930
|
-
|
|
943
|
+
const $xeTable = this
|
|
944
|
+
const props = $xeTable
|
|
945
|
+
|
|
946
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
931
947
|
const { $listeners } = this
|
|
932
948
|
if (!this.menuConfig && ($listeners['menu-click'] || $listeners['cell-menu'] || $listeners['header-cell-menu'] || $listeners['footer-cell-menu'])) {
|
|
933
949
|
warnLog('vxe.error.reqProp', ['menu-config'])
|
|
@@ -936,12 +952,34 @@ export default {
|
|
|
936
952
|
warnLog('vxe.error.reqProp', ['tooltip-config'])
|
|
937
953
|
}
|
|
938
954
|
}
|
|
955
|
+
|
|
956
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
957
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
958
|
+
const VxeUILoadingComponent = VxeUI.getComponent<VxeLoadingComponent>('VxeLoading')
|
|
959
|
+
const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
|
|
960
|
+
|
|
961
|
+
$xeTable.$nextTick(() => {
|
|
962
|
+
if (props.loading) {
|
|
963
|
+
if (!VxeUILoadingComponent) {
|
|
964
|
+
errLog('vxe.error.reqComp', ['vxe-loading'])
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
if ((props.showOverflow === true || props.showOverflow === 'tooltip') ||
|
|
968
|
+
(props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip') ||
|
|
969
|
+
(props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip') ||
|
|
970
|
+
props.tooltipConfig || props.editRules) {
|
|
971
|
+
if (!VxeUITooltipComponent) {
|
|
972
|
+
errLog('vxe.error.reqComp', ['vxe-tooltip'])
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
})
|
|
976
|
+
}
|
|
939
977
|
if (this.autoResize) {
|
|
940
978
|
const handleWrapperResize = this.resizeOpts.refreshDelay ? XEUtils.throttle(() => this.recalculate(true), this.resizeOpts.refreshDelay, { leading: true, trailing: true }) : null
|
|
941
979
|
const resizeObserver = globalResize.create(handleWrapperResize
|
|
942
980
|
? () => {
|
|
943
981
|
if (this.autoResize) {
|
|
944
|
-
|
|
982
|
+
handleWrapperResize()
|
|
945
983
|
}
|
|
946
984
|
}
|
|
947
985
|
: () => {
|
|
@@ -983,6 +1021,10 @@ export default {
|
|
|
983
1021
|
this.preventEvent(null, 'destroyed')
|
|
984
1022
|
},
|
|
985
1023
|
render (h: CreateElement) {
|
|
1024
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
1025
|
+
const VxeUILoadingComponent = VxeUI.getComponent<VxeLoadingComponent>('VxeLoading')
|
|
1026
|
+
const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
|
|
1027
|
+
|
|
986
1028
|
const {
|
|
987
1029
|
_e,
|
|
988
1030
|
$scopedSlots,
|
|
@@ -1001,7 +1043,7 @@ export default {
|
|
|
1001
1043
|
treeConfig,
|
|
1002
1044
|
mouseConfig,
|
|
1003
1045
|
mouseOpts,
|
|
1004
|
-
|
|
1046
|
+
computeSize,
|
|
1005
1047
|
validOpts,
|
|
1006
1048
|
showFooter,
|
|
1007
1049
|
overflowX,
|
|
@@ -1021,7 +1063,6 @@ export default {
|
|
|
1021
1063
|
ctxMenuStore,
|
|
1022
1064
|
ctxMenuOpts,
|
|
1023
1065
|
footerTableData,
|
|
1024
|
-
hasTip,
|
|
1025
1066
|
columnOpts,
|
|
1026
1067
|
rowOpts,
|
|
1027
1068
|
checkboxOpts,
|
|
@@ -1030,6 +1071,7 @@ export default {
|
|
|
1030
1071
|
} = this
|
|
1031
1072
|
const { leftList, rightList } = columnStore
|
|
1032
1073
|
const currLoading = this._isLoading || loading
|
|
1074
|
+
const vSize = computeSize
|
|
1033
1075
|
return h('div', {
|
|
1034
1076
|
class: ['vxe-table', 'vxe-table--render-default', `tid_${tId}`, vSize ? `size--${vSize}` : '', `border--${tableBorder}`, {
|
|
1035
1077
|
[`valid-msg--${validOpts.msgMode}`]: !!editRules,
|
|
@@ -1049,6 +1091,7 @@ export default {
|
|
|
1049
1091
|
'is--fixed-left': leftList.length,
|
|
1050
1092
|
'is--fixed-right': rightList.length,
|
|
1051
1093
|
'is--animat': !!this.animat,
|
|
1094
|
+
'is--padding': this.padding,
|
|
1052
1095
|
'is--round': this.round,
|
|
1053
1096
|
'is--stripe': !treeConfig && stripe,
|
|
1054
1097
|
'is--loading': currLoading,
|
|
@@ -1162,14 +1205,16 @@ export default {
|
|
|
1162
1205
|
/**
|
|
1163
1206
|
* 加载中
|
|
1164
1207
|
*/
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1208
|
+
VxeUILoadingComponent
|
|
1209
|
+
? h(VxeUILoadingComponent, {
|
|
1210
|
+
class: 'vxe-table--loading',
|
|
1211
|
+
props: {
|
|
1212
|
+
value: currLoading,
|
|
1213
|
+
icon: loadingOpts.icon,
|
|
1214
|
+
text: loadingOpts.text
|
|
1215
|
+
}
|
|
1216
|
+
}, this.callSlot($scopedSlots.loading, {}, h))
|
|
1217
|
+
: _e(),
|
|
1173
1218
|
/**
|
|
1174
1219
|
* 自定义列
|
|
1175
1220
|
*/
|
|
@@ -1230,8 +1275,8 @@ export default {
|
|
|
1230
1275
|
/**
|
|
1231
1276
|
* 通用提示
|
|
1232
1277
|
*/
|
|
1233
|
-
|
|
1234
|
-
? h(
|
|
1278
|
+
VxeUITooltipComponent
|
|
1279
|
+
? h(VxeUITooltipComponent, {
|
|
1235
1280
|
ref: 'commTip',
|
|
1236
1281
|
props: {
|
|
1237
1282
|
isArrow: false,
|
|
@@ -1242,8 +1287,8 @@ export default {
|
|
|
1242
1287
|
/**
|
|
1243
1288
|
* 工具提示
|
|
1244
1289
|
*/
|
|
1245
|
-
|
|
1246
|
-
? h(
|
|
1290
|
+
VxeUITooltipComponent
|
|
1291
|
+
? h(VxeUITooltipComponent, {
|
|
1247
1292
|
ref: 'tooltip',
|
|
1248
1293
|
props: Object.assign({}, this.tipConfig, this.tooltipStore.currOpts)
|
|
1249
1294
|
})
|
|
@@ -1251,8 +1296,8 @@ export default {
|
|
|
1251
1296
|
/**
|
|
1252
1297
|
* 校验提示
|
|
1253
1298
|
*/
|
|
1254
|
-
|
|
1255
|
-
? h(
|
|
1299
|
+
VxeUITooltipComponent && this.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip')
|
|
1300
|
+
? h(VxeUITooltipComponent, {
|
|
1256
1301
|
ref: 'validTip',
|
|
1257
1302
|
class: [{
|
|
1258
1303
|
'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete'
|
|
@@ -151,7 +151,7 @@ export function assembleColumn (_vm: any) {
|
|
|
151
151
|
const groupConfig = $xecolumn ? $xecolumn.columnConfig : null
|
|
152
152
|
columnConfig.slots = _vm.$scopedSlots
|
|
153
153
|
if (groupConfig) {
|
|
154
|
-
if (process.env.
|
|
154
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
155
155
|
if ($xecolumn.$options._componentTag === 'vxe-table-column') {
|
|
156
156
|
errLog('vxe.error.groupTag', [`<vxe-table-colgroup title=${$xecolumn.title} ...>`, `<vxe-table-column title=${$xecolumn.title} ...>`])
|
|
157
157
|
} else if ($xecolumn.$options._componentTag === 'vxe-column') {
|
|
@@ -271,7 +271,8 @@ function countTreeExpand (prevRow: any, params: any) {
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
export function getOffsetSize ($xetable: any) {
|
|
274
|
-
|
|
274
|
+
const vSize = $xetable.computeSize
|
|
275
|
+
return lineOffsetSizes[vSize] || 0
|
|
275
276
|
}
|
|
276
277
|
|
|
277
278
|
export function calcTreeLine (params: any, items: any, rIndex: any) {
|
|
@@ -71,37 +71,37 @@ export default defineVxeComponent({
|
|
|
71
71
|
const $xeToolbar = this
|
|
72
72
|
const props = $xeToolbar
|
|
73
73
|
|
|
74
|
-
return Object.assign({}, getConfig().toolbar.refresh, props.refresh) as VxeToolbarPropTypes.RefreshOpts
|
|
74
|
+
return Object.assign({}, XEUtils.clone(getConfig().toolbar.refresh, true), props.refresh) as VxeToolbarPropTypes.RefreshOpts
|
|
75
75
|
},
|
|
76
76
|
computeImportOpts () {
|
|
77
77
|
const $xeToolbar = this
|
|
78
78
|
const props = $xeToolbar
|
|
79
79
|
|
|
80
|
-
return Object.assign({}, getConfig().toolbar.import, props.import) as VxeToolbarPropTypes.ImportOpts
|
|
80
|
+
return Object.assign({}, XEUtils.clone(getConfig().toolbar.import, true), props.import) as VxeToolbarPropTypes.ImportOpts
|
|
81
81
|
},
|
|
82
82
|
computeExportOpts () {
|
|
83
83
|
const $xeToolbar = this
|
|
84
84
|
const props = $xeToolbar
|
|
85
85
|
|
|
86
|
-
return Object.assign({}, getConfig().toolbar.export, props.export) as VxeToolbarPropTypes.ExportOpts
|
|
86
|
+
return Object.assign({}, XEUtils.clone(getConfig().toolbar.export, true), props.export) as VxeToolbarPropTypes.ExportOpts
|
|
87
87
|
},
|
|
88
88
|
computePrintOpts () {
|
|
89
89
|
const $xeToolbar = this
|
|
90
90
|
const props = $xeToolbar
|
|
91
91
|
|
|
92
|
-
return Object.assign({}, getConfig().toolbar.print, props.print) as VxeToolbarPropTypes.PrintOpts
|
|
92
|
+
return Object.assign({}, XEUtils.clone(getConfig().toolbar.print, true), props.print) as VxeToolbarPropTypes.PrintOpts
|
|
93
93
|
},
|
|
94
94
|
computeZoomOpts () {
|
|
95
95
|
const $xeToolbar = this
|
|
96
96
|
const props = $xeToolbar
|
|
97
97
|
|
|
98
|
-
return Object.assign({}, getConfig().toolbar.zoom, props.zoom) as VxeToolbarPropTypes.ZoomOpts
|
|
98
|
+
return Object.assign({}, XEUtils.clone(getConfig().toolbar.zoom, true), props.zoom) as VxeToolbarPropTypes.ZoomOpts
|
|
99
99
|
},
|
|
100
100
|
computeCustomOpts () {
|
|
101
101
|
const $xeToolbar = this
|
|
102
102
|
const props = $xeToolbar
|
|
103
103
|
|
|
104
|
-
return Object.assign({}, getConfig().toolbar.custom, props.custom) as VxeToolbarPropTypes.CustomOpts
|
|
104
|
+
return Object.assign({}, XEUtils.clone(getConfig().toolbar.custom, true), props.custom) as VxeToolbarPropTypes.CustomOpts
|
|
105
105
|
},
|
|
106
106
|
computeTableCustomOpts (this: any) {
|
|
107
107
|
const $xeToolbar = this
|
|
@@ -357,7 +357,12 @@ export default defineVxeComponent({
|
|
|
357
357
|
circle: child.circle,
|
|
358
358
|
round: child.round,
|
|
359
359
|
status: child.status,
|
|
360
|
-
content: child.name
|
|
360
|
+
content: child.name,
|
|
361
|
+
title: child.title,
|
|
362
|
+
routerLink: child.routerLink,
|
|
363
|
+
permissionCode: child.permissionCode,
|
|
364
|
+
prefixTooltip: child.prefixTooltip,
|
|
365
|
+
suffixTooltip: child.suffixTooltip
|
|
361
366
|
},
|
|
362
367
|
on: {
|
|
363
368
|
click: ({ $event }: any) => isBtn ? $xeToolbar.btnEvent($event, child) : $xeToolbar.tolEvent($event, child)
|
|
@@ -411,7 +416,11 @@ export default defineVxeComponent({
|
|
|
411
416
|
round: item.round,
|
|
412
417
|
status: item.status,
|
|
413
418
|
content: item.name,
|
|
419
|
+
title: item.title,
|
|
420
|
+
routerLink: item.routerLink,
|
|
414
421
|
permissionCode: item.permissionCode,
|
|
422
|
+
prefixTooltip: item.prefixTooltip,
|
|
423
|
+
suffixTooltip: item.suffixTooltip,
|
|
415
424
|
destroyOnClose: item.destroyOnClose,
|
|
416
425
|
placement: item.placement,
|
|
417
426
|
transfer: item.transfer
|
|
@@ -479,6 +488,11 @@ export default defineVxeComponent({
|
|
|
479
488
|
round: item.round,
|
|
480
489
|
status: item.status,
|
|
481
490
|
content: item.name,
|
|
491
|
+
title: item.title,
|
|
492
|
+
routerLink: item.routerLink,
|
|
493
|
+
permissionCode: item.permissionCode,
|
|
494
|
+
prefixTooltip: item.prefixTooltip,
|
|
495
|
+
suffixTooltip: item.suffixTooltip,
|
|
482
496
|
destroyOnClose: item.destroyOnClose,
|
|
483
497
|
placement: item.placement,
|
|
484
498
|
transfer: item.transfer
|
package/packages/ui/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ VxeUI.setConfig({
|
|
|
17
17
|
animat: true,
|
|
18
18
|
delayHover: 250,
|
|
19
19
|
autoResize: true,
|
|
20
|
+
padding: true,
|
|
20
21
|
minHeight: 144,
|
|
21
22
|
// keepSource: false,
|
|
22
23
|
// showOverflow: null,
|
|
@@ -108,7 +109,8 @@ VxeUI.setConfig({
|
|
|
108
109
|
editConfig: {
|
|
109
110
|
// mode: 'cell',
|
|
110
111
|
showIcon: true,
|
|
111
|
-
showAsterisk: true
|
|
112
|
+
showAsterisk: true,
|
|
113
|
+
autoFocus: true
|
|
112
114
|
},
|
|
113
115
|
importConfig: {
|
|
114
116
|
_typeMaps: {
|