vxe-table 4.18.7 → 4.18.9

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 (148) hide show
  1. package/LICENSE +20 -20
  2. package/README.en.md +118 -118
  3. package/README.ja-JP.md +117 -117
  4. package/README.md +268 -268
  5. package/README.zh-TW.md +117 -117
  6. package/es/style.css +1 -1
  7. package/es/table/src/table.js +101 -84
  8. package/es/table/src/util.js +6 -0
  9. package/es/table/style.css +18 -48
  10. package/es/ui/index.js +1 -1
  11. package/es/ui/src/dom.js +21 -0
  12. package/es/ui/src/log.js +1 -1
  13. package/es/vxe-table/style.css +18 -48
  14. package/lib/index.common.js +2 -1
  15. package/lib/index.umd.js +2769 -2840
  16. package/lib/index.umd.min.js +1 -1
  17. package/lib/style.css +1 -1
  18. package/lib/table/src/table.js +21 -18
  19. package/lib/table/src/table.min.js +1 -1
  20. package/lib/table/src/util.js +6 -0
  21. package/lib/table/src/util.min.js +1 -1
  22. package/lib/table/style/style.css +18 -48
  23. package/lib/ui/index.js +1 -1
  24. package/lib/ui/index.min.js +1 -1
  25. package/lib/ui/src/dom.js +23 -0
  26. package/lib/ui/src/dom.min.js +1 -1
  27. package/lib/ui/src/log.js +1 -1
  28. package/lib/ui/src/log.min.js +1 -1
  29. package/lib/v-x-e-table/index.js +2 -1
  30. package/lib/v-x-e-table/index.min.js +1 -1
  31. package/lib/vxe-colgroup/index.js +2 -1
  32. package/lib/vxe-colgroup/index.min.js +1 -1
  33. package/lib/vxe-column/index.js +2 -1
  34. package/lib/vxe-column/index.min.js +1 -1
  35. package/lib/vxe-grid/index.js +2 -1
  36. package/lib/vxe-grid/index.min.js +1 -1
  37. package/lib/vxe-table/index.js +2 -1
  38. package/lib/vxe-table/index.min.js +1 -1
  39. package/lib/vxe-table/style/style.css +18 -48
  40. package/lib/vxe-toolbar/index.js +2 -1
  41. package/lib/vxe-toolbar/index.min.js +1 -1
  42. package/lib/vxe-ui/index.js +2 -1
  43. package/lib/vxe-ui/index.min.js +1 -1
  44. package/lib/vxe-v-x-e-table/index.js +2 -1
  45. package/lib/vxe-v-x-e-table/index.min.js +1 -1
  46. package/package.json +91 -91
  47. package/packages/colgroup/index.ts +22 -22
  48. package/packages/column/index.ts +22 -22
  49. package/packages/components.ts +43 -43
  50. package/packages/grid/index.ts +18 -18
  51. package/packages/grid/src/emits.ts +19 -19
  52. package/packages/grid/src/grid.ts +1768 -1768
  53. package/packages/grid/src/props.ts +23 -23
  54. package/packages/index.ts +4 -4
  55. package/packages/locale/lang/ar-EG.ts +832 -832
  56. package/packages/locale/lang/de-DE.ts +832 -832
  57. package/packages/locale/lang/en-US.ts +832 -832
  58. package/packages/locale/lang/es-ES.ts +832 -832
  59. package/packages/locale/lang/fr-FR.ts +832 -832
  60. package/packages/locale/lang/hu-HU.ts +832 -832
  61. package/packages/locale/lang/hy-AM.ts +832 -832
  62. package/packages/locale/lang/id-ID.ts +832 -832
  63. package/packages/locale/lang/it-IT.ts +832 -832
  64. package/packages/locale/lang/ja-JP.ts +832 -832
  65. package/packages/locale/lang/ko-KR.ts +832 -832
  66. package/packages/locale/lang/ms-MY.ts +832 -832
  67. package/packages/locale/lang/nb-NO.ts +832 -832
  68. package/packages/locale/lang/pt-BR.ts +832 -832
  69. package/packages/locale/lang/ru-RU.ts +832 -832
  70. package/packages/locale/lang/th-TH.ts +832 -832
  71. package/packages/locale/lang/ug-CN.ts +832 -832
  72. package/packages/locale/lang/uk-UA.ts +832 -832
  73. package/packages/locale/lang/uz-UZ.ts +832 -832
  74. package/packages/locale/lang/vi-VN.ts +832 -832
  75. package/packages/locale/lang/zh-CHT.ts +832 -832
  76. package/packages/locale/lang/zh-CN.ts +832 -832
  77. package/packages/locale/lang/zh-HK.ts +3 -3
  78. package/packages/locale/lang/zh-MO.ts +3 -3
  79. package/packages/locale/lang/zh-TC.ts +3 -3
  80. package/packages/locale/lang/zh-TW.ts +3 -3
  81. package/packages/table/index.ts +26 -26
  82. package/packages/table/module/custom/hook.ts +359 -359
  83. package/packages/table/module/custom/panel.ts +1331 -1331
  84. package/packages/table/module/edit/hook.ts +1032 -1032
  85. package/packages/table/module/export/export-panel.ts +567 -567
  86. package/packages/table/module/export/hook.ts +1654 -1654
  87. package/packages/table/module/export/import-panel.ts +266 -266
  88. package/packages/table/module/export/util.ts +24 -24
  89. package/packages/table/module/filter/hook.ts +468 -468
  90. package/packages/table/module/filter/panel.ts +301 -301
  91. package/packages/table/module/keyboard/hook.ts +495 -495
  92. package/packages/table/module/menu/hook.ts +325 -325
  93. package/packages/table/module/menu/panel.ts +201 -201
  94. package/packages/table/module/validator/hook.ts +631 -631
  95. package/packages/table/render/index.ts +1440 -1440
  96. package/packages/table/src/body.ts +932 -932
  97. package/packages/table/src/cell.ts +1290 -1290
  98. package/packages/table/src/column.ts +190 -190
  99. package/packages/table/src/columnInfo.ts +225 -225
  100. package/packages/table/src/emits.ts +123 -123
  101. package/packages/table/src/footer.ts +368 -368
  102. package/packages/table/src/group.ts +59 -59
  103. package/packages/table/src/header.ts +559 -559
  104. package/packages/table/src/props.ts +324 -324
  105. package/packages/table/src/store.ts +14 -14
  106. package/packages/table/src/table.ts +14020 -14004
  107. package/packages/table/src/use/cell-view.ts +44 -44
  108. package/packages/table/src/use/index.ts +1 -1
  109. package/packages/table/src/util.ts +1070 -1064
  110. package/packages/toolbar/index.ts +18 -18
  111. package/packages/toolbar/src/toolbar.ts +701 -701
  112. package/packages/ui/index.ts +530 -530
  113. package/packages/ui/src/anime.ts +52 -52
  114. package/packages/ui/src/comp.ts +3 -3
  115. package/packages/ui/src/dom.ts +259 -236
  116. package/packages/ui/src/log.ts +8 -8
  117. package/packages/ui/src/utils.ts +56 -56
  118. package/packages/ui/src/vn.ts +55 -55
  119. package/packages/v-x-e-table/index.d.ts +4 -4
  120. package/packages/v-x-e-table/index.ts +4 -4
  121. package/styles/all.scss +7 -7
  122. package/styles/base.scss +16 -16
  123. package/styles/components/grid.scss +89 -89
  124. package/styles/components/icon.scss +225 -225
  125. package/styles/components/old-icon.scss +715 -715
  126. package/styles/components/table-module/all.scss +6 -6
  127. package/styles/components/table-module/custom.scss +527 -527
  128. package/styles/components/table-module/export.scss +130 -130
  129. package/styles/components/table-module/filter.scss +130 -130
  130. package/styles/components/table-module/menu.scss +81 -81
  131. package/styles/components/table.scss +2679 -2679
  132. package/styles/components/toolbar.scss +119 -119
  133. package/styles/default.scss +2 -2
  134. package/styles/helpers/baseMixin.scss +95 -95
  135. package/styles/index.scss +4 -4
  136. package/styles/modules.scss +5 -5
  137. package/styles/theme/base.scss +93 -93
  138. package/styles/theme/dark.scss +49 -49
  139. package/styles/theme/light.scss +44 -44
  140. package/styles/variable.scss +43 -43
  141. package/types/all.d.ts +37 -37
  142. package/types/index.d.ts +4 -4
  143. /package/es/{iconfont.1773991907408.ttf → iconfont.1774420952727.ttf} +0 -0
  144. /package/es/{iconfont.1773991907408.woff → iconfont.1774420952727.woff} +0 -0
  145. /package/es/{iconfont.1773991907408.woff2 → iconfont.1774420952727.woff2} +0 -0
  146. /package/lib/{iconfont.1773991907408.ttf → iconfont.1774420952727.ttf} +0 -0
  147. /package/lib/{iconfont.1773991907408.woff → iconfont.1774420952727.woff} +0 -0
  148. /package/lib/{iconfont.1773991907408.woff2 → iconfont.1774420952727.woff2} +0 -0
@@ -1,190 +1,190 @@
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
- rowGroupNode: Boolean as PropType<VxeColumnPropTypes.RowGroupNode>,
101
- // 设置为树节点
102
- treeNode: Boolean as PropType<VxeColumnPropTypes.TreeNode>,
103
- // 设置为拖拽排序
104
- dragSort: Boolean as PropType<VxeColumnPropTypes.DragSort>,
105
- // 设置为行高拖拽
106
- rowResize: Boolean as PropType<VxeColumnPropTypes.RowResize>,
107
- // 是否可视
108
- visible: {
109
- type: Boolean as PropType<VxeColumnPropTypes.Visible>,
110
- default: null
111
- },
112
- // 表头单元格数据导出方法
113
- headerExportMethod: Function as PropType<VxeColumnPropTypes.HeaderExportMethod>,
114
- // 单元格数据导出方法
115
- exportMethod: Function as PropType<VxeColumnPropTypes.ExportMethod>,
116
- // 表尾单元格数据导出方法
117
- footerExportMethod: Function as PropType<VxeColumnPropTypes.FooterExportMethod>,
118
- // 已废弃,被 titlePrefix 替换
119
- titleHelp: Object as PropType<VxeColumnPropTypes.TitleHelp>,
120
- // 标题前缀图标配置项
121
- titlePrefix: Object as PropType<VxeColumnPropTypes.TitlePrefix>,
122
- // 标题后缀图标配置项
123
- titleSuffix: Object as PropType<VxeColumnPropTypes.TitleSuffix>,
124
- // 单元格值类型
125
- cellType: String as PropType<VxeColumnPropTypes.CellType>,
126
- // 单元格渲染配置项
127
- cellRender: Object as PropType<VxeColumnPropTypes.CellRender<any>>,
128
- // 单元格编辑渲染配置项
129
- editRender: Object as PropType<VxeColumnPropTypes.EditRender>,
130
- // 内容渲染配置项
131
- contentRender: Object as PropType<VxeColumnPropTypes.ContentRender>,
132
-
133
- // 聚合函数
134
- aggFunc: [Boolean, String] as PropType<VxeColumnPropTypes.AggFunc>,
135
- // 将单元格复制到剪贴板
136
- copyMethod: Function as PropType<VxeColumnPropTypes.CopyMethod>,
137
- // 将剪贴单元格的值清除
138
- cutMethod: Function as PropType<VxeColumnPropTypes.CutMethod>,
139
- // 从剪贴板赋值到单元格
140
- pasteMethod: Function as PropType<VxeColumnPropTypes.PasteMethod>,
141
-
142
- // 额外的参数
143
- params: Object as PropType<VxeColumnPropTypes.Params>
144
- }
145
-
146
- export default defineVxeComponent({
147
- name: 'VxeColumn',
148
- props: columnProps,
149
- setup (props, { slots }) {
150
- const refElem = ref<HTMLDivElement>()
151
- const $xeTable = inject<(VxeTableConstructor & VxeTablePrivateMethods) | null>('$xeTable', null)
152
- const $xeColgroup = inject<XEColumnInstance | null>('$xeColgroup', null)
153
- if (!$xeTable) {
154
- return () => createCommentVNode()
155
- }
156
- const columnConfig = Cell.createColumn($xeTable, props as VxeColumnProps)
157
- columnConfig.slots = slots
158
-
159
- const renderVN = () => {
160
- return h('div', {
161
- ref: refElem
162
- })
163
- }
164
-
165
- const $xeColumn = {
166
- columnConfig,
167
-
168
- renderVN
169
- } as XEColumnInstance
170
-
171
- watchColumn($xeTable, props, columnConfig)
172
-
173
- onMounted(() => {
174
- const elem = refElem.value
175
- if (elem) {
176
- assembleColumn($xeTable, elem, columnConfig, $xeColgroup)
177
- }
178
- })
179
-
180
- onUnmounted(() => {
181
- destroyColumn($xeTable, columnConfig)
182
- })
183
-
184
- provide('$xeColumn', $xeColumn)
185
- provide('$xeGrid', null)
186
- provide('$xeGantt', null)
187
-
188
- return renderVN
189
- }
190
- })
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
+ rowGroupNode: Boolean as PropType<VxeColumnPropTypes.RowGroupNode>,
101
+ // 设置为树节点
102
+ treeNode: Boolean as PropType<VxeColumnPropTypes.TreeNode>,
103
+ // 设置为拖拽排序
104
+ dragSort: Boolean as PropType<VxeColumnPropTypes.DragSort>,
105
+ // 设置为行高拖拽
106
+ rowResize: Boolean as PropType<VxeColumnPropTypes.RowResize>,
107
+ // 是否可视
108
+ visible: {
109
+ type: Boolean as PropType<VxeColumnPropTypes.Visible>,
110
+ default: null
111
+ },
112
+ // 表头单元格数据导出方法
113
+ headerExportMethod: Function as PropType<VxeColumnPropTypes.HeaderExportMethod>,
114
+ // 单元格数据导出方法
115
+ exportMethod: Function as PropType<VxeColumnPropTypes.ExportMethod>,
116
+ // 表尾单元格数据导出方法
117
+ footerExportMethod: Function as PropType<VxeColumnPropTypes.FooterExportMethod>,
118
+ // 已废弃,被 titlePrefix 替换
119
+ titleHelp: Object as PropType<VxeColumnPropTypes.TitleHelp>,
120
+ // 标题前缀图标配置项
121
+ titlePrefix: Object as PropType<VxeColumnPropTypes.TitlePrefix>,
122
+ // 标题后缀图标配置项
123
+ titleSuffix: Object as PropType<VxeColumnPropTypes.TitleSuffix>,
124
+ // 单元格值类型
125
+ cellType: String as PropType<VxeColumnPropTypes.CellType>,
126
+ // 单元格渲染配置项
127
+ cellRender: Object as PropType<VxeColumnPropTypes.CellRender<any>>,
128
+ // 单元格编辑渲染配置项
129
+ editRender: Object as PropType<VxeColumnPropTypes.EditRender>,
130
+ // 内容渲染配置项
131
+ contentRender: Object as PropType<VxeColumnPropTypes.ContentRender>,
132
+
133
+ // 聚合函数
134
+ aggFunc: [Boolean, String] as PropType<VxeColumnPropTypes.AggFunc>,
135
+ // 将单元格复制到剪贴板
136
+ copyMethod: Function as PropType<VxeColumnPropTypes.CopyMethod>,
137
+ // 将剪贴单元格的值清除
138
+ cutMethod: Function as PropType<VxeColumnPropTypes.CutMethod>,
139
+ // 从剪贴板赋值到单元格
140
+ pasteMethod: Function as PropType<VxeColumnPropTypes.PasteMethod>,
141
+
142
+ // 额外的参数
143
+ params: Object as PropType<VxeColumnPropTypes.Params>
144
+ }
145
+
146
+ export default defineVxeComponent({
147
+ name: 'VxeColumn',
148
+ props: columnProps,
149
+ setup (props, { slots }) {
150
+ const refElem = ref<HTMLDivElement>()
151
+ const $xeTable = inject<(VxeTableConstructor & VxeTablePrivateMethods) | null>('$xeTable', null)
152
+ const $xeColgroup = inject<XEColumnInstance | null>('$xeColgroup', null)
153
+ if (!$xeTable) {
154
+ return () => createCommentVNode()
155
+ }
156
+ const columnConfig = Cell.createColumn($xeTable, props as VxeColumnProps)
157
+ columnConfig.slots = slots
158
+
159
+ const renderVN = () => {
160
+ return h('div', {
161
+ ref: refElem
162
+ })
163
+ }
164
+
165
+ const $xeColumn = {
166
+ columnConfig,
167
+
168
+ renderVN
169
+ } as XEColumnInstance
170
+
171
+ watchColumn($xeTable, props, columnConfig)
172
+
173
+ onMounted(() => {
174
+ const elem = refElem.value
175
+ if (elem) {
176
+ assembleColumn($xeTable, elem, columnConfig, $xeColgroup)
177
+ }
178
+ })
179
+
180
+ onUnmounted(() => {
181
+ destroyColumn($xeTable, columnConfig)
182
+ })
183
+
184
+ provide('$xeColumn', $xeColumn)
185
+ provide('$xeGrid', null)
186
+ provide('$xeGantt', null)
187
+
188
+ return renderVN
189
+ }
190
+ })