vxe-table 4.7.77 → 4.7.78

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.
Files changed (61) hide show
  1. package/README.en.md +1 -1
  2. package/README.ja-JP.md +1 -1
  3. package/README.md +1 -1
  4. package/README.zh-TW.md +1 -1
  5. package/es/grid/src/grid.js +45 -36
  6. package/es/style.css +1 -1
  7. package/es/table/module/custom/panel.js +5 -0
  8. package/es/table/src/body.js +26 -2
  9. package/es/table/src/cell.js +6 -6
  10. package/es/table/src/column.js +45 -18
  11. package/es/table/src/footer.js +16 -4
  12. package/es/table/src/group.js +18 -12
  13. package/es/table/src/header.js +4 -1
  14. package/es/table/src/props.js +96 -24
  15. package/es/table/src/table.js +2 -4
  16. package/es/table/src/util.js +1 -1
  17. package/es/toolbar/src/toolbar.js +89 -68
  18. package/es/ui/index.js +2 -2
  19. package/es/ui/src/log.js +1 -1
  20. package/lib/grid/src/grid.js +45 -39
  21. package/lib/grid/src/grid.min.js +1 -1
  22. package/lib/index.umd.js +252 -174
  23. package/lib/index.umd.min.js +1 -1
  24. package/lib/style.css +1 -1
  25. package/lib/table/module/custom/panel.js +7 -0
  26. package/lib/table/module/custom/panel.min.js +1 -1
  27. package/lib/table/src/cell.js +3 -3
  28. package/lib/table/src/cell.min.js +1 -1
  29. package/lib/table/src/column.js +16 -10
  30. package/lib/table/src/column.min.js +1 -1
  31. package/lib/table/src/group.js +17 -11
  32. package/lib/table/src/group.min.js +1 -1
  33. package/lib/table/src/table.js +2 -4
  34. package/lib/table/src/table.min.js +1 -1
  35. package/lib/table/src/util.js +1 -1
  36. package/lib/table/src/util.min.js +1 -1
  37. package/lib/toolbar/src/toolbar.js +109 -76
  38. package/lib/toolbar/src/toolbar.min.js +1 -1
  39. package/lib/ui/index.js +2 -2
  40. package/lib/ui/index.min.js +1 -1
  41. package/lib/ui/src/log.js +1 -1
  42. package/lib/ui/src/log.min.js +1 -1
  43. package/package.json +2 -2
  44. package/packages/grid/src/grid.ts +54 -44
  45. package/packages/table/module/custom/panel.ts +5 -0
  46. package/packages/table/src/body.ts +26 -2
  47. package/packages/table/src/cell.ts +9 -8
  48. package/packages/table/src/column.ts +47 -20
  49. package/packages/table/src/footer.ts +16 -4
  50. package/packages/table/src/group.ts +19 -13
  51. package/packages/table/src/header.ts +4 -1
  52. package/packages/table/src/props.ts +97 -24
  53. package/packages/table/src/table.ts +2 -4
  54. package/packages/table/src/util.ts +2 -2
  55. package/packages/toolbar/src/toolbar.ts +97 -75
  56. /package/es/{iconfont.1725604498089.ttf → iconfont.1726051234125.ttf} +0 -0
  57. /package/es/{iconfont.1725604498089.woff → iconfont.1726051234125.woff} +0 -0
  58. /package/es/{iconfont.1725604498089.woff2 → iconfont.1726051234125.woff2} +0 -0
  59. /package/lib/{iconfont.1725604498089.ttf → iconfont.1726051234125.ttf} +0 -0
  60. /package/lib/{iconfont.1725604498089.woff → iconfont.1726051234125.woff} +0 -0
  61. /package/lib/{iconfont.1725604498089.woff2 → iconfont.1726051234125.woff2} +0 -0
@@ -916,9 +916,14 @@ export default defineComponent({
916
916
 
917
917
  if (process.env.VUE_APP_VXE_ENV === 'development') {
918
918
  nextTick(() => {
919
+ const customOpts = computeCustomOpts.value
920
+ const { mode } = customOpts
919
921
  if (!VxeUIModalComponent) {
920
922
  errLog('vxe.error.reqComp', ['vxe-modal'])
921
923
  }
924
+ if (!VxeUIDrawerComponent && (mode === 'drawer')) {
925
+ errLog('vxe.error.reqComp', ['vxe-drawer'])
926
+ }
922
927
  if (!VxeUIButtonComponent) {
923
928
  errLog('vxe.error.reqComp', ['vxe-button'])
924
929
  }
@@ -24,7 +24,10 @@ export default defineComponent({
24
24
  tableData: Array as PropType<any[]>,
25
25
  tableColumn: Array as PropType<VxeTableDefines.ColumnInfo[]>,
26
26
  fixedColumn: Array as PropType<VxeTableDefines.ColumnInfo[]>,
27
- fixedType: { type: String as PropType<VxeColumnPropTypes.Fixed>, default: null }
27
+ fixedType: {
28
+ type: String as PropType<VxeColumnPropTypes.Fixed>,
29
+ default: null
30
+ }
28
31
  },
29
32
  setup (props) {
30
33
  const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
@@ -162,7 +165,28 @@ export default defineComponent({
162
165
  const errorValidItem = validErrorMaps[`${rowid}:${colid}`]
163
166
  const showValidTip = editRules && validOpts.showMessage && (validOpts.message === 'default' ? (height || tableData.length > 1) : validOpts.message === 'inline')
164
167
  const attrs: any = { colid }
165
- const params: VxeTableDefines.CellRenderBodyParams = { $table: $xeTable, $grid: $xeTable.xegrid, isEdit: false, seq, rowid, row, rowIndex, $rowIndex, _rowIndex, column, columnIndex, $columnIndex, _columnIndex, fixed: fixedType, type: renderType, isHidden: fixedHiddenColumn, level: rowLevel, visibleData: afterFullData, data: tableData, items }
168
+ const params: VxeTableDefines.CellRenderBodyParams = {
169
+ $table: $xeTable,
170
+ $grid: $xeTable.xegrid,
171
+ isEdit: false,
172
+ seq,
173
+ rowid,
174
+ row,
175
+ rowIndex,
176
+ $rowIndex,
177
+ _rowIndex,
178
+ column,
179
+ columnIndex,
180
+ $columnIndex,
181
+ _columnIndex,
182
+ fixed: fixedType,
183
+ type: renderType,
184
+ isHidden: fixedHiddenColumn,
185
+ level: rowLevel,
186
+ visibleData: afterFullData,
187
+ data: tableData,
188
+ items
189
+ }
166
190
  // 虚拟滚动不支持动态高度
167
191
  if (scrollYLoad && !hasEllipsis) {
168
192
  showEllipsis = hasEllipsis = true
@@ -268,14 +268,15 @@ export const Cell = {
268
268
  return [
269
269
  h('span', {
270
270
  class: 'vxe-cell--label'
271
- }, editRender && eqEmptyValue(cellValue)
272
- ? [
273
- // 如果设置占位符
274
- h('span', {
275
- class: 'vxe-cell--placeholder'
276
- }, formatText(getFuncText(cellPlaceholder), 1))
277
- ]
278
- : formatText(cellValue, 1))
271
+ }, [
272
+ // 如果设置占位符
273
+ editRender && eqEmptyValue(cellValue)
274
+ ? h('span', {
275
+ class: 'vxe-cell--placeholder'
276
+ }, formatText(getFuncText(cellPlaceholder), 1))
277
+ : h('span', formatText(cellValue, 1))
278
+ ]
279
+ )
279
280
  ]
280
281
  },
281
282
  renderTreeCell (params: VxeTableDefines.CellRenderBodyParams) {
@@ -1,6 +1,6 @@
1
- import { defineComponent, h, onUnmounted, inject, ref, Ref, PropType, provide, onMounted } from 'vue'
2
- import { XEColumnInstance, watchColumn, assembleColumn, destroyColumn } from '../../table/src/util'
3
- import Cell from '../../table/src/cell'
1
+ import { defineComponent, h, onUnmounted, inject, ref, PropType, provide, onMounted, createCommentVNode } from 'vue'
2
+ import { XEColumnInstance, watchColumn, assembleColumn, destroyColumn } from './util'
3
+ import Cell from './cell'
4
4
 
5
5
  import type { VxeTableConstructor, VxeTablePrivateMethods, VxeColumnPropTypes, VxeColumnProps } from '../../../types'
6
6
 
@@ -20,7 +20,10 @@ export const columnProps = {
20
20
  // 列最大宽度
21
21
  maxWidth: [Number, String] as PropType<VxeColumnPropTypes.MaxWidth>,
22
22
  // 是否允许拖动列宽调整大小
23
- resizable: { type: Boolean as PropType<VxeColumnPropTypes.Resizable>, default: null },
23
+ resizable: {
24
+ type: Boolean as PropType<VxeColumnPropTypes.Resizable>,
25
+ default: null
26
+ },
24
27
  // 将列固定在左侧或者右侧
25
28
  fixed: String as PropType<VxeColumnPropTypes.Fixed>,
26
29
  // 列对其方式
@@ -30,11 +33,20 @@ export const columnProps = {
30
33
  // 表尾列的对齐方式
31
34
  footerAlign: String as PropType<VxeColumnPropTypes.FooterAlign>,
32
35
  // 当内容过长时显示为省略号
33
- showOverflow: { type: [Boolean, String] as PropType<VxeColumnPropTypes.ShowOverflow>, default: null },
36
+ showOverflow: {
37
+ type: [Boolean, String] as PropType<VxeColumnPropTypes.ShowOverflow>,
38
+ default: null
39
+ },
34
40
  // 当表头内容过长时显示为省略号
35
- showHeaderOverflow: { type: [Boolean, String] as PropType<VxeColumnPropTypes.ShowHeaderOverflow>, default: null },
41
+ showHeaderOverflow: {
42
+ type: [Boolean, String] as PropType<VxeColumnPropTypes.ShowHeaderOverflow>,
43
+ default: null
44
+ },
36
45
  // 当表尾内容过长时显示为省略号
37
- showFooterOverflow: { type: [Boolean, String] as PropType<VxeColumnPropTypes.ShowFooterOverflow>, default: null },
46
+ showFooterOverflow: {
47
+ type: [Boolean, String] as PropType<VxeColumnPropTypes.ShowFooterOverflow>,
48
+ default: null
49
+ },
38
50
  // 给单元格附加 className
39
51
  className: [String, Function] as PropType<VxeColumnPropTypes.ClassName>,
40
52
  // 给表头单元格附加 className
@@ -52,9 +64,15 @@ export const columnProps = {
52
64
  // 排序的字段类型,比如字符串转数值等
53
65
  sortType: String as PropType<VxeColumnPropTypes.SortType>,
54
66
  // 配置筛选条件数组
55
- filters: { type: Array as PropType<VxeColumnPropTypes.Filters>, default: null },
67
+ filters: {
68
+ type: Array as PropType<VxeColumnPropTypes.Filters>,
69
+ default: null
70
+ },
56
71
  // 筛选是否允许多选
57
- filterMultiple: { type: Boolean as PropType<VxeColumnPropTypes.FilterMultiple>, default: true },
72
+ filterMultiple: {
73
+ type: Boolean as PropType<VxeColumnPropTypes.FilterMultiple>,
74
+ default: true
75
+ },
58
76
  // 自定义筛选方法
59
77
  filterMethod: Function as PropType<VxeColumnPropTypes.FilterMethod<any>>,
60
78
  // 筛选重置方法
@@ -66,7 +84,10 @@ export const columnProps = {
66
84
  // 指定为树节点
67
85
  treeNode: Boolean as PropType<VxeColumnPropTypes.TreeNode>,
68
86
  // 是否可视
69
- visible: { type: Boolean as PropType<VxeColumnPropTypes.Visible>, default: null },
87
+ visible: {
88
+ type: Boolean as PropType<VxeColumnPropTypes.Visible>,
89
+ default: null
90
+ },
70
91
  // 表头单元格数据导出方法
71
92
  headerExportMethod: Function as PropType<VxeColumnPropTypes.HeaderExportMethod>,
72
93
  // 单元格数据导出方法
@@ -95,11 +116,14 @@ export default defineComponent({
95
116
  name: 'VxeColumn',
96
117
  props: columnProps,
97
118
  setup (props, { slots }) {
98
- const refElem = ref() as Ref<HTMLDivElement>
99
- const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTablePrivateMethods)
100
- const parentColgroup = inject('$xeColgroup', null as XEColumnInstance | null)
101
- const column = Cell.createColumn($xeTable, props as VxeColumnProps)
102
- column.slots = slots
119
+ const refElem = ref<HTMLDivElement>()
120
+ const $xeTable = inject<(VxeTableConstructor & VxeTablePrivateMethods) | null>('$xeTable', null)
121
+ const $xeColgroup = inject<XEColumnInstance | null>('$xeColgroup', null)
122
+ if (!$xeTable) {
123
+ return () => createCommentVNode()
124
+ }
125
+ const columnConfig = Cell.createColumn($xeTable, props as VxeColumnProps)
126
+ columnConfig.slots = slots
103
127
 
104
128
  const renderVN = () => {
105
129
  return h('div', {
@@ -108,19 +132,22 @@ export default defineComponent({
108
132
  }
109
133
 
110
134
  const $xeColumn = {
111
- column,
135
+ columnConfig,
112
136
 
113
137
  renderVN
114
- }
138
+ } as XEColumnInstance
115
139
 
116
- watchColumn($xeTable, props, column)
140
+ watchColumn($xeTable, props, columnConfig)
117
141
 
118
142
  onMounted(() => {
119
- assembleColumn($xeTable, refElem.value, column, parentColgroup)
143
+ const elem = refElem.value
144
+ if (elem) {
145
+ assembleColumn($xeTable, elem, columnConfig, $xeColgroup)
146
+ }
120
147
  })
121
148
 
122
149
  onUnmounted(() => {
123
- destroyColumn($xeTable, column)
150
+ destroyColumn($xeTable, columnConfig)
124
151
  })
125
152
 
126
153
  provide('$xeColumn', $xeColumn)
@@ -23,10 +23,22 @@ function mergeFooterMethod (mergeFooterList: VxeTableDefines.MergeItem[], _rowIn
23
23
  export default defineComponent({
24
24
  name: 'VxeTableFooter',
25
25
  props: {
26
- footerTableData: { type: Array as PropType<any[][]>, default: () => [] },
27
- tableColumn: { type: Array as PropType<VxeTableDefines.ColumnInfo[]>, default: () => [] },
28
- fixedColumn: { type: Array as PropType<VxeTableDefines.ColumnInfo[]>, default: () => [] },
29
- fixedType: { type: String as PropType<VxeColumnPropTypes.Fixed>, default: null }
26
+ footerTableData: {
27
+ type: Array as PropType<any[][]>,
28
+ default: () => []
29
+ },
30
+ tableColumn: {
31
+ type: Array as PropType<VxeTableDefines.ColumnInfo[]>,
32
+ default: () => []
33
+ },
34
+ fixedColumn: {
35
+ type: Array as PropType<VxeTableDefines.ColumnInfo[]>,
36
+ default: () => []
37
+ },
38
+ fixedType: {
39
+ type: String as PropType<VxeColumnPropTypes.Fixed>,
40
+ default: null
41
+ }
30
42
  },
31
43
  setup (props) {
32
44
  const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
@@ -1,7 +1,7 @@
1
- import { defineComponent, h, onUnmounted, provide, inject, ref, Ref, onMounted, Slot } from 'vue'
1
+ import { defineComponent, h, onUnmounted, provide, inject, ref, onMounted, Slot, createCommentVNode } from 'vue'
2
2
  import { columnProps } from './column'
3
- import { XEColumnInstance, watchColumn, assembleColumn, destroyColumn } from '../../table/src/util'
4
- import Cell from '../../table/src/cell'
3
+ import { XEColumnInstance, watchColumn, assembleColumn, destroyColumn } from './util'
4
+ import Cell from './cell'
5
5
 
6
6
  import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types'
7
7
 
@@ -9,10 +9,13 @@ export default defineComponent({
9
9
  name: 'VxeColgroup',
10
10
  props: columnProps,
11
11
  setup (props, { slots }) {
12
- const refElem = ref() as Ref<HTMLDivElement>
13
- const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTablePrivateMethods)
14
- const parentColgroup = inject('$xeColgroup', null as XEColumnInstance | null)
15
- const column = Cell.createColumn($xeTable, props)
12
+ const refElem = ref<HTMLDivElement>()
13
+ const $xeTable = inject<(VxeTableConstructor & VxeTablePrivateMethods) | null>('$xeTable', null)
14
+ const $xeParentColgroup = inject<XEColumnInstance | null>('$xeColgroup', null)
15
+ if (!$xeTable) {
16
+ return () => createCommentVNode()
17
+ }
18
+ const columnConfig = Cell.createColumn($xeTable, props)
16
19
  const columnSlots: {
17
20
  header?: Slot;
18
21
  } = {}
@@ -21,17 +24,20 @@ export default defineComponent({
21
24
  columnSlots.header = slots.header
22
25
  }
23
26
 
24
- column.slots = columnSlots
25
- column.children = []
27
+ columnConfig.slots = columnSlots
28
+ columnConfig.children = []
26
29
 
27
- watchColumn($xeTable, props, column)
30
+ watchColumn($xeTable, props, columnConfig)
28
31
 
29
32
  onMounted(() => {
30
- assembleColumn($xeTable, refElem.value, column, parentColgroup)
33
+ const elem = refElem.value
34
+ if (elem) {
35
+ assembleColumn($xeTable, elem, columnConfig, $xeParentColgroup)
36
+ }
31
37
  })
32
38
 
33
39
  onUnmounted(() => {
34
- destroyColumn($xeTable, column)
40
+ destroyColumn($xeTable, columnConfig)
35
41
  })
36
42
 
37
43
  const renderVN = () => {
@@ -40,7 +46,7 @@ export default defineComponent({
40
46
  }, slots.default ? slots.default() : [])
41
47
  }
42
48
 
43
- const $xeColgroup = { column }
49
+ const $xeColgroup = { columnConfig } as XEColumnInstance
44
50
 
45
51
  provide('$xeColgroup', $xeColgroup)
46
52
  provide('$xeGrid', null)
@@ -14,7 +14,10 @@ export default defineComponent({
14
14
  tableColumn: Array as PropType<VxeTableDefines.ColumnInfo[]>,
15
15
  tableGroupColumn: Array as PropType<VxeTableDefines.ColumnInfo[]>,
16
16
  fixedColumn: Array as PropType<VxeTableDefines.ColumnInfo[]>,
17
- fixedType: { type: String as PropType<VxeColumnPropTypes.Fixed>, default: null }
17
+ fixedType: {
18
+ type: String as PropType<VxeColumnPropTypes.Fixed>,
19
+ default: null
20
+ }
18
21
  },
19
22
  setup (props) {
20
23
  const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
@@ -13,39 +13,85 @@ export default {
13
13
  // 表格的高度
14
14
  height: [Number, String] as PropType<VxeTablePropTypes.Height>,
15
15
  // 表格的最小高度
16
- minHeight: { type: [Number, String] as PropType<VxeTablePropTypes.MinHeight>, default: () => getConfig().table.minHeight },
16
+ minHeight: {
17
+ type: [Number, String] as PropType<VxeTablePropTypes.MinHeight>,
18
+ default: () => getConfig().table.minHeight
19
+ },
17
20
  // 表格的最大高度
18
21
  maxHeight: [Number, String] as PropType<VxeTablePropTypes.MaxHeight>,
19
22
  // 已废弃,被 column-config.resizable 替换
20
- resizable: { type: Boolean as PropType<VxeTablePropTypes.Resizable>, default: () => getConfig().table.resizable },
23
+ resizable: {
24
+ type: Boolean as PropType<VxeTablePropTypes.Resizable>,
25
+ default: () => getConfig().table.resizable
26
+ },
21
27
  // 是否带有斑马纹
22
- stripe: { type: Boolean as PropType<VxeTablePropTypes.Stripe>, default: () => getConfig().table.stripe },
28
+ stripe: {
29
+ type: Boolean as PropType<VxeTablePropTypes.Stripe>,
30
+ default: () => getConfig().table.stripe
31
+ },
23
32
  // 是否带有边框
24
- border: { type: [Boolean, String] as PropType<VxeTablePropTypes.Border>, default: () => getConfig().table.border },
33
+ border: {
34
+ type: [Boolean, String] as PropType<VxeTablePropTypes.Border>,
35
+ default: () => getConfig().table.border
36
+ },
25
37
  // 是否圆角边框
26
- round: { type: Boolean as PropType<VxeTablePropTypes.Round>, default: () => getConfig().table.round },
38
+ round: {
39
+ type: Boolean as PropType<VxeTablePropTypes.Round>,
40
+ default: () => getConfig().table.round
41
+ },
27
42
  // 表格的尺寸
28
- size: { type: String as PropType<VxeTablePropTypes.Size>, default: () => getConfig().table.size || getConfig().size },
43
+ size: {
44
+ type: String as PropType<VxeTablePropTypes.Size>,
45
+ default: () => getConfig().table.size || getConfig().size
46
+ },
29
47
  // 列的宽度是否自撑开(可能会被废弃的参数,不要使用)
30
- fit: { type: Boolean as PropType<VxeTablePropTypes.Fit>, default: () => getConfig().table.fit },
48
+ fit: {
49
+ type: Boolean as PropType<VxeTablePropTypes.Fit>,
50
+ default: () => getConfig().table.fit
51
+ },
31
52
  // 表格是否加载中
32
53
  loading: Boolean as PropType<VxeTablePropTypes.Loading>,
33
54
  // 所有的列对其方式
34
- align: { type: String as PropType<VxeTablePropTypes.Align>, default: () => getConfig().table.align },
55
+ align: {
56
+ type: String as PropType<VxeTablePropTypes.Align>,
57
+ default: () => getConfig().table.align
58
+ },
35
59
  // 所有的表头列的对齐方式
36
- headerAlign: { type: String as PropType<VxeTablePropTypes.HeaderAlign>, default: () => getConfig().table.headerAlign },
60
+ headerAlign: {
61
+ type: String as PropType<VxeTablePropTypes.HeaderAlign>,
62
+ default: () => getConfig().table.headerAlign
63
+ },
37
64
  // 所有的表尾列的对齐方式
38
- footerAlign: { type: String as PropType<VxeTablePropTypes.FooterAlign>, default: () => getConfig().table.footerAlign },
65
+ footerAlign: {
66
+ type: String as PropType<VxeTablePropTypes.FooterAlign>,
67
+ default: () => getConfig().table.footerAlign
68
+ },
39
69
  // 是否显示表头
40
- showHeader: { type: Boolean as PropType<VxeTablePropTypes.ShowHeader>, default: () => getConfig().table.showHeader },
70
+ showHeader: {
71
+ type: Boolean as PropType<VxeTablePropTypes.ShowHeader>,
72
+ default: () => getConfig().table.showHeader
73
+ },
41
74
  // (即将废弃)是否要高亮当前选中行
42
- highlightCurrentRow: { type: Boolean as PropType<VxeTablePropTypes.HighlightCurrentRow>, default: () => getConfig().table.highlightCurrentRow },
75
+ highlightCurrentRow: {
76
+ type: Boolean as PropType<VxeTablePropTypes.HighlightCurrentRow>,
77
+ default: () => getConfig().table.highlightCurrentRow
78
+ },
43
79
  // (即将废弃)鼠标移到行是否要高亮显示
44
- highlightHoverRow: { type: Boolean as PropType<VxeTablePropTypes.HighlightHoverRow>, default: () => getConfig().table.highlightHoverRow },
80
+ highlightHoverRow: {
81
+ type: Boolean as PropType<VxeTablePropTypes.HighlightHoverRow>,
82
+ default: () => getConfig().table.highlightHoverRow
83
+ },
45
84
  // (即将废弃)是否要高亮当前选中列
46
- highlightCurrentColumn: { type: Boolean as PropType<VxeTablePropTypes.HighlightCurrentColumn>, default: () => getConfig().table.highlightCurrentColumn },
85
+
86
+ highlightCurrentColumn: {
87
+ type: Boolean as PropType<VxeTablePropTypes.HighlightCurrentColumn>,
88
+ default: () => getConfig().table.highlightCurrentColumn
89
+ },
47
90
  // (即将废弃)鼠标移到列是否要高亮显示
48
- highlightHoverColumn: { type: Boolean as PropType<VxeTablePropTypes.HighlightHoverColumn>, default: () => getConfig().table.highlightHoverColumn },
91
+ highlightHoverColumn: {
92
+ type: Boolean as PropType<VxeTablePropTypes.HighlightHoverColumn>,
93
+ default: () => getConfig().table.highlightHoverColumn
94
+ },
49
95
  // (即将废弃)激活单元格编辑时是否高亮显示
50
96
  highlightCell: Boolean as PropType<VxeTablePropTypes.HighlightCell>,
51
97
  // 是否显示表尾合计
@@ -87,11 +133,20 @@ export default {
87
133
  // 表尾合并行或列
88
134
  footerSpanMethod: Function as PropType<VxeTablePropTypes.FooterSpanMethod>,
89
135
  // 设置所有内容过长时显示为省略号
90
- showOverflow: { type: [Boolean, String] as PropType<VxeTablePropTypes.ShowOverflow>, default: () => getConfig().table.showOverflow },
136
+ showOverflow: {
137
+ type: [Boolean, String] as PropType<VxeTablePropTypes.ShowOverflow>,
138
+ default: () => getConfig().table.showOverflow
139
+ },
91
140
  // 设置表头所有内容过长时显示为省略号
92
- showHeaderOverflow: { type: [Boolean, String] as PropType<VxeTablePropTypes.ShowHeaderOverflow>, default: () => getConfig().table.showHeaderOverflow },
141
+ showHeaderOverflow: {
142
+ type: [Boolean, String] as PropType<VxeTablePropTypes.ShowHeaderOverflow>,
143
+ default: () => getConfig().table.showHeaderOverflow
144
+ },
93
145
  // 设置表尾所有内容过长时显示为省略号
94
- showFooterOverflow: { type: [Boolean, String] as PropType<VxeTablePropTypes.ShowFooterOverflow>, default: () => getConfig().table.showFooterOverflow },
146
+ showFooterOverflow: {
147
+ type: [Boolean, String] as PropType<VxeTablePropTypes.ShowFooterOverflow>,
148
+ default: () => getConfig().table.showFooterOverflow
149
+ },
95
150
 
96
151
  /** 高级属性 */
97
152
  // (即将废弃)columnKey 已废弃,被 column-config.useKey 替换
@@ -99,12 +154,24 @@ export default {
99
154
  // (即将废弃)rowKey 已废弃,被 row-config.useKey 替换
100
155
  rowKey: Boolean as PropType<VxeTablePropTypes.RowKey>,
101
156
  // (即将废弃)rowId 已废弃,被 row-config.keyField 替换
102
- rowId: { type: String as PropType<VxeTablePropTypes.RowId>, default: () => getConfig().table.rowId },
157
+ rowId: {
158
+ type: String as PropType<VxeTablePropTypes.RowId>,
159
+ default: () => getConfig().table.rowId
160
+ },
103
161
  zIndex: Number as PropType<VxeTablePropTypes.ZIndex>,
104
- emptyText: { type: String as PropType<VxeTablePropTypes.EmptyText>, default: () => getConfig().table.emptyText },
105
- keepSource: { type: Boolean as PropType<VxeTablePropTypes.KeepSource>, default: () => getConfig().table.keepSource },
162
+ emptyText: {
163
+ type: String as PropType<VxeTablePropTypes.EmptyText>,
164
+ default: () => getConfig().table.emptyText
165
+ },
166
+ keepSource: {
167
+ type: Boolean as PropType<VxeTablePropTypes.KeepSource>,
168
+ default: () => getConfig().table.keepSource
169
+ },
106
170
  // 是否自动监听父容器变化去更新响应式表格宽高
107
- autoResize: { type: Boolean as PropType<VxeTablePropTypes.AutoResize>, default: () => getConfig().table.autoResize },
171
+ autoResize: {
172
+ type: Boolean as PropType<VxeTablePropTypes.AutoResize>,
173
+ default: () => getConfig().table.autoResize
174
+ },
108
175
  // 是否自动根据状态属性去更新响应式表格宽高
109
176
  syncResize: [Boolean, String, Number],
110
177
  // 响应式布局配置项
@@ -166,9 +233,15 @@ export default {
166
233
  // 纵向虚拟滚动配置项
167
234
  scrollY: Object as PropType<VxeTablePropTypes.ScrollY>,
168
235
  // (即将废弃)优化相关
169
- animat: { type: Boolean as PropType<VxeTablePropTypes.Animat>, default: () => getConfig().table.animat },
236
+ animat: {
237
+ type: Boolean as PropType<VxeTablePropTypes.Animat>,
238
+ default: () => getConfig().table.animat
239
+ },
170
240
  // (可能会被废弃的参数,不要使用)
171
- delayHover: { type: Number as PropType<VxeTablePropTypes.DelayHover>, default: () => getConfig().table.delayHover as number },
241
+ delayHover: {
242
+ type: Number as PropType<VxeTablePropTypes.DelayHover>,
243
+ default: () => getConfig().table.delayHover as number
244
+ },
172
245
  // 额外的参数
173
246
  params: Object as PropType<VxeTablePropTypes.Params>
174
247
  }
@@ -6968,9 +6968,7 @@ export default defineComponent({
6968
6968
  globalEvents.on($xeTable, 'mousewheel', handleGlobalMousewheelEvent)
6969
6969
  globalEvents.on($xeTable, 'keydown', handleGlobalKeydownEvent)
6970
6970
  globalEvents.on($xeTable, 'resize', handleGlobalResizeEvent)
6971
- if ($xeTable.handleGlobalContextmenuEvent) {
6972
- globalEvents.on($xeTable, 'contextmenu', $xeTable.handleGlobalContextmenuEvent)
6973
- }
6971
+ globalEvents.on($xeTable, 'contextmenu', $xeTable.handleGlobalContextmenuEvent)
6974
6972
  tablePrivateMethods.preventEvent(null, 'mounted', { $table: $xeTable })
6975
6973
  })
6976
6974
 
@@ -7176,7 +7174,7 @@ export default defineComponent({
7176
7174
  })
7177
7175
  : createCommentVNode(),
7178
7176
  /**
7179
- * 导出/导出
7177
+ * 导出
7180
7178
  */
7181
7179
  initStore.export && (props.exportConfig || props.printConfig)
7182
7180
  ? h(TableExportPanelComponent, {
@@ -120,7 +120,7 @@ export function getRowid ($xeTable: VxeTableConstructor, row: any) {
120
120
  }
121
121
 
122
122
  export interface XEColumnInstance {
123
- column: ColumnInfo;
123
+ columnConfig: ColumnInfo;
124
124
  }
125
125
 
126
126
  export const handleFieldOrColumn = ($xeTable: VxeTableConstructor, fieldOrColumn: string | VxeTableDefines.ColumnInfo | null) => {
@@ -294,7 +294,7 @@ export function assembleColumn ($xeTable: VxeTableConstructor & VxeTablePrivateM
294
294
  const { reactData } = $xeTable
295
295
  const { staticColumns } = reactData
296
296
  const parentElem = elem.parentNode
297
- const parentColumn = colgroup ? colgroup.column : null
297
+ const parentColumn = colgroup ? colgroup.columnConfig : null
298
298
  const parentCols = parentColumn ? parentColumn.children : staticColumns
299
299
  if (parentElem && parentCols) {
300
300
  parentCols.splice(XEUtils.arrayIndexOf(parentElem.children, elem), 0, column)