vxe-table 4.23.18 → 4.23.20

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 (135) hide show
  1. package/dist/all.esm.js +301 -274
  2. package/dist/all.esm.min.js +3 -3
  3. package/dist/style.css +4 -1
  4. package/dist/style.mini.css +1 -1
  5. package/es/components.d.ts +1 -3
  6. package/es/components.js +1 -2
  7. package/es/esm.index.d.ts +7 -0
  8. package/es/esm.index.js +8 -0
  9. package/es/style.css +4 -1
  10. package/es/style.mini.css +1 -1
  11. package/es/table/module/edit/hook.js +2 -4
  12. package/es/table/module/export/export-panel.js +5 -5
  13. package/es/table/module/export/hook.js +8 -10
  14. package/es/table/module/export/import-panel.js +5 -5
  15. package/es/table/src/table.js +0 -1
  16. package/es/table/style.css +4 -1
  17. package/es/table/style.mini.css +1 -1
  18. package/es/ui/abandon.d.ts +82 -0
  19. package/es/ui/abandon.js +90 -0
  20. package/es/ui/index.d.ts +1 -82
  21. package/es/ui/index.js +2 -88
  22. package/es/ui/src/log.js +1 -1
  23. package/es/vxe-table/style.css +4 -1
  24. package/es/vxe-table/style.mini.css +1 -1
  25. package/lib/components.d.ts +1 -3
  26. package/lib/components.js +1 -2
  27. package/lib/esm.index.d.ts +7 -0
  28. package/lib/esm.index.js +39 -0
  29. package/lib/index.umd.js +266 -270
  30. package/lib/index.umd.min.js +3 -3
  31. package/lib/style.css +4 -1
  32. package/lib/style.mini.css +1 -1
  33. package/lib/table/module/edit/hook.js +2 -4
  34. package/lib/table/module/export/export-panel.js +5 -5
  35. package/lib/table/module/export/hook.js +8 -10
  36. package/lib/table/module/export/import-panel.js +5 -5
  37. package/lib/table/src/table.js +0 -1
  38. package/lib/table/style/style.css +4 -1
  39. package/lib/table/style/style.mini.css +1 -1
  40. package/lib/ui/abandon.d.ts +82 -0
  41. package/lib/ui/abandon.js +110 -0
  42. package/lib/ui/index.d.ts +1 -82
  43. package/lib/ui/index.js +3 -88
  44. package/lib/ui/src/log.js +1 -1
  45. package/lib/vxe-table/style/style.css +4 -1
  46. package/lib/vxe-table/style/style.mini.css +1 -1
  47. package/package.json +2 -2
  48. package/packages/colgroup/index.ts +22 -22
  49. package/packages/column/index.ts +22 -22
  50. package/packages/components.ts +42 -45
  51. package/packages/esm.index.ts +10 -0
  52. package/packages/grid/index.ts +18 -18
  53. package/packages/grid/src/emits.ts +5 -5
  54. package/packages/grid/src/grid.ts +2220 -2220
  55. package/packages/grid/src/props.ts +22 -22
  56. package/packages/index.ts +13 -13
  57. package/packages/locale/lang/ar-EG.ts +914 -914
  58. package/packages/locale/lang/de-DE.ts +914 -914
  59. package/packages/locale/lang/en-US.ts +914 -914
  60. package/packages/locale/lang/es-ES.ts +914 -914
  61. package/packages/locale/lang/fr-FR.ts +914 -914
  62. package/packages/locale/lang/hu-HU.ts +914 -914
  63. package/packages/locale/lang/hy-AM.ts +914 -914
  64. package/packages/locale/lang/id-ID.ts +914 -914
  65. package/packages/locale/lang/it-IT.ts +914 -914
  66. package/packages/locale/lang/ja-JP.ts +914 -914
  67. package/packages/locale/lang/ko-KR.ts +914 -914
  68. package/packages/locale/lang/ms-MY.ts +914 -914
  69. package/packages/locale/lang/nb-NO.ts +914 -914
  70. package/packages/locale/lang/pt-BR.ts +914 -914
  71. package/packages/locale/lang/ru-RU.ts +914 -914
  72. package/packages/locale/lang/th-TH.ts +914 -914
  73. package/packages/locale/lang/ug-CN.ts +914 -914
  74. package/packages/locale/lang/uk-UA.ts +914 -914
  75. package/packages/locale/lang/uz-UZ.ts +914 -914
  76. package/packages/locale/lang/vi-VN.ts +914 -914
  77. package/packages/locale/lang/zh-CHT.ts +914 -914
  78. package/packages/locale/lang/zh-CN.ts +914 -914
  79. package/packages/locale/lang/zh-HK.ts +914 -914
  80. package/packages/locale/lang/zh-MO.ts +914 -914
  81. package/packages/locale/lang/zh-TC.ts +914 -914
  82. package/packages/locale/lang/zh-TW.ts +914 -914
  83. package/packages/table/index.ts +26 -26
  84. package/packages/table/module/custom/hook.ts +510 -510
  85. package/packages/table/module/custom/panel.ts +2002 -2002
  86. package/packages/table/module/edit/hook.ts +1232 -1235
  87. package/packages/table/module/export/export-panel.ts +697 -697
  88. package/packages/table/module/export/hook.ts +2158 -2160
  89. package/packages/table/module/export/import-panel.ts +319 -319
  90. package/packages/table/module/export/util.ts +25 -25
  91. package/packages/table/module/filter/hook.ts +505 -505
  92. package/packages/table/module/filter/panel.ts +368 -368
  93. package/packages/table/module/keyboard/hook.ts +498 -498
  94. package/packages/table/module/menu/hook.ts +330 -330
  95. package/packages/table/module/menu/panel.ts +272 -272
  96. package/packages/table/module/validator/hook.ts +653 -653
  97. package/packages/table/render/index.ts +1819 -1819
  98. package/packages/table/src/body.ts +1078 -1078
  99. package/packages/table/src/cell.ts +1524 -1524
  100. package/packages/table/src/column.ts +192 -192
  101. package/packages/table/src/columnInfo.ts +232 -232
  102. package/packages/table/src/emits.ts +134 -134
  103. package/packages/table/src/footer.ts +425 -425
  104. package/packages/table/src/group.ts +67 -67
  105. package/packages/table/src/header.ts +661 -661
  106. package/packages/table/src/props.ts +336 -336
  107. package/packages/table/src/store.ts +14 -14
  108. package/packages/table/src/table.ts +0 -1
  109. package/packages/table/src/use/cell-view.ts +41 -41
  110. package/packages/table/src/use/index.ts +1 -1
  111. package/packages/table/src/util.ts +1206 -1206
  112. package/packages/toolbar/index.ts +18 -18
  113. package/packages/toolbar/src/toolbar.ts +768 -768
  114. package/packages/ui/abandon.ts +136 -0
  115. package/packages/ui/index.ts +404 -520
  116. package/packages/ui/src/anime.ts +51 -51
  117. package/packages/ui/src/comp.ts +3 -3
  118. package/packages/ui/src/dom.ts +466 -466
  119. package/packages/ui/src/log.ts +19 -19
  120. package/packages/ui/src/utils.ts +66 -66
  121. package/packages/ui/src/vn.ts +55 -55
  122. package/packages/v-x-e-table/index.d.ts +3 -3
  123. package/packages/v-x-e-table/index.ts +3 -3
  124. package/styles/components/table.scss +2 -1
  125. package/types/all.d.ts +76 -76
  126. package/types/index.d.ts +4 -4
  127. /package/dist/{iconfont.1794366305845.ttf → iconfont.1794633824975.ttf} +0 -0
  128. /package/dist/{iconfont.1794366305845.woff → iconfont.1794633824975.woff} +0 -0
  129. /package/dist/{iconfont.1794366305845.woff2 → iconfont.1794633824975.woff2} +0 -0
  130. /package/es/{iconfont.1794366305845.ttf → iconfont.1794633824975.ttf} +0 -0
  131. /package/es/{iconfont.1794366305845.woff → iconfont.1794633824975.woff} +0 -0
  132. /package/es/{iconfont.1794366305845.woff2 → iconfont.1794633824975.woff2} +0 -0
  133. /package/lib/{iconfont.1794366305845.ttf → iconfont.1794633824975.ttf} +0 -0
  134. /package/lib/{iconfont.1794366305845.woff → iconfont.1794633824975.woff} +0 -0
  135. /package/lib/{iconfont.1794366305845.woff2 → iconfont.1794633824975.woff2} +0 -0
@@ -1,192 +1,192 @@
1
- import { h, onUnmounted, inject, ref, PropType, provide, onMounted, createCommentVNode } from 'vue'
2
- import { defineVxeComponent } from '../../ui/src/comp'
3
- import { XEColumnInstance, watchColumn, assembleColumn, destroyColumn } from './util'
4
- import Cell from './cell'
5
-
6
- import type { VxeTableConstructor, VxeTablePrivateMethods, VxeColumnPropTypes, VxeColumnProps } from '../../../types'
7
-
8
- export const columnProps = {
9
- // 列唯一主键
10
- colId: [String, Number] as PropType<VxeColumnPropTypes.ColId>,
11
- // 渲染类型 index,radio,checkbox,expand,html
12
- type: String as PropType<VxeColumnPropTypes.Type>,
13
- // 列字段名
14
- field: String as PropType<VxeColumnPropTypes.Field>,
15
- // 列标题
16
- title: String as PropType<VxeColumnPropTypes.Title>,
17
- // 列宽度
18
- width: [Number, String] as PropType<VxeColumnPropTypes.Width>,
19
- // 列最小宽度,把剩余宽度按比例分配
20
- minWidth: [Number, String] as PropType<VxeColumnPropTypes.MinWidth>,
21
- // 列最大宽度
22
- maxWidth: [Number, String] as PropType<VxeColumnPropTypes.MaxWidth>,
23
- // 是否允许拖动列宽调整大小
24
- resizable: {
25
- type: Boolean as PropType<VxeColumnPropTypes.Resizable>,
26
- default: null
27
- },
28
- // 将列固定在左侧或者右侧
29
- fixed: String as PropType<VxeColumnPropTypes.Fixed>,
30
- // 列对其方式
31
- align: String as PropType<VxeColumnPropTypes.Align>,
32
- // 表头对齐方式
33
- headerAlign: String as PropType<VxeColumnPropTypes.HeaderAlign>,
34
- // 表尾列的对齐方式
35
- footerAlign: String as PropType<VxeColumnPropTypes.FooterAlign>,
36
- // 当内容过长时显示为省略号
37
- showOverflow: {
38
- type: [Boolean, String] as PropType<VxeColumnPropTypes.ShowOverflow>,
39
- default: null
40
- },
41
- // 当表头内容过长时显示为省略号
42
- showHeaderOverflow: {
43
- type: [Boolean, String] as PropType<VxeColumnPropTypes.ShowHeaderOverflow>,
44
- default: null
45
- },
46
- // 当表尾内容过长时显示为省略号
47
- showFooterOverflow: {
48
- type: [Boolean, String] as PropType<VxeColumnPropTypes.ShowFooterOverflow>,
49
- default: null
50
- },
51
- // 给单元格附加 className
52
- className: [String, Function] as PropType<VxeColumnPropTypes.ClassName>,
53
- // 给表头单元格附加 className
54
- headerClassName: [String, Function] as PropType<VxeColumnPropTypes.HeaderClassName>,
55
- // 给表尾单元格附加 className
56
- footerClassName: [String, Function] as PropType<VxeColumnPropTypes.FooterClassName>,
57
- // 格式化显示内容
58
- formatter: [Function, Array, String] as PropType<VxeColumnPropTypes.Formatter<any>>,
59
- // 格式化表头显示内容
60
- headerFormatter: [Function, Array, String] as PropType<VxeColumnPropTypes.HeaderFormatter>,
61
- // 格式化表尾显示内容
62
- footerFormatter: [Function, Array, String] as PropType<VxeColumnPropTypes.FooterFormatter>,
63
- // 是否显示间距
64
- padding: {
65
- type: Boolean as PropType<VxeColumnPropTypes.Padding>,
66
- default: null
67
- },
68
- // 垂直对齐方式
69
- verticalAlign: {
70
- type: String as PropType<VxeColumnPropTypes.VerticalAlign>,
71
- default: null
72
- },
73
- // 是否允许排序
74
- sortable: Boolean as PropType<VxeColumnPropTypes.Sortable>,
75
- // 自定义排序的属性
76
- sortBy: [String, Function] as PropType<VxeColumnPropTypes.SortBy>,
77
- // 排序的字段类型,比如字符串转数值等
78
- sortType: String as PropType<VxeColumnPropTypes.SortType>,
79
- // 配置筛选条件数组
80
- filters: {
81
- type: Array as PropType<VxeColumnPropTypes.Filters>,
82
- default: null
83
- },
84
- // 筛选是否允许多选
85
- filterMultiple: {
86
- type: Boolean as PropType<VxeColumnPropTypes.FilterMultiple>,
87
- default: true
88
- },
89
- // 自定义筛选方法
90
- filterMethod: Function as PropType<VxeColumnPropTypes.FilterMethod<any>>,
91
- // 筛选重置方法
92
- filterResetMethod: Function as PropType<VxeColumnPropTypes.FilterResetMethod>,
93
- // 筛选复原方法
94
- filterRecoverMethod: Function as PropType<VxeColumnPropTypes.FilterRecoverMethod>,
95
- // 筛选模板配置项
96
- filterRender: Object as PropType<VxeColumnPropTypes.FilterRender>,
97
- // 是否显示浮动筛选
98
- floatingFilters: Object as PropType<VxeColumnPropTypes.FloatingFilters>,
99
- // 列的校验规则
100
- rules: Array as PropType<VxeColumnPropTypes.Rules>,
101
- // 设置为分组节点
102
- rowGroupNode: Boolean as PropType<VxeColumnPropTypes.RowGroupNode>,
103
- // 设置为树节点
104
- treeNode: Boolean as PropType<VxeColumnPropTypes.TreeNode>,
105
- // 设置为拖拽排序
106
- dragSort: Boolean as PropType<VxeColumnPropTypes.DragSort>,
107
- // 设置为行高拖拽
108
- rowResize: Boolean as PropType<VxeColumnPropTypes.RowResize>,
109
- // 是否可视
110
- visible: {
111
- type: Boolean as PropType<VxeColumnPropTypes.Visible>,
112
- default: null
113
- },
114
- // 表头单元格数据导出方法
115
- headerExportMethod: Function as PropType<VxeColumnPropTypes.HeaderExportMethod>,
116
- // 单元格数据导出方法
117
- exportMethod: Function as PropType<VxeColumnPropTypes.ExportMethod>,
118
- // 表尾单元格数据导出方法
119
- footerExportMethod: Function as PropType<VxeColumnPropTypes.FooterExportMethod>,
120
- // 已废弃,被 titlePrefix 替换
121
- titleHelp: Object as PropType<VxeColumnPropTypes.TitleHelp>,
122
- // 标题前缀图标配置项
123
- titlePrefix: Object as PropType<VxeColumnPropTypes.TitlePrefix>,
124
- // 标题后缀图标配置项
125
- titleSuffix: Object as PropType<VxeColumnPropTypes.TitleSuffix>,
126
- // 单元格值类型
127
- cellType: String as PropType<VxeColumnPropTypes.CellType>,
128
- // 单元格渲染配置项
129
- cellRender: Object as PropType<VxeColumnPropTypes.CellRender<any>>,
130
- // 单元格编辑渲染配置项
131
- editRender: Object as PropType<VxeColumnPropTypes.EditRender>,
132
- // 内容渲染配置项
133
- contentRender: Object as PropType<VxeColumnPropTypes.ContentRender>,
134
-
135
- // 聚合函数
136
- aggFunc: [Boolean, String] as PropType<VxeColumnPropTypes.AggFunc>,
137
- // 将单元格复制到剪贴板
138
- copyMethod: Function as PropType<VxeColumnPropTypes.CopyMethod>,
139
- // 将剪贴单元格的值清除
140
- cutMethod: Function as PropType<VxeColumnPropTypes.CutMethod>,
141
- // 从剪贴板赋值到单元格
142
- pasteMethod: Function as PropType<VxeColumnPropTypes.PasteMethod>,
143
-
144
- // 额外的参数
145
- params: Object as PropType<VxeColumnPropTypes.Params>
146
- }
147
-
148
- export default /* define-vxe-component start */ defineVxeComponent({
149
- name: 'VxeColumn',
150
- props: columnProps,
151
- setup(props, { slots }) {
152
- const refElem = ref<HTMLDivElement>()
153
- const $xeTable = inject<(VxeTableConstructor & VxeTablePrivateMethods) | null>('$xeTable', null)
154
- const $xeColgroup = inject<XEColumnInstance | null>('$xeColgroup', null)
155
- if (!$xeTable) {
156
- return () => createCommentVNode()
157
- }
158
- const columnConfig = Cell.createColumn($xeTable, props as VxeColumnProps)
159
- columnConfig.slots = slots
160
-
161
- const renderVN = () => {
162
- return h('div', {
163
- ref: refElem
164
- })
165
- }
166
-
167
- const $xeColumn = {
168
- columnConfig,
169
-
170
- renderVN
171
- } as XEColumnInstance
172
-
173
- watchColumn($xeTable, props, columnConfig)
174
-
175
- onMounted(() => {
176
- const elem = refElem.value
177
- if (elem) {
178
- assembleColumn($xeTable, elem, columnConfig, $xeColgroup)
179
- }
180
- })
181
-
182
- onUnmounted(() => {
183
- destroyColumn($xeTable, columnConfig)
184
- })
185
-
186
- provide('$xeColumn', $xeColumn)
187
- provide('$xeGrid', null)
188
- provide('$xeGantt', null)
189
-
190
- return renderVN
191
- }
192
- }) /* define-vxe-component end */
1
+ import { h, onUnmounted, inject, ref, PropType, provide, onMounted, createCommentVNode } from 'vue'
2
+ import { defineVxeComponent } from '../../ui/src/comp'
3
+ import { XEColumnInstance, watchColumn, assembleColumn, destroyColumn } from './util'
4
+ import Cell from './cell'
5
+
6
+ import type { VxeTableConstructor, VxeTablePrivateMethods, VxeColumnPropTypes, VxeColumnProps } from '../../../types'
7
+
8
+ export const columnProps = {
9
+ // 列唯一主键
10
+ colId: [String, Number] as PropType<VxeColumnPropTypes.ColId>,
11
+ // 渲染类型 index,radio,checkbox,expand,html
12
+ type: String as PropType<VxeColumnPropTypes.Type>,
13
+ // 列字段名
14
+ field: String as PropType<VxeColumnPropTypes.Field>,
15
+ // 列标题
16
+ title: String as PropType<VxeColumnPropTypes.Title>,
17
+ // 列宽度
18
+ width: [Number, String] as PropType<VxeColumnPropTypes.Width>,
19
+ // 列最小宽度,把剩余宽度按比例分配
20
+ minWidth: [Number, String] as PropType<VxeColumnPropTypes.MinWidth>,
21
+ // 列最大宽度
22
+ maxWidth: [Number, String] as PropType<VxeColumnPropTypes.MaxWidth>,
23
+ // 是否允许拖动列宽调整大小
24
+ resizable: {
25
+ type: Boolean as PropType<VxeColumnPropTypes.Resizable>,
26
+ default: null
27
+ },
28
+ // 将列固定在左侧或者右侧
29
+ fixed: String as PropType<VxeColumnPropTypes.Fixed>,
30
+ // 列对其方式
31
+ align: String as PropType<VxeColumnPropTypes.Align>,
32
+ // 表头对齐方式
33
+ headerAlign: String as PropType<VxeColumnPropTypes.HeaderAlign>,
34
+ // 表尾列的对齐方式
35
+ footerAlign: String as PropType<VxeColumnPropTypes.FooterAlign>,
36
+ // 当内容过长时显示为省略号
37
+ showOverflow: {
38
+ type: [Boolean, String] as PropType<VxeColumnPropTypes.ShowOverflow>,
39
+ default: null
40
+ },
41
+ // 当表头内容过长时显示为省略号
42
+ showHeaderOverflow: {
43
+ type: [Boolean, String] as PropType<VxeColumnPropTypes.ShowHeaderOverflow>,
44
+ default: null
45
+ },
46
+ // 当表尾内容过长时显示为省略号
47
+ showFooterOverflow: {
48
+ type: [Boolean, String] as PropType<VxeColumnPropTypes.ShowFooterOverflow>,
49
+ default: null
50
+ },
51
+ // 给单元格附加 className
52
+ className: [String, Function] as PropType<VxeColumnPropTypes.ClassName>,
53
+ // 给表头单元格附加 className
54
+ headerClassName: [String, Function] as PropType<VxeColumnPropTypes.HeaderClassName>,
55
+ // 给表尾单元格附加 className
56
+ footerClassName: [String, Function] as PropType<VxeColumnPropTypes.FooterClassName>,
57
+ // 格式化显示内容
58
+ formatter: [Function, Array, String] as PropType<VxeColumnPropTypes.Formatter<any>>,
59
+ // 格式化表头显示内容
60
+ headerFormatter: [Function, Array, String] as PropType<VxeColumnPropTypes.HeaderFormatter>,
61
+ // 格式化表尾显示内容
62
+ footerFormatter: [Function, Array, String] as PropType<VxeColumnPropTypes.FooterFormatter>,
63
+ // 是否显示间距
64
+ padding: {
65
+ type: Boolean as PropType<VxeColumnPropTypes.Padding>,
66
+ default: null
67
+ },
68
+ // 垂直对齐方式
69
+ verticalAlign: {
70
+ type: String as PropType<VxeColumnPropTypes.VerticalAlign>,
71
+ default: null
72
+ },
73
+ // 是否允许排序
74
+ sortable: Boolean as PropType<VxeColumnPropTypes.Sortable>,
75
+ // 自定义排序的属性
76
+ sortBy: [String, Function] as PropType<VxeColumnPropTypes.SortBy>,
77
+ // 排序的字段类型,比如字符串转数值等
78
+ sortType: String as PropType<VxeColumnPropTypes.SortType>,
79
+ // 配置筛选条件数组
80
+ filters: {
81
+ type: Array as PropType<VxeColumnPropTypes.Filters>,
82
+ default: null
83
+ },
84
+ // 筛选是否允许多选
85
+ filterMultiple: {
86
+ type: Boolean as PropType<VxeColumnPropTypes.FilterMultiple>,
87
+ default: true
88
+ },
89
+ // 自定义筛选方法
90
+ filterMethod: Function as PropType<VxeColumnPropTypes.FilterMethod<any>>,
91
+ // 筛选重置方法
92
+ filterResetMethod: Function as PropType<VxeColumnPropTypes.FilterResetMethod>,
93
+ // 筛选复原方法
94
+ filterRecoverMethod: Function as PropType<VxeColumnPropTypes.FilterRecoverMethod>,
95
+ // 筛选模板配置项
96
+ filterRender: Object as PropType<VxeColumnPropTypes.FilterRender>,
97
+ // 是否显示浮动筛选
98
+ floatingFilters: Object as PropType<VxeColumnPropTypes.FloatingFilters>,
99
+ // 列的校验规则
100
+ rules: Array as PropType<VxeColumnPropTypes.Rules>,
101
+ // 设置为分组节点
102
+ rowGroupNode: Boolean as PropType<VxeColumnPropTypes.RowGroupNode>,
103
+ // 设置为树节点
104
+ treeNode: Boolean as PropType<VxeColumnPropTypes.TreeNode>,
105
+ // 设置为拖拽排序
106
+ dragSort: Boolean as PropType<VxeColumnPropTypes.DragSort>,
107
+ // 设置为行高拖拽
108
+ rowResize: Boolean as PropType<VxeColumnPropTypes.RowResize>,
109
+ // 是否可视
110
+ visible: {
111
+ type: Boolean as PropType<VxeColumnPropTypes.Visible>,
112
+ default: null
113
+ },
114
+ // 表头单元格数据导出方法
115
+ headerExportMethod: Function as PropType<VxeColumnPropTypes.HeaderExportMethod>,
116
+ // 单元格数据导出方法
117
+ exportMethod: Function as PropType<VxeColumnPropTypes.ExportMethod>,
118
+ // 表尾单元格数据导出方法
119
+ footerExportMethod: Function as PropType<VxeColumnPropTypes.FooterExportMethod>,
120
+ // 已废弃,被 titlePrefix 替换
121
+ titleHelp: Object as PropType<VxeColumnPropTypes.TitleHelp>,
122
+ // 标题前缀图标配置项
123
+ titlePrefix: Object as PropType<VxeColumnPropTypes.TitlePrefix>,
124
+ // 标题后缀图标配置项
125
+ titleSuffix: Object as PropType<VxeColumnPropTypes.TitleSuffix>,
126
+ // 单元格值类型
127
+ cellType: String as PropType<VxeColumnPropTypes.CellType>,
128
+ // 单元格渲染配置项
129
+ cellRender: Object as PropType<VxeColumnPropTypes.CellRender<any>>,
130
+ // 单元格编辑渲染配置项
131
+ editRender: Object as PropType<VxeColumnPropTypes.EditRender>,
132
+ // 内容渲染配置项
133
+ contentRender: Object as PropType<VxeColumnPropTypes.ContentRender>,
134
+
135
+ // 聚合函数
136
+ aggFunc: [Boolean, String] as PropType<VxeColumnPropTypes.AggFunc>,
137
+ // 将单元格复制到剪贴板
138
+ copyMethod: Function as PropType<VxeColumnPropTypes.CopyMethod>,
139
+ // 将剪贴单元格的值清除
140
+ cutMethod: Function as PropType<VxeColumnPropTypes.CutMethod>,
141
+ // 从剪贴板赋值到单元格
142
+ pasteMethod: Function as PropType<VxeColumnPropTypes.PasteMethod>,
143
+
144
+ // 额外的参数
145
+ params: Object as PropType<VxeColumnPropTypes.Params>
146
+ }
147
+
148
+ export default /* define-vxe-component start */ defineVxeComponent({
149
+ name: 'VxeColumn',
150
+ props: columnProps,
151
+ setup(props, { slots }) {
152
+ const refElem = ref<HTMLDivElement>()
153
+ const $xeTable = inject<(VxeTableConstructor & VxeTablePrivateMethods) | null>('$xeTable', null)
154
+ const $xeColgroup = inject<XEColumnInstance | null>('$xeColgroup', null)
155
+ if (!$xeTable) {
156
+ return () => createCommentVNode()
157
+ }
158
+ const columnConfig = Cell.createColumn($xeTable, props as VxeColumnProps)
159
+ columnConfig.slots = slots
160
+
161
+ const renderVN = () => {
162
+ return h('div', {
163
+ ref: refElem
164
+ })
165
+ }
166
+
167
+ const $xeColumn = {
168
+ columnConfig,
169
+
170
+ renderVN
171
+ } as XEColumnInstance
172
+
173
+ watchColumn($xeTable, props, columnConfig)
174
+
175
+ onMounted(() => {
176
+ const elem = refElem.value
177
+ if (elem) {
178
+ assembleColumn($xeTable, elem, columnConfig, $xeColgroup)
179
+ }
180
+ })
181
+
182
+ onUnmounted(() => {
183
+ destroyColumn($xeTable, columnConfig)
184
+ })
185
+
186
+ provide('$xeColumn', $xeColumn)
187
+ provide('$xeGrid', null)
188
+ provide('$xeGantt', null)
189
+
190
+ return renderVN
191
+ }
192
+ }) /* define-vxe-component end */