vxe-table 3.9.0-rc.2 → 3.9.0-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/grid/src/grid.js +120 -66
- 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/index.js +29 -3
- 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 +24 -5
- 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 +23 -38
- package/es/table/src/body.js +1 -0
- package/es/table/src/columnInfo.js +3 -3
- package/es/table/src/methods.js +48 -40
- package/es/table/src/props.js +65 -15
- package/es/table/src/table.js +161 -55
- package/es/table/src/util.js +3 -2
- package/es/table/style.css +37 -23
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +21 -7
- package/es/ui/index.js +5 -4
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/vn.js +24 -1
- package/es/vxe-table/style.css +37 -23
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +115 -68
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +632 -330
- 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 +30 -3
- package/lib/table/index.min.js +1 -1
- package/lib/table/module/custom/panel.js +12 -7
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +32 -23
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/export-panel.js +31 -4
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +23 -5
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +11 -11
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +2 -2
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +4 -4
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +27 -41
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +1 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/columnInfo.js +3 -3
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +47 -40
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +7 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +147 -48
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +3 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +37 -23
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +21 -7
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +6 -5
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/ui/src/vn.js +26 -1
- package/lib/ui/src/vn.min.js +1 -1
- package/lib/vxe-table/style/style.css +37 -23
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- 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/index.ts +28 -5
- 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 +28 -5
- 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 +26 -40
- package/packages/table/src/body.ts +1 -0
- package/packages/table/src/columnInfo.ts +3 -3
- package/packages/table/src/methods.ts +47 -40
- package/packages/table/src/props.ts +68 -15
- package/packages/table/src/table.ts +167 -56
- package/packages/table/src/util.ts +3 -2
- package/packages/toolbar/src/toolbar.ts +21 -7
- package/packages/ui/index.ts +3 -2
- package/packages/ui/src/vn.ts +26 -1
- package/styles/components/table.scss +82 -17
- package/types/all.d.ts +2 -2
- /package/es/{iconfont.1726028471123.ttf → iconfont.1727868548661.ttf} +0 -0
- /package/es/{iconfont.1726028471123.woff → iconfont.1727868548661.woff} +0 -0
- /package/es/{iconfont.1726028471123.woff2 → iconfont.1727868548661.woff2} +0 -0
- /package/lib/{iconfont.1726028471123.ttf → iconfont.1727868548661.ttf} +0 -0
- /package/lib/{iconfont.1726028471123.woff → iconfont.1727868548661.woff} +0 -0
- /package/lib/{iconfont.1726028471123.woff2 → iconfont.1727868548661.woff2} +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { PropType } from 'vue'
|
|
1
2
|
import { VxeUI } from '../../ui'
|
|
2
3
|
|
|
4
|
+
import type { VxeTablePropTypes } from '../../../types'
|
|
5
|
+
|
|
3
6
|
const { getConfig } = VxeUI
|
|
4
7
|
|
|
5
8
|
export default {
|
|
@@ -10,39 +13,89 @@ export default {
|
|
|
10
13
|
// 表格的高度
|
|
11
14
|
height: [Number, String],
|
|
12
15
|
// 表格的最小高度
|
|
13
|
-
minHeight: {
|
|
16
|
+
minHeight: {
|
|
17
|
+
type: [Number, String],
|
|
18
|
+
default: () => getConfig().table.minHeight
|
|
19
|
+
},
|
|
14
20
|
// 表格的最大高度
|
|
15
21
|
maxHeight: [Number, String],
|
|
16
22
|
// 已废弃,被 column-config.resizable 替换
|
|
17
|
-
resizable: {
|
|
23
|
+
resizable: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: () => getConfig().table.resizable
|
|
26
|
+
},
|
|
18
27
|
// 是否带有斑马纹
|
|
19
|
-
stripe: {
|
|
28
|
+
stripe: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: () => getConfig().table.stripe
|
|
31
|
+
},
|
|
20
32
|
// 是否带有边框
|
|
21
|
-
border: {
|
|
33
|
+
border: {
|
|
34
|
+
type: [Boolean, String],
|
|
35
|
+
default: () => getConfig().table.border
|
|
36
|
+
},
|
|
37
|
+
// 单元格是否有边距
|
|
38
|
+
padding: {
|
|
39
|
+
type: Boolean as PropType<VxeTablePropTypes.Padding>,
|
|
40
|
+
default: () => getConfig().table.padding
|
|
41
|
+
},
|
|
22
42
|
// 是否圆角边框
|
|
23
|
-
round: {
|
|
43
|
+
round: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: () => getConfig().table.round
|
|
46
|
+
},
|
|
24
47
|
// 表格的尺寸
|
|
25
|
-
size: {
|
|
48
|
+
size: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: () => getConfig().table.size || getConfig().size
|
|
51
|
+
},
|
|
26
52
|
// 列的宽度是否自撑开(可能会被废弃的参数,不要使用)
|
|
27
|
-
fit: {
|
|
53
|
+
fit: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: () => getConfig().table.fit
|
|
56
|
+
},
|
|
28
57
|
// 表格是否加载中
|
|
29
58
|
loading: Boolean,
|
|
30
59
|
// 所有的列对其方式
|
|
31
|
-
align: {
|
|
60
|
+
align: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: () => getConfig().table.align
|
|
63
|
+
},
|
|
32
64
|
// 所有的表头列的对齐方式
|
|
33
|
-
headerAlign: {
|
|
65
|
+
headerAlign: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: () => getConfig().table.headerAlign
|
|
68
|
+
},
|
|
34
69
|
// 所有的表尾列的对齐方式
|
|
35
|
-
footerAlign: {
|
|
70
|
+
footerAlign: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: () => getConfig().table.footerAlign
|
|
73
|
+
},
|
|
36
74
|
// 是否显示表头
|
|
37
|
-
showHeader: {
|
|
75
|
+
showHeader: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: () => getConfig().table.showHeader
|
|
78
|
+
},
|
|
38
79
|
// 已废弃,被 row-config.isCurrent 替换
|
|
39
|
-
highlightCurrentRow: {
|
|
80
|
+
highlightCurrentRow: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: () => getConfig().table.highlightCurrentRow
|
|
83
|
+
},
|
|
40
84
|
// 已废弃,被 row-config.isHover 替换
|
|
41
|
-
highlightHoverRow: {
|
|
85
|
+
highlightHoverRow: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: () => getConfig().table.highlightHoverRow
|
|
88
|
+
},
|
|
42
89
|
// 已废弃,被 column-config.isCurrent 替换
|
|
43
|
-
highlightCurrentColumn: {
|
|
90
|
+
highlightCurrentColumn: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: () => getConfig().table.highlightCurrentColumn
|
|
93
|
+
},
|
|
44
94
|
// 已废弃,被 column-config.isHover 替换
|
|
45
|
-
highlightHoverColumn: {
|
|
95
|
+
highlightHoverColumn: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: () => getConfig().table.highlightHoverColumn
|
|
98
|
+
},
|
|
46
99
|
// 已废弃,直接删除
|
|
47
100
|
highlightCell: Boolean,
|
|
48
101
|
// 是否显示表尾合计
|
|
@@ -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 } from 'vxe-pc-ui'
|
|
27
|
+
|
|
26
28
|
const { getConfig, getI18n, renderer, globalResize, globalEvents, globalMixins } = VxeUI
|
|
27
29
|
|
|
28
30
|
/**
|
|
@@ -362,13 +364,22 @@ export default {
|
|
|
362
364
|
return ''
|
|
363
365
|
},
|
|
364
366
|
validOpts () {
|
|
365
|
-
return
|
|
367
|
+
return this.computeValidOpts
|
|
368
|
+
},
|
|
369
|
+
computeValidOpts () {
|
|
370
|
+
return Object.assign({ message: 'default' }, XEUtils.clone(getConfig().table.validConfig, true), this.validConfig)
|
|
366
371
|
},
|
|
367
372
|
sXOpts () {
|
|
368
|
-
return
|
|
373
|
+
return this.computeSXOpts
|
|
374
|
+
},
|
|
375
|
+
computeSXOpts () {
|
|
376
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.scrollX, true), this.scrollX)
|
|
369
377
|
},
|
|
370
378
|
sYOpts () {
|
|
371
|
-
return
|
|
379
|
+
return this.computeSYOpts
|
|
380
|
+
},
|
|
381
|
+
computeSYOpts () {
|
|
382
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.scrollY, true), this.scrollY)
|
|
372
383
|
},
|
|
373
384
|
rowHeightMaps () {
|
|
374
385
|
return {
|
|
@@ -379,28 +390,52 @@ export default {
|
|
|
379
390
|
}
|
|
380
391
|
},
|
|
381
392
|
columnOpts () {
|
|
382
|
-
return
|
|
393
|
+
return this.computeColumnOpts
|
|
394
|
+
},
|
|
395
|
+
computeColumnOpts () {
|
|
396
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.columnConfig, true), this.columnConfig)
|
|
383
397
|
},
|
|
384
398
|
rowOpts () {
|
|
385
|
-
return
|
|
399
|
+
return this.computeRowOpts
|
|
400
|
+
},
|
|
401
|
+
computeRowOpts () {
|
|
402
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.rowConfig, true), this.rowConfig)
|
|
386
403
|
},
|
|
387
404
|
resizeOpts () {
|
|
388
|
-
return
|
|
405
|
+
return this.computeResizeOpts
|
|
406
|
+
},
|
|
407
|
+
computeResizeOpts () {
|
|
408
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.resizeConfig, true), this.resizeConfig)
|
|
389
409
|
},
|
|
390
410
|
resizableOpts () {
|
|
391
|
-
return
|
|
411
|
+
return this.computeResizableOpts
|
|
412
|
+
},
|
|
413
|
+
computeResizableOpts () {
|
|
414
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.resizableConfig, true), this.resizableConfig)
|
|
392
415
|
},
|
|
393
416
|
seqOpts () {
|
|
394
|
-
return
|
|
417
|
+
return this.computeSeqOpts
|
|
418
|
+
},
|
|
419
|
+
computeSeqOpts () {
|
|
420
|
+
return Object.assign({ startIndex: 0 }, XEUtils.clone(getConfig().table.seqConfig, true), this.seqConfig)
|
|
395
421
|
},
|
|
396
422
|
radioOpts () {
|
|
397
|
-
return
|
|
423
|
+
return this.computeRadioOpts
|
|
424
|
+
},
|
|
425
|
+
computeRadioOpts () {
|
|
426
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.radioConfig, true), this.radioConfig)
|
|
398
427
|
},
|
|
399
428
|
checkboxOpts () {
|
|
400
|
-
return
|
|
429
|
+
return this.computeCheckboxOpts
|
|
430
|
+
},
|
|
431
|
+
computeCheckboxOpts () {
|
|
432
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.checkboxConfig, true), this.checkboxConfig)
|
|
401
433
|
},
|
|
402
434
|
tooltipOpts () {
|
|
403
|
-
return
|
|
435
|
+
return this.computeTooltipOpts
|
|
436
|
+
},
|
|
437
|
+
computeTooltipOpts () {
|
|
438
|
+
return Object.assign({}, XEUtils.clone(getConfig().tooltip, true), XEUtils.clone(getConfig().table.tooltipConfig, true), this.tooltipConfig)
|
|
404
439
|
},
|
|
405
440
|
tipConfig () {
|
|
406
441
|
return { ...this.tooltipOpts }
|
|
@@ -409,32 +444,52 @@ export default {
|
|
|
409
444
|
return Object.assign({ isArrow: false }, this.tooltipOpts)
|
|
410
445
|
},
|
|
411
446
|
editOpts () {
|
|
412
|
-
return
|
|
447
|
+
return this.computeEditOpts
|
|
448
|
+
},
|
|
449
|
+
computeEditOpts () {
|
|
450
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.editConfig, true), this.editConfig)
|
|
413
451
|
},
|
|
414
452
|
sortOpts () {
|
|
415
|
-
return
|
|
453
|
+
return this.computeSortOpts
|
|
454
|
+
},
|
|
455
|
+
computeSortOpts () {
|
|
456
|
+
return Object.assign({ orders: ['asc', 'desc', null] }, XEUtils.clone(getConfig().table.sortConfig, true), this.sortConfig)
|
|
416
457
|
},
|
|
417
458
|
filterOpts () {
|
|
418
|
-
return
|
|
459
|
+
return this.computeFilterOpts
|
|
460
|
+
},
|
|
461
|
+
computeFilterOpts () {
|
|
462
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.filterConfig, true), this.filterConfig)
|
|
419
463
|
},
|
|
420
464
|
mouseOpts () {
|
|
421
|
-
return
|
|
465
|
+
return this.computeMouseOpts
|
|
466
|
+
},
|
|
467
|
+
computeMouseOpts () {
|
|
468
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.mouseConfig, true), this.mouseConfig)
|
|
422
469
|
},
|
|
423
470
|
areaOpts () {
|
|
424
|
-
return
|
|
471
|
+
return this.computeAreaOpts
|
|
472
|
+
},
|
|
473
|
+
computeAreaOpts () {
|
|
474
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.areaConfig, true), this.areaConfig)
|
|
425
475
|
},
|
|
426
476
|
keyboardOpts () {
|
|
427
|
-
return
|
|
477
|
+
return this.computeKeyboardOpts
|
|
478
|
+
},
|
|
479
|
+
computeKeyboardOpts () {
|
|
480
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.keyboardConfig, true), this.keyboardConfig)
|
|
428
481
|
},
|
|
429
482
|
clipOpts () {
|
|
430
|
-
return
|
|
483
|
+
return this.computeClipOpts
|
|
484
|
+
},
|
|
485
|
+
computeClipOpts () {
|
|
486
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.clipConfig, true), this.clipConfig)
|
|
431
487
|
},
|
|
432
488
|
fnrOpts () {
|
|
433
|
-
return
|
|
489
|
+
return this.computeFNROpts
|
|
434
490
|
},
|
|
435
|
-
|
|
436
|
-
return true
|
|
437
|
-
// return VXETable._tooltip
|
|
491
|
+
computeFNROpts () {
|
|
492
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.fnrConfig, true), this.fnrConfig)
|
|
438
493
|
},
|
|
439
494
|
headerCtxMenu () {
|
|
440
495
|
const headerOpts = this.ctxMenuOpts.header
|
|
@@ -451,9 +506,6 @@ export default {
|
|
|
451
506
|
isCtxMenu () {
|
|
452
507
|
return !!((this.contextMenu || this.menuConfig) && isEnableConf(this.ctxMenuOpts) && (this.headerCtxMenu.length || this.bodyCtxMenu.length || this.footerCtxMenu.length))
|
|
453
508
|
},
|
|
454
|
-
ctxMenuOpts () {
|
|
455
|
-
return Object.assign({}, getConfig().table.menuConfig, this.contextMenu, this.menuConfig)
|
|
456
|
-
},
|
|
457
509
|
ctxMenuList () {
|
|
458
510
|
const rest: any[] = []
|
|
459
511
|
this.ctxMenuStore.list.forEach((list: any[]) => {
|
|
@@ -463,36 +515,63 @@ export default {
|
|
|
463
515
|
})
|
|
464
516
|
return rest
|
|
465
517
|
},
|
|
518
|
+
ctxMenuOpts () {
|
|
519
|
+
return this.computeMenuOpts
|
|
520
|
+
},
|
|
521
|
+
computeMenuOpts () {
|
|
522
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.menuConfig, true), this.contextMenu, this.menuConfig)
|
|
523
|
+
},
|
|
466
524
|
exportOpts () {
|
|
467
|
-
return
|
|
525
|
+
return this.computeExportOpts
|
|
526
|
+
},
|
|
527
|
+
computeExportOpts () {
|
|
528
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.exportConfig, true), this.exportConfig)
|
|
468
529
|
},
|
|
469
530
|
importOpts () {
|
|
470
|
-
return
|
|
531
|
+
return this.computeImportOpts
|
|
532
|
+
},
|
|
533
|
+
computeImportOpts () {
|
|
534
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.importConfig, true), this.importConfig)
|
|
471
535
|
},
|
|
472
536
|
printOpts () {
|
|
473
|
-
return
|
|
537
|
+
return this.computePrintOpts
|
|
538
|
+
},
|
|
539
|
+
computePrintOpts () {
|
|
540
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.printConfig, true), this.printConfig)
|
|
474
541
|
},
|
|
475
542
|
expandOpts () {
|
|
476
|
-
return
|
|
543
|
+
return this.computeExpandOpts
|
|
544
|
+
},
|
|
545
|
+
computeExpandOpts () {
|
|
546
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.expandConfig, true), this.expandConfig)
|
|
477
547
|
},
|
|
478
548
|
treeOpts () {
|
|
479
|
-
return
|
|
549
|
+
return this.computeTreeOpts
|
|
550
|
+
},
|
|
551
|
+
computeTreeOpts () {
|
|
552
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.treeConfig, true), this.treeConfig)
|
|
480
553
|
},
|
|
481
554
|
emptyOpts () {
|
|
482
|
-
return
|
|
555
|
+
return this.computeEmptyOpts
|
|
556
|
+
},
|
|
557
|
+
computeEmptyOpts () {
|
|
558
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.emptyRender, true), this.emptyRender)
|
|
483
559
|
},
|
|
484
560
|
loadingOpts () {
|
|
485
|
-
return
|
|
561
|
+
return this.computeLoadingOpts
|
|
562
|
+
},
|
|
563
|
+
computeLoadingOpts () {
|
|
564
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.loadingConfig, true), this.loadingConfig)
|
|
486
565
|
},
|
|
487
566
|
cellOffsetWidth () {
|
|
488
567
|
return this.border ? Math.max(2, Math.ceil(this.scrollbarWidth / this.tableColumn.length)) : 1
|
|
489
568
|
},
|
|
490
|
-
computeCustomOpts () {
|
|
491
|
-
return Object.assign({}, getConfig().table.customConfig, this.customConfig)
|
|
492
|
-
},
|
|
493
569
|
customOpts () {
|
|
494
570
|
return this.computeCustomOpts
|
|
495
571
|
},
|
|
572
|
+
computeCustomOpts () {
|
|
573
|
+
return Object.assign({}, XEUtils.clone(getConfig().table.customConfig, true), this.customConfig)
|
|
574
|
+
},
|
|
496
575
|
autoWidthColumnList () {
|
|
497
576
|
const { tableColumn, visibleColumn } = this
|
|
498
577
|
return tableColumn.length || visibleColumn.length ? visibleColumn.filter((column: any) => column.width === 'auto' || column.minWidth === 'auto') : []
|
|
@@ -664,7 +743,7 @@ export default {
|
|
|
664
743
|
fullColumnFieldData: {}
|
|
665
744
|
})
|
|
666
745
|
|
|
667
|
-
if (process.env.
|
|
746
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
668
747
|
if (this.rowId) {
|
|
669
748
|
warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField'])
|
|
670
749
|
}
|
|
@@ -714,7 +793,7 @@ export default {
|
|
|
714
793
|
}
|
|
715
794
|
}
|
|
716
795
|
|
|
717
|
-
if (process.env.
|
|
796
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
718
797
|
const customOpts = this.customOpts
|
|
719
798
|
if (!this.id && this.customConfig && (customOpts.storage === true || (customOpts.storage && customOpts.storage.resizable) || (customOpts.storage && customOpts.storage.visible))) {
|
|
720
799
|
errLog('vxe.error.reqProp', ['id'])
|
|
@@ -755,7 +834,7 @@ export default {
|
|
|
755
834
|
}
|
|
756
835
|
|
|
757
836
|
// v4 中只支持对象类型
|
|
758
|
-
if (process.env.
|
|
837
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
759
838
|
// 在 v3.0 中废弃 context-menu
|
|
760
839
|
if (this.contextMenu) {
|
|
761
840
|
warnLog('vxe.error.delProp', ['context-menu', 'menu-config'])
|
|
@@ -799,7 +878,7 @@ export default {
|
|
|
799
878
|
}
|
|
800
879
|
|
|
801
880
|
// 检查是否有安装需要的模块
|
|
802
|
-
if (process.env.
|
|
881
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
803
882
|
if (this.editConfig && !this._insert) {
|
|
804
883
|
errLog('vxe.error.reqModule', ['Edit'])
|
|
805
884
|
}
|
|
@@ -846,7 +925,10 @@ export default {
|
|
|
846
925
|
this.preventEvent(null, 'created')
|
|
847
926
|
},
|
|
848
927
|
mounted () {
|
|
849
|
-
|
|
928
|
+
const $xeTable = this
|
|
929
|
+
const props = $xeTable
|
|
930
|
+
|
|
931
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
850
932
|
const { $listeners } = this
|
|
851
933
|
if (!this.menuConfig && ($listeners['menu-click'] || $listeners['cell-menu'] || $listeners['header-cell-menu'] || $listeners['footer-cell-menu'])) {
|
|
852
934
|
warnLog('vxe.error.reqProp', ['menu-config'])
|
|
@@ -855,6 +937,28 @@ export default {
|
|
|
855
937
|
warnLog('vxe.error.reqProp', ['tooltip-config'])
|
|
856
938
|
}
|
|
857
939
|
}
|
|
940
|
+
|
|
941
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
942
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
943
|
+
const VxeUILoadingComponent = VxeUI.getComponent<VxeLoadingComponent>('VxeLoading')
|
|
944
|
+
const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
|
|
945
|
+
|
|
946
|
+
$xeTable.$nextTick(() => {
|
|
947
|
+
if (props.loading) {
|
|
948
|
+
if (!VxeUILoadingComponent) {
|
|
949
|
+
errLog('vxe.error.reqComp', ['vxe-loading'])
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
if ((props.showOverflow === true || props.showOverflow === 'tooltip') ||
|
|
953
|
+
(props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip') ||
|
|
954
|
+
(props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip') ||
|
|
955
|
+
props.tooltipConfig || props.editRules) {
|
|
956
|
+
if (!VxeUITooltipComponent) {
|
|
957
|
+
errLog('vxe.error.reqComp', ['vxe-tooltip'])
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
})
|
|
961
|
+
}
|
|
858
962
|
if (this.autoResize) {
|
|
859
963
|
const handleWrapperResize = this.resizeOpts.refreshDelay ? XEUtils.throttle(() => this.recalculate(true), this.resizeOpts.refreshDelay, { leading: true, trailing: true }) : null
|
|
860
964
|
const resizeObserver = globalResize.create(handleWrapperResize
|
|
@@ -902,6 +1006,10 @@ export default {
|
|
|
902
1006
|
this.preventEvent(null, 'destroyed')
|
|
903
1007
|
},
|
|
904
1008
|
render (h: CreateElement) {
|
|
1009
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
1010
|
+
const VxeUILoadingComponent = VxeUI.getComponent<VxeLoadingComponent>('VxeLoading')
|
|
1011
|
+
const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
|
|
1012
|
+
|
|
905
1013
|
const {
|
|
906
1014
|
_e,
|
|
907
1015
|
$scopedSlots,
|
|
@@ -920,7 +1028,7 @@ export default {
|
|
|
920
1028
|
treeConfig,
|
|
921
1029
|
mouseConfig,
|
|
922
1030
|
mouseOpts,
|
|
923
|
-
|
|
1031
|
+
computeSize,
|
|
924
1032
|
validOpts,
|
|
925
1033
|
showFooter,
|
|
926
1034
|
overflowX,
|
|
@@ -940,7 +1048,6 @@ export default {
|
|
|
940
1048
|
ctxMenuStore,
|
|
941
1049
|
ctxMenuOpts,
|
|
942
1050
|
footerTableData,
|
|
943
|
-
hasTip,
|
|
944
1051
|
columnOpts,
|
|
945
1052
|
rowOpts,
|
|
946
1053
|
checkboxOpts,
|
|
@@ -949,6 +1056,7 @@ export default {
|
|
|
949
1056
|
} = this
|
|
950
1057
|
const { leftList, rightList } = columnStore
|
|
951
1058
|
const currLoading = this._isLoading || loading
|
|
1059
|
+
const vSize = computeSize
|
|
952
1060
|
return h('div', {
|
|
953
1061
|
class: ['vxe-table', 'vxe-table--render-default', `tid_${tId}`, vSize ? `size--${vSize}` : '', `border--${tableBorder}`, {
|
|
954
1062
|
[`valid-msg--${validOpts.msgMode}`]: !!editRules,
|
|
@@ -968,6 +1076,7 @@ export default {
|
|
|
968
1076
|
'is--fixed-left': leftList.length,
|
|
969
1077
|
'is--fixed-right': rightList.length,
|
|
970
1078
|
'is--animat': !!this.animat,
|
|
1079
|
+
'is--padding': this.padding,
|
|
971
1080
|
'is--round': this.round,
|
|
972
1081
|
'is--stripe': !treeConfig && stripe,
|
|
973
1082
|
'is--loading': currLoading,
|
|
@@ -1081,14 +1190,16 @@ export default {
|
|
|
1081
1190
|
/**
|
|
1082
1191
|
* 加载中
|
|
1083
1192
|
*/
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1193
|
+
VxeUILoadingComponent
|
|
1194
|
+
? h(VxeUILoadingComponent, {
|
|
1195
|
+
class: 'vxe-table--loading',
|
|
1196
|
+
props: {
|
|
1197
|
+
value: currLoading,
|
|
1198
|
+
icon: loadingOpts.icon,
|
|
1199
|
+
text: loadingOpts.text
|
|
1200
|
+
}
|
|
1201
|
+
}, this.callSlot($scopedSlots.loading, {}, h))
|
|
1202
|
+
: _e(),
|
|
1092
1203
|
/**
|
|
1093
1204
|
* 自定义列
|
|
1094
1205
|
*/
|
|
@@ -1149,8 +1260,8 @@ export default {
|
|
|
1149
1260
|
/**
|
|
1150
1261
|
* 通用提示
|
|
1151
1262
|
*/
|
|
1152
|
-
|
|
1153
|
-
? h(
|
|
1263
|
+
VxeUITooltipComponent
|
|
1264
|
+
? h(VxeUITooltipComponent, {
|
|
1154
1265
|
ref: 'commTip',
|
|
1155
1266
|
props: {
|
|
1156
1267
|
isArrow: false,
|
|
@@ -1161,8 +1272,8 @@ export default {
|
|
|
1161
1272
|
/**
|
|
1162
1273
|
* 工具提示
|
|
1163
1274
|
*/
|
|
1164
|
-
|
|
1165
|
-
? h(
|
|
1275
|
+
VxeUITooltipComponent
|
|
1276
|
+
? h(VxeUITooltipComponent, {
|
|
1166
1277
|
ref: 'tooltip',
|
|
1167
1278
|
props: Object.assign({}, this.tipConfig, this.tooltipStore.currOpts)
|
|
1168
1279
|
})
|
|
@@ -1170,8 +1281,8 @@ export default {
|
|
|
1170
1281
|
/**
|
|
1171
1282
|
* 校验提示
|
|
1172
1283
|
*/
|
|
1173
|
-
|
|
1174
|
-
? h(
|
|
1284
|
+
VxeUITooltipComponent && this.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip')
|
|
1285
|
+
? h(VxeUITooltipComponent, {
|
|
1175
1286
|
ref: 'validTip',
|
|
1176
1287
|
class: [{
|
|
1177
1288
|
'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: {
|
|
@@ -271,7 +273,6 @@ export const interceptor = VxeUI.interceptor
|
|
|
271
273
|
export const clipboard = VxeUI.clipboard
|
|
272
274
|
export const log = VxeUI.log
|
|
273
275
|
|
|
274
|
-
export const hooks = VxeUI.hooks
|
|
275
276
|
export const use = VxeUI.use
|
|
276
277
|
|
|
277
278
|
/**
|