vxe-table 3.9.0-rc.9 → 3.9.1
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 +80 -9
- package/es/grid/src/grid.js +116 -62
- 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 +6 -2
- package/es/locale/lang/es-ES.js +5 -1
- package/es/locale/lang/hu-HU.js +5 -1
- package/es/locale/lang/ja-JP.js +5 -1
- package/es/locale/lang/ko-KR.js +5 -1
- package/es/locale/lang/pt-BR.js +5 -1
- package/es/locale/lang/ru-RU.js +5 -1
- package/es/locale/lang/uk-UA.js +5 -1
- package/es/locale/lang/vi-VN.js +5 -1
- package/es/locale/lang/zh-CHT.js +5 -1
- package/es/locale/lang/zh-CN.js +5 -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 +35 -40
- 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 +69 -55
- package/es/table/src/props.js +65 -15
- package/es/table/src/table.js +63 -29
- 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 +577 -487
- 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 +9148 -17246
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +6 -2
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +6 -2
- package/lib/locale/lang/es-ES.js +5 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +5 -1
- package/lib/locale/lang/hu-HU.js +5 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +5 -1
- package/lib/locale/lang/ja-JP.js +5 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +5 -1
- package/lib/locale/lang/ko-KR.js +5 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +5 -1
- package/lib/locale/lang/pt-BR.js +5 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +5 -1
- package/lib/locale/lang/ru-RU.js +5 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +5 -1
- package/lib/locale/lang/uk-UA.js +5 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +5 -1
- package/lib/locale/lang/vi-VN.js +5 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +5 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +5 -1
- package/lib/locale/lang/zh-CN.js +5 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +5 -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 +434 -383
- 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 +2770 -2491
- 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 +436 -395
- 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 +123 -61
- package/packages/locale/lang/en-US.ts +6 -2
- package/packages/locale/lang/es-ES.ts +5 -1
- package/packages/locale/lang/hu-HU.ts +5 -1
- package/packages/locale/lang/ja-JP.ts +5 -1
- package/packages/locale/lang/ko-KR.ts +5 -1
- package/packages/locale/lang/pt-BR.ts +5 -1
- package/packages/locale/lang/ru-RU.ts +5 -1
- package/packages/locale/lang/uk-UA.ts +5 -1
- package/packages/locale/lang/vi-VN.ts +5 -1
- package/packages/locale/lang/zh-CHT.ts +5 -1
- package/packages/locale/lang/zh-CN.ts +5 -1
- package/packages/table/module/custom/panel.ts +186 -175
- package/packages/table/module/edit/mixin.ts +34 -39
- 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 +70 -55
- package/packages/table/src/props.ts +68 -15
- package/packages/table/src/table.ts +71 -26
- 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.1728483486168.ttf} +0 -0
- /package/es/{iconfont.1726453742001.woff → iconfont.1728483486168.woff} +0 -0
- /package/es/{iconfont.1726453742001.woff2 → iconfont.1728483486168.woff2} +0 -0
- /package/lib/{iconfont.1726453742001.ttf → iconfont.1728483486168.ttf} +0 -0
- /package/lib/{iconfont.1726453742001.woff → iconfont.1728483486168.woff} +0 -0
- /package/lib/{iconfont.1726453742001.woff2 → iconfont.1728483486168.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, 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) {
|
|
@@ -489,10 +497,6 @@ export default {
|
|
|
489
497
|
computeFNROpts () {
|
|
490
498
|
return Object.assign({}, getConfig().table.fnrConfig, this.fnrConfig)
|
|
491
499
|
},
|
|
492
|
-
hasTip () {
|
|
493
|
-
return true
|
|
494
|
-
// return VXETable._tooltip
|
|
495
|
-
},
|
|
496
500
|
headerCtxMenu () {
|
|
497
501
|
const headerOpts = this.ctxMenuOpts.header
|
|
498
502
|
return headerOpts && headerOpts.options ? headerOpts.options : []
|
|
@@ -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: {
|
|
@@ -130,6 +130,26 @@
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
+
.vxe-body--column {
|
|
134
|
+
&.col--height {
|
|
135
|
+
&.col--active {
|
|
136
|
+
& > .vxe-cell {
|
|
137
|
+
height: 100%;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
& > .vxe-cell {
|
|
141
|
+
& > .vxe-textarea,
|
|
142
|
+
& > .vxe-default-textarea {
|
|
143
|
+
height: 100%;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
.vxe-cell--label {
|
|
148
|
+
&.is--textarea {
|
|
149
|
+
white-space: pre-line;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
133
153
|
|
|
134
154
|
.vxe-table--checkbox-range,
|
|
135
155
|
.vxe-table--cell-main-area,
|
|
@@ -456,12 +476,12 @@
|
|
|
456
476
|
// vertical-align: middle;
|
|
457
477
|
// }
|
|
458
478
|
.vxe-cell--required-icon {
|
|
459
|
-
|
|
479
|
+
padding-right: 0.1em;
|
|
460
480
|
}
|
|
461
481
|
.vxe-cell--edit-icon,
|
|
462
482
|
.vxe-cell-title-prefix-icon,
|
|
463
483
|
.vxe-cell-title-suffix-icon {
|
|
464
|
-
|
|
484
|
+
padding: 0.2em;
|
|
465
485
|
}
|
|
466
486
|
.vxe-cell-title-prefix-icon,
|
|
467
487
|
.vxe-cell-title-suffix-icon {
|
|
@@ -512,12 +532,12 @@
|
|
|
512
532
|
font-family: var(--vxe-ui-font-family);
|
|
513
533
|
direction: ltr;
|
|
514
534
|
.vxe-table--body-wrapper {
|
|
515
|
-
table {
|
|
535
|
+
& > table {
|
|
516
536
|
background-color: var(--vxe-ui-layout-background-color);
|
|
517
537
|
}
|
|
518
538
|
}
|
|
519
539
|
.vxe-table--footer-wrapper {
|
|
520
|
-
table {
|
|
540
|
+
& > table {
|
|
521
541
|
background-color: var(--vxe-ui-table-footer-background-color);
|
|
522
542
|
}
|
|
523
543
|
}
|
|
@@ -678,15 +698,25 @@
|
|
|
678
698
|
}
|
|
679
699
|
}
|
|
680
700
|
}
|
|
701
|
+
&.is--padding {
|
|
702
|
+
.vxe-body--column {
|
|
703
|
+
&:not(.col--ellipsis) {
|
|
704
|
+
padding: var(--vxe-ui-table-column-padding-default);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
.vxe-header--column,
|
|
709
|
+
.vxe-footer--column {
|
|
710
|
+
&:not(.col--ellipsis) {
|
|
711
|
+
padding: var(--vxe-ui-table-column-padding-default);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
681
714
|
.vxe-header--column,
|
|
682
715
|
.vxe-body--column,
|
|
683
716
|
.vxe-footer--column {
|
|
684
717
|
position: relative;
|
|
685
718
|
line-height: var(--vxe-ui-table-row-line-height);
|
|
686
719
|
text-align: left;
|
|
687
|
-
&:not(.col--ellipsis) {
|
|
688
|
-
padding: var(--vxe-ui-table-column-padding-default);
|
|
689
|
-
}
|
|
690
720
|
&.col--current {
|
|
691
721
|
background-color: var(--vxe-ui-table-column-current-background-color);
|
|
692
722
|
// .vxe-tree--btn-wrapper {
|
|
@@ -731,6 +761,27 @@
|
|
|
731
761
|
.vxe-table--footer-wrapper {
|
|
732
762
|
border-top: var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color);
|
|
733
763
|
}
|
|
764
|
+
// &.border--default,
|
|
765
|
+
// &.border--full,
|
|
766
|
+
// &.border--inner,
|
|
767
|
+
// &.border--outer {
|
|
768
|
+
// .vxe-body--row {
|
|
769
|
+
// &:last-child {
|
|
770
|
+
// & > .vxe-body--column {
|
|
771
|
+
// & > .vxe-cell {
|
|
772
|
+
// border-bottom: 1px solid transparent;
|
|
773
|
+
// }
|
|
774
|
+
// }
|
|
775
|
+
// }
|
|
776
|
+
// }
|
|
777
|
+
// .vxe-body--column {
|
|
778
|
+
// &:first-child {
|
|
779
|
+
// & > .vxe-cell {
|
|
780
|
+
// border-left: 1px solid transparent;
|
|
781
|
+
// }
|
|
782
|
+
// }
|
|
783
|
+
// }
|
|
784
|
+
// }
|
|
734
785
|
&.border--default,
|
|
735
786
|
&.border--full,
|
|
736
787
|
&.border--outer {
|
|
@@ -883,11 +934,16 @@
|
|
|
883
934
|
}
|
|
884
935
|
}
|
|
885
936
|
}
|
|
937
|
+
|
|
938
|
+
&.is--padding {
|
|
939
|
+
.vxe-cell {
|
|
940
|
+
padding-left: var(--vxe-ui-table-cell-padding-left);
|
|
941
|
+
padding-right: var(--vxe-ui-table-cell-padding-right);
|
|
942
|
+
}
|
|
943
|
+
}
|
|
886
944
|
.vxe-cell {
|
|
887
945
|
white-space: pre-line;
|
|
888
946
|
word-break: break-all;
|
|
889
|
-
padding-left: var(--vxe-ui-table-cell-padding-left);
|
|
890
|
-
padding-right: var(--vxe-ui-table-cell-padding-right);
|
|
891
947
|
}
|
|
892
948
|
|
|
893
949
|
// 单元格占位符
|
|
@@ -1146,6 +1202,7 @@
|
|
|
1146
1202
|
}
|
|
1147
1203
|
}
|
|
1148
1204
|
|
|
1205
|
+
|
|
1149
1206
|
/*溢出列*/
|
|
1150
1207
|
.vxe-header--column,
|
|
1151
1208
|
.vxe-body--column,
|
|
@@ -1159,8 +1216,10 @@
|
|
|
1159
1216
|
white-space: nowrap;
|
|
1160
1217
|
}
|
|
1161
1218
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1219
|
+
&:not(.col--height) {
|
|
1220
|
+
& > .vxe-cell {
|
|
1221
|
+
max-height: var(--vxe-ui-table-row-height-default);
|
|
1222
|
+
}
|
|
1164
1223
|
}
|
|
1165
1224
|
}
|
|
1166
1225
|
}
|
|
@@ -1170,8 +1229,10 @@
|
|
|
1170
1229
|
.vxe-footer--column {
|
|
1171
1230
|
&.col--ellipsis {
|
|
1172
1231
|
@extend %MediumColumnHeight;
|
|
1173
|
-
|
|
1174
|
-
|
|
1232
|
+
&:not(.col--height) {
|
|
1233
|
+
& > .vxe-cell {
|
|
1234
|
+
max-height: var(--vxe-ui-table-row-height-medium);
|
|
1235
|
+
}
|
|
1175
1236
|
}
|
|
1176
1237
|
}
|
|
1177
1238
|
}
|
|
@@ -1188,8 +1249,10 @@
|
|
|
1188
1249
|
.vxe-footer--column {
|
|
1189
1250
|
&.col--ellipsis {
|
|
1190
1251
|
@extend %SmallColumnHeight;
|
|
1191
|
-
|
|
1192
|
-
|
|
1252
|
+
&:not(.col--height) {
|
|
1253
|
+
& > .vxe-cell {
|
|
1254
|
+
max-height: var(--vxe-ui-table-row-height-small);
|
|
1255
|
+
}
|
|
1193
1256
|
}
|
|
1194
1257
|
}
|
|
1195
1258
|
}
|
|
@@ -1206,8 +1269,10 @@
|
|
|
1206
1269
|
.vxe-footer--column {
|
|
1207
1270
|
&.col--ellipsis {
|
|
1208
1271
|
@extend %MiniColumnHeight;
|
|
1209
|
-
|
|
1210
|
-
|
|
1272
|
+
&:not(.col--height) {
|
|
1273
|
+
& > .vxe-cell {
|
|
1274
|
+
max-height: var(--vxe-ui-table-row-height-mini);
|
|
1275
|
+
}
|
|
1211
1276
|
}
|
|
1212
1277
|
}
|
|
1213
1278
|
}
|
package/types/all.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|