vxe-table 4.23.19 → 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 (124) hide show
  1. package/dist/all.esm.js +283 -251
  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/style.css +4 -1
  12. package/es/table/style.mini.css +1 -1
  13. package/es/ui/abandon.d.ts +82 -0
  14. package/es/ui/abandon.js +90 -0
  15. package/es/ui/index.d.ts +1 -83
  16. package/es/ui/index.js +2 -89
  17. package/es/ui/src/log.js +1 -1
  18. package/es/vxe-table/style.css +4 -1
  19. package/es/vxe-table/style.mini.css +1 -1
  20. package/lib/components.d.ts +1 -3
  21. package/lib/components.js +1 -2
  22. package/lib/esm.index.d.ts +7 -0
  23. package/lib/esm.index.js +39 -0
  24. package/lib/index.umd.js +248 -247
  25. package/lib/index.umd.min.js +3 -3
  26. package/lib/style.css +4 -1
  27. package/lib/style.mini.css +1 -1
  28. package/lib/table/style/style.css +4 -1
  29. package/lib/table/style/style.mini.css +1 -1
  30. package/lib/ui/abandon.d.ts +82 -0
  31. package/lib/ui/abandon.js +110 -0
  32. package/lib/ui/index.d.ts +1 -83
  33. package/lib/ui/index.js +3 -89
  34. package/lib/ui/src/log.js +1 -1
  35. package/lib/vxe-table/style/style.css +4 -1
  36. package/lib/vxe-table/style/style.mini.css +1 -1
  37. package/package.json +1 -1
  38. package/packages/colgroup/index.ts +22 -22
  39. package/packages/column/index.ts +22 -22
  40. package/packages/components.ts +42 -45
  41. package/packages/esm.index.ts +10 -0
  42. package/packages/grid/index.ts +18 -18
  43. package/packages/grid/src/emits.ts +5 -5
  44. package/packages/grid/src/grid.ts +2220 -2220
  45. package/packages/grid/src/props.ts +22 -22
  46. package/packages/index.ts +13 -13
  47. package/packages/locale/lang/ar-EG.ts +914 -914
  48. package/packages/locale/lang/de-DE.ts +914 -914
  49. package/packages/locale/lang/en-US.ts +914 -914
  50. package/packages/locale/lang/es-ES.ts +914 -914
  51. package/packages/locale/lang/fr-FR.ts +914 -914
  52. package/packages/locale/lang/hu-HU.ts +914 -914
  53. package/packages/locale/lang/hy-AM.ts +914 -914
  54. package/packages/locale/lang/id-ID.ts +914 -914
  55. package/packages/locale/lang/it-IT.ts +914 -914
  56. package/packages/locale/lang/ja-JP.ts +914 -914
  57. package/packages/locale/lang/ko-KR.ts +914 -914
  58. package/packages/locale/lang/ms-MY.ts +914 -914
  59. package/packages/locale/lang/nb-NO.ts +914 -914
  60. package/packages/locale/lang/pt-BR.ts +914 -914
  61. package/packages/locale/lang/ru-RU.ts +914 -914
  62. package/packages/locale/lang/th-TH.ts +914 -914
  63. package/packages/locale/lang/ug-CN.ts +914 -914
  64. package/packages/locale/lang/uk-UA.ts +914 -914
  65. package/packages/locale/lang/uz-UZ.ts +914 -914
  66. package/packages/locale/lang/vi-VN.ts +914 -914
  67. package/packages/locale/lang/zh-CHT.ts +914 -914
  68. package/packages/locale/lang/zh-CN.ts +914 -914
  69. package/packages/locale/lang/zh-HK.ts +914 -914
  70. package/packages/locale/lang/zh-MO.ts +914 -914
  71. package/packages/locale/lang/zh-TC.ts +914 -914
  72. package/packages/locale/lang/zh-TW.ts +914 -914
  73. package/packages/table/index.ts +26 -26
  74. package/packages/table/module/custom/hook.ts +510 -510
  75. package/packages/table/module/custom/panel.ts +2002 -2002
  76. package/packages/table/module/edit/hook.ts +1232 -1232
  77. package/packages/table/module/export/export-panel.ts +697 -697
  78. package/packages/table/module/export/hook.ts +2158 -2158
  79. package/packages/table/module/export/import-panel.ts +319 -319
  80. package/packages/table/module/export/util.ts +25 -25
  81. package/packages/table/module/filter/hook.ts +505 -505
  82. package/packages/table/module/filter/panel.ts +368 -368
  83. package/packages/table/module/keyboard/hook.ts +498 -498
  84. package/packages/table/module/menu/hook.ts +330 -330
  85. package/packages/table/module/menu/panel.ts +272 -272
  86. package/packages/table/module/validator/hook.ts +653 -653
  87. package/packages/table/render/index.ts +1819 -1819
  88. package/packages/table/src/body.ts +1078 -1078
  89. package/packages/table/src/cell.ts +1524 -1524
  90. package/packages/table/src/column.ts +192 -192
  91. package/packages/table/src/columnInfo.ts +232 -232
  92. package/packages/table/src/emits.ts +134 -134
  93. package/packages/table/src/footer.ts +425 -425
  94. package/packages/table/src/group.ts +67 -67
  95. package/packages/table/src/header.ts +661 -661
  96. package/packages/table/src/props.ts +336 -336
  97. package/packages/table/src/store.ts +14 -14
  98. package/packages/table/src/use/cell-view.ts +41 -41
  99. package/packages/table/src/use/index.ts +1 -1
  100. package/packages/table/src/util.ts +1206 -1206
  101. package/packages/toolbar/index.ts +18 -18
  102. package/packages/toolbar/src/toolbar.ts +768 -768
  103. package/packages/ui/abandon.ts +136 -0
  104. package/packages/ui/index.ts +404 -524
  105. package/packages/ui/src/anime.ts +51 -51
  106. package/packages/ui/src/comp.ts +3 -3
  107. package/packages/ui/src/dom.ts +466 -466
  108. package/packages/ui/src/log.ts +19 -19
  109. package/packages/ui/src/utils.ts +66 -66
  110. package/packages/ui/src/vn.ts +55 -55
  111. package/packages/v-x-e-table/index.d.ts +3 -3
  112. package/packages/v-x-e-table/index.ts +3 -3
  113. package/styles/components/table.scss +2 -1
  114. package/types/all.d.ts +76 -76
  115. package/types/index.d.ts +4 -4
  116. /package/dist/{iconfont.1794474448348.ttf → iconfont.1794633824975.ttf} +0 -0
  117. /package/dist/{iconfont.1794474448348.woff → iconfont.1794633824975.woff} +0 -0
  118. /package/dist/{iconfont.1794474448348.woff2 → iconfont.1794633824975.woff2} +0 -0
  119. /package/es/{iconfont.1794474448348.ttf → iconfont.1794633824975.ttf} +0 -0
  120. /package/es/{iconfont.1794474448348.woff → iconfont.1794633824975.woff} +0 -0
  121. /package/es/{iconfont.1794474448348.woff2 → iconfont.1794633824975.woff2} +0 -0
  122. /package/lib/{iconfont.1794474448348.ttf → iconfont.1794633824975.ttf} +0 -0
  123. /package/lib/{iconfont.1794474448348.woff → iconfont.1794633824975.woff} +0 -0
  124. /package/lib/{iconfont.1794474448348.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 */