vxe-pc-ui 1.2.0 → 1.4.0
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/es/drawer/index.js +0 -1
- package/es/form/src/form.js +5 -2
- package/es/form-design/widget-select/select-form.js +2 -3
- package/es/icon/style/iconfont.1716394371834.ttf +0 -0
- package/es/icon/style/iconfont.1716394371834.woff +0 -0
- package/es/icon/style/iconfont.1716394371834.woff2 +0 -0
- package/es/icon/style.css +1 -1
- package/es/iconfont.1716394371834.ttf +0 -0
- package/es/iconfont.1716394371834.woff +0 -0
- package/es/iconfont.1716394371834.woff2 +0 -0
- package/es/modal/index.js +0 -1
- package/es/print/src/util.js +9 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +9 -1
- package/lib/drawer/index.js +1 -2
- package/lib/drawer/index.min.js +1 -1
- package/lib/form/src/form.js +5 -2
- package/lib/form/src/form.min.js +1 -1
- package/lib/form-design/widget-select/select-form.js +1 -2
- package/lib/form-design/widget-select/select-form.min.js +1 -1
- package/lib/icon/style/iconfont.1716394371834.ttf +0 -0
- package/lib/icon/style/iconfont.1716394371834.woff +0 -0
- package/lib/icon/style/iconfont.1716394371834.woff2 +0 -0
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1309 -1
- package/lib/iconfont.1716394371834.ttf +0 -0
- package/lib/iconfont.1716394371834.woff +0 -0
- package/lib/iconfont.1716394371834.woff2 +0 -0
- package/lib/index.umd.js +33 -22
- package/lib/index.umd.min.js +1 -1
- package/lib/modal/index.js +1 -2
- package/lib/modal/index.min.js +1 -1
- package/lib/print/src/util.js +9 -0
- package/lib/print/src/util.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +9 -1
- package/lib/ui/index.min.js +1 -1
- package/package.json +7 -5
- package/packages/components.ts +1 -3
- package/packages/drawer/index.ts +0 -2
- package/packages/form/src/form-config-item.ts +2 -2
- package/packages/form/src/form-gather.ts +1 -1
- package/packages/form/src/form-item.ts +2 -2
- package/packages/form/src/form.ts +5 -2
- package/packages/form-design/widget-select/select-form.ts +2 -3
- package/packages/input/src/input.ts +2 -2
- package/packages/modal/index.ts +0 -2
- package/packages/print/src/print.ts +1 -1
- package/packages/print/src/util.ts +9 -0
- package/packages/pulldown/src/pulldown.ts +2 -2
- package/packages/select/src/select.ts +2 -2
- package/packages/ui/index.ts +9 -1
- package/packages/ui/src/vn.ts +1 -2
- package/types/components/colgroup.d.ts +137 -0
- package/types/components/column.d.ts +621 -0
- package/types/components/form-item.d.ts +7 -3
- package/types/components/form.d.ts +2 -2
- package/types/components/grid.d.ts +633 -0
- package/types/components/option.d.ts +2 -2
- package/types/components/print.d.ts +19 -3
- package/types/components/table-module/custom.d.ts +32 -0
- package/types/components/table-module/edit.d.ts +166 -0
- package/types/components/table-module/export.d.ts +81 -0
- package/types/components/table-module/filter.d.ts +79 -0
- package/types/components/table-module/index.d.ts +7 -0
- package/types/components/table-module/keyboard.d.ts +22 -0
- package/types/components/table-module/menu.d.ts +54 -0
- package/types/components/table-module/validator.d.ts +104 -0
- package/types/components/table-plugins/extend-cell-area.d.ts +601 -0
- package/types/components/table-plugins/index.d.ts +1 -0
- package/types/components/table.d.ts +3714 -0
- package/types/components/toolbar.d.ts +291 -0
- package/types/components/tooltip.d.ts +1 -1
- package/types/ui/commands.d.ts +13 -0
- package/types/ui/formats.d.ts +11 -0
- package/types/ui/global-config.d.ts +43 -0
- package/types/ui/global-icon.d.ts +34 -0
- package/types/ui/hooks.d.ts +11 -0
- package/types/ui/index.d.ts +6 -8
- package/types/ui/interceptor.d.ts +47 -0
- package/types/ui/menus.d.ts +14 -0
- package/types/ui/renderer.d.ts +224 -8
- package/types/ui/validators.d.ts +5 -0
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
import { RenderFunction, SetupContext, Ref, ComponentPublicInstance, DefineComponent } from 'vue'
|
|
2
|
+
import { defineVxeComponent, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSlotType } from '@vxe-ui/core'
|
|
3
|
+
import { VxeTableDefines } from './table'
|
|
4
|
+
|
|
5
|
+
/* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
|
|
6
|
+
|
|
7
|
+
export declare const VxeColumn: defineVxeComponent<VxeColumnProps, VxeColumnEventProps>
|
|
8
|
+
export type VxeColumnComponent = DefineComponent<VxeColumnProps, VxeColumnEmits>
|
|
9
|
+
|
|
10
|
+
export type VxeColumnInstance = ComponentPublicInstance<VxeColumnProps, VxeColumnConstructor>
|
|
11
|
+
|
|
12
|
+
export interface VxeColumnConstructor extends VxeComponentBaseOptions, VxeColumnMethods {
|
|
13
|
+
props: VxeColumnProps
|
|
14
|
+
context: SetupContext<VxeColumnEmits>
|
|
15
|
+
reactData: ColumnReactData
|
|
16
|
+
getRefMaps(): ColumnPrivateRef
|
|
17
|
+
getComputeMaps(): ColumnPrivateComputed
|
|
18
|
+
renderVN: RenderFunction
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ColumnPrivateRef {
|
|
22
|
+
refElem: Ref<HTMLDivElement | undefined>
|
|
23
|
+
}
|
|
24
|
+
export interface VxeColumnPrivateRef extends ColumnPrivateRef { }
|
|
25
|
+
|
|
26
|
+
export namespace VxeColumnPropTypes {
|
|
27
|
+
export type ColId = string | number
|
|
28
|
+
export type Type = 'seq' | 'radio' | 'checkbox' | 'expand' | 'html' | null
|
|
29
|
+
export type Field = string
|
|
30
|
+
export type Title = string
|
|
31
|
+
export type Width = number | string
|
|
32
|
+
export type MinWidth = number | string
|
|
33
|
+
export type MaxWidth = number | string
|
|
34
|
+
export type Resizable = boolean
|
|
35
|
+
export type Fixed = 'left' | 'right' | '' | null
|
|
36
|
+
export type Align = 'left' | 'center' | 'right' | '' | null
|
|
37
|
+
export type HeaderAlign = Align
|
|
38
|
+
export type FooterAlign = Align
|
|
39
|
+
export type ShowOverflow = VxeTablePropTypes.ShowOverflow
|
|
40
|
+
export type ShowHeaderOverflow = ShowOverflow
|
|
41
|
+
export type ShowFooterOverflow = ShowOverflow
|
|
42
|
+
export type ClassName<D = any> = string | ((params: VxeGlobalRendererHandles.RenderCellParams<D>) => string | any[] | { [key: string]: boolean })
|
|
43
|
+
export type HeaderClassName<D = any> = string | ((params: VxeGlobalRendererHandles.RenderHeaderParams<D>) => string | any[] | { [key: string]: boolean })
|
|
44
|
+
export type FooterClassName<D = any> = string | ((params: VxeGlobalRendererHandles.RenderFooterParams<D>) => string | any[] | { [key: string]: boolean })
|
|
45
|
+
|
|
46
|
+
export type Formatter<D = any> = ((params: {
|
|
47
|
+
cellValue: any
|
|
48
|
+
column: VxeTableDefines.ColumnInfo<D>
|
|
49
|
+
row: D
|
|
50
|
+
}) => string | number) | any[] | string
|
|
51
|
+
|
|
52
|
+
export type Sortable = boolean
|
|
53
|
+
export type SortBy<D = any> = string | ((params: {
|
|
54
|
+
row: D
|
|
55
|
+
column: VxeTableDefines.ColumnInfo<D>
|
|
56
|
+
}) => string | number)
|
|
57
|
+
export type SortType = 'auto' | 'string' | 'number' | null
|
|
58
|
+
|
|
59
|
+
export interface Filter {
|
|
60
|
+
label?: string | number
|
|
61
|
+
value?: any
|
|
62
|
+
data?: any
|
|
63
|
+
resetValue?: any
|
|
64
|
+
checked?: boolean
|
|
65
|
+
}
|
|
66
|
+
export type Filters = Filter[]
|
|
67
|
+
|
|
68
|
+
export type FilterMultiple = boolean
|
|
69
|
+
|
|
70
|
+
interface FilterMethodParams<D = any> {
|
|
71
|
+
$table: VxeTableConstructor<D>,
|
|
72
|
+
value: any
|
|
73
|
+
option: VxeTableDefines.FilterOption
|
|
74
|
+
cellValue: any
|
|
75
|
+
row: D
|
|
76
|
+
column: VxeTableDefines.ColumnInfo<D>
|
|
77
|
+
}
|
|
78
|
+
export type FilterMethod<D = any> = (params: FilterMethodParams<D>) => boolean
|
|
79
|
+
|
|
80
|
+
interface FilterResetMethodParams<D = any> {
|
|
81
|
+
options: VxeTableDefines.FilterOption[]
|
|
82
|
+
column: VxeTableDefines.ColumnInfo<D>
|
|
83
|
+
}
|
|
84
|
+
export type FilterResetMethod = (params: FilterResetMethodParams) => void
|
|
85
|
+
|
|
86
|
+
interface FilterRecoverMethodParams<D = any> {
|
|
87
|
+
option: VxeTableDefines.FilterOption
|
|
88
|
+
column: VxeTableDefines.ColumnInfo<D>
|
|
89
|
+
}
|
|
90
|
+
export type FilterRecoverMethod<D = any> = (params: FilterRecoverMethodParams<D>) => void
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 筛选渲染配置项
|
|
94
|
+
*/
|
|
95
|
+
export interface FilterRender {
|
|
96
|
+
/**
|
|
97
|
+
* 渲染器名称
|
|
98
|
+
*/
|
|
99
|
+
name?: string
|
|
100
|
+
/**
|
|
101
|
+
* 目标组件渲染的参数
|
|
102
|
+
*/
|
|
103
|
+
props?: { [key: string]: any }
|
|
104
|
+
/**
|
|
105
|
+
* 目标组件渲染的属性
|
|
106
|
+
*/
|
|
107
|
+
attrs?: { [key: string]: any }
|
|
108
|
+
/**
|
|
109
|
+
* 目标组件渲染的事件
|
|
110
|
+
*/
|
|
111
|
+
events?: { [key: string]: (...args: any[]) => any }
|
|
112
|
+
/**
|
|
113
|
+
* 多目标渲染
|
|
114
|
+
*/
|
|
115
|
+
children?: any[]
|
|
116
|
+
|
|
117
|
+
options?: any[]
|
|
118
|
+
optionProps?: VxeGlobalRendererHandles.RenderOptionProps
|
|
119
|
+
optionGroups?: any[]
|
|
120
|
+
optionGroupProps?: VxeGlobalRendererHandles.RenderOptionGroupProps
|
|
121
|
+
content?: string
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type TreeNode = boolean
|
|
125
|
+
export type Visible = boolean
|
|
126
|
+
|
|
127
|
+
interface ExportMethodParams<D = any> {
|
|
128
|
+
$table: VxeTableConstructor<D>,
|
|
129
|
+
row: D
|
|
130
|
+
column: VxeTableDefines.ColumnInfo<D>
|
|
131
|
+
}
|
|
132
|
+
export type ExportMethod<D = any> = (params: ExportMethodParams<D>) => string | number
|
|
133
|
+
|
|
134
|
+
interface HeaderExportParams<D = any> {
|
|
135
|
+
$table: VxeTableConstructor<D>,
|
|
136
|
+
options: VxeTablePropTypes.ExportConfig
|
|
137
|
+
column: VxeTableDefines.ColumnInfo<D>
|
|
138
|
+
}
|
|
139
|
+
export type HeaderExportMethod<D = any> = (params: HeaderExportParams<D>) => string | number
|
|
140
|
+
|
|
141
|
+
interface FooterExportParams<D = any> {
|
|
142
|
+
$table: VxeTableConstructor<D>,
|
|
143
|
+
items: any[]
|
|
144
|
+
row: any
|
|
145
|
+
column: VxeTableDefines.ColumnInfo<D>
|
|
146
|
+
_columnIndex: number
|
|
147
|
+
}
|
|
148
|
+
export type FooterExportMethod<D = any> = (params: FooterExportParams<D>) => string | number
|
|
149
|
+
|
|
150
|
+
export interface TitlePrefix {
|
|
151
|
+
useHTML?: VxeTooltipPropTypes.UseHTML
|
|
152
|
+
content?: VxeTooltipPropTypes.Content
|
|
153
|
+
enterable?: VxeTooltipPropTypes.Enterable
|
|
154
|
+
theme?: VxeTooltipPropTypes.Theme
|
|
155
|
+
icon?: string
|
|
156
|
+
/**
|
|
157
|
+
* @deprecated 已废弃,请使用 content
|
|
158
|
+
*/
|
|
159
|
+
message?: string
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface TitleHelp extends TitlePrefix { }
|
|
163
|
+
|
|
164
|
+
export interface TitleSuffix {
|
|
165
|
+
useHTML?: VxeTooltipPropTypes.UseHTML
|
|
166
|
+
content?: VxeTooltipPropTypes.Content
|
|
167
|
+
enterable?: VxeTooltipPropTypes.Enterable
|
|
168
|
+
theme?: VxeTooltipPropTypes.Theme
|
|
169
|
+
icon?: string
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export type CellType = 'auto' | 'number' | 'string'
|
|
173
|
+
|
|
174
|
+
export interface CellRender<D = any> {
|
|
175
|
+
/**
|
|
176
|
+
* 渲染器名称
|
|
177
|
+
*/
|
|
178
|
+
name?: string
|
|
179
|
+
/**
|
|
180
|
+
* 目标组件渲染的参数
|
|
181
|
+
*/
|
|
182
|
+
props?: { [key: string]: any }
|
|
183
|
+
/**
|
|
184
|
+
* 目标组件渲染的属性
|
|
185
|
+
*/
|
|
186
|
+
attrs?: { [key: string]: any }
|
|
187
|
+
/**
|
|
188
|
+
* 多目标渲染
|
|
189
|
+
*/
|
|
190
|
+
children?: any[]
|
|
191
|
+
|
|
192
|
+
events?: { [key: string]: (cellParams: VxeColumnSlotTypes.DefaultSlotParams<D>, ...args: any[]) => any }
|
|
193
|
+
options?: any[]
|
|
194
|
+
optionProps?: VxeGlobalRendererHandles.RenderOptionProps
|
|
195
|
+
optionGroups?: any[]
|
|
196
|
+
optionGroupProps?: VxeGlobalRendererHandles.RenderOptionGroupProps
|
|
197
|
+
content?: string
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* 编辑渲染配置项
|
|
202
|
+
*/
|
|
203
|
+
export interface EditRender<D = any> {
|
|
204
|
+
/**
|
|
205
|
+
* 渲染器名称
|
|
206
|
+
*/
|
|
207
|
+
name?: string
|
|
208
|
+
/**
|
|
209
|
+
* 目标组件渲染的参数
|
|
210
|
+
*/
|
|
211
|
+
props?: { [key: string]: any }
|
|
212
|
+
/**
|
|
213
|
+
* 目标组件渲染的属性
|
|
214
|
+
*/
|
|
215
|
+
attrs?: { [key: string]: any }
|
|
216
|
+
/**
|
|
217
|
+
* 目标组件渲染的事件
|
|
218
|
+
*/
|
|
219
|
+
events?: { [key: string]: (...args: any[]) => any }
|
|
220
|
+
/**
|
|
221
|
+
* 多目标渲染
|
|
222
|
+
*/
|
|
223
|
+
children?: any[]
|
|
224
|
+
|
|
225
|
+
events?: { [key: string]: (cellParams: VxeColumnSlotTypes.EditSlotParams, ...args: any[]) => any }
|
|
226
|
+
enabled?: boolean
|
|
227
|
+
options?: any[]
|
|
228
|
+
optionProps?: VxeGlobalRendererHandles.RenderOptionProps
|
|
229
|
+
optionGroups?: any[]
|
|
230
|
+
optionGroupProps?: VxeGlobalRendererHandles.RenderOptionGroupProps
|
|
231
|
+
autofocus?: string
|
|
232
|
+
autoselect?: boolean
|
|
233
|
+
defaultValue?: ((params: { column: VxeTableDefines.ColumnInfo<D> }) => any) | null | undefined | string | number | RegExp | object | any[] | Date
|
|
234
|
+
immediate?: boolean
|
|
235
|
+
content?: string
|
|
236
|
+
placeholder?: string
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* 内容渲染配置项
|
|
241
|
+
*/
|
|
242
|
+
export interface ContentRender {
|
|
243
|
+
/**
|
|
244
|
+
* 渲染器名称
|
|
245
|
+
*/
|
|
246
|
+
name?: string
|
|
247
|
+
/**
|
|
248
|
+
* 目标组件渲染的参数
|
|
249
|
+
*/
|
|
250
|
+
props?: { [key: string]: any }
|
|
251
|
+
/**
|
|
252
|
+
* 目标组件渲染的属性
|
|
253
|
+
*/
|
|
254
|
+
attrs?: { [key: string]: any }
|
|
255
|
+
/**
|
|
256
|
+
* 目标组件渲染的事件
|
|
257
|
+
*/
|
|
258
|
+
events?: { [key: string]: (...args: any[]) => any }
|
|
259
|
+
/**
|
|
260
|
+
* 多目标渲染
|
|
261
|
+
*/
|
|
262
|
+
children?: any[]
|
|
263
|
+
|
|
264
|
+
options?: any[]
|
|
265
|
+
optionProps?: VxeGlobalRendererHandles.RenderOptionProps
|
|
266
|
+
optionGroups?: any[]
|
|
267
|
+
optionGroupProps?: VxeGlobalRendererHandles.RenderOptionGroupProps
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export type Params = any
|
|
271
|
+
|
|
272
|
+
export type Slots<D = any> = {
|
|
273
|
+
/**
|
|
274
|
+
* 只对 type=checkbox,radio 有效,自定义标题模板
|
|
275
|
+
*/
|
|
276
|
+
title?: string | ((params: VxeColumnSlotTypes.HeaderSlotParams<D>) => VxeComponentSlotType[] | VxeComponentSlotType) | null
|
|
277
|
+
/**
|
|
278
|
+
* 只对 type=radio 有效,自定义单选框模板
|
|
279
|
+
*/
|
|
280
|
+
radio?: string | ((params: VxeColumnSlotTypes.RadioSlotParams<D>) => VxeComponentSlotType[] | VxeComponentSlotType) | null
|
|
281
|
+
/**
|
|
282
|
+
* 只对 type=checkbox 有效,自定义复选框模板
|
|
283
|
+
*/
|
|
284
|
+
checkbox?: string | ((params: VxeColumnSlotTypes.CheckboxSlotParams<D>) => VxeComponentSlotType[] | VxeComponentSlotType) | null
|
|
285
|
+
/**
|
|
286
|
+
* 自定义显示内容模板
|
|
287
|
+
*/
|
|
288
|
+
default?: string | ((params: VxeColumnSlotTypes.DefaultSlotParams<D>) => VxeComponentSlotType[] | VxeComponentSlotType) | null
|
|
289
|
+
/**
|
|
290
|
+
* 自定义表头内容的模板
|
|
291
|
+
*/
|
|
292
|
+
header?: string | ((params: VxeColumnSlotTypes.HeaderSlotParams<D>) => VxeComponentSlotType[] | VxeComponentSlotType) | null
|
|
293
|
+
/**
|
|
294
|
+
* 自定义表尾内容的模板
|
|
295
|
+
*/
|
|
296
|
+
footer?: string | ((params: VxeColumnSlotTypes.FooterSlotParams<D>) => VxeComponentSlotType[] | VxeComponentSlotType) | null
|
|
297
|
+
/**
|
|
298
|
+
* 只对 type=expand 有效,自定义展开后的内容模板
|
|
299
|
+
*/
|
|
300
|
+
content?: string | ((params: VxeColumnSlotTypes.ContentSlotParams<D>) => VxeComponentSlotType[] | VxeComponentSlotType) | null
|
|
301
|
+
/**
|
|
302
|
+
* 只对 filter-render 启用时有效,自定义筛选模板
|
|
303
|
+
*/
|
|
304
|
+
filter?: string | ((params: VxeColumnSlotTypes.FilterSlotParams<D>) => VxeComponentSlotType[] | VxeComponentSlotType) | null
|
|
305
|
+
/**
|
|
306
|
+
* 只对 edit-render 启用时有效,自定义可编辑组件模板
|
|
307
|
+
*/
|
|
308
|
+
edit?: string | ((params: VxeColumnSlotTypes.EditSlotParams<D>) => VxeComponentSlotType[] | VxeComponentSlotType) | null
|
|
309
|
+
/**
|
|
310
|
+
* 只对 edit-render 启用时有效,自定义可编辑组件模板
|
|
311
|
+
*/
|
|
312
|
+
valid?: string | ((params: VxeColumnSlotTypes.ValidSlotParams<D>) => VxeComponentSlotType[] | VxeComponentSlotType) | null
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* 已废弃
|
|
316
|
+
* @deprecated
|
|
317
|
+
*/
|
|
318
|
+
icon?: string | ((params: VxeColumnSlotTypes.IconSlotParams<D>) => VxeComponentSlotType[] | VxeComponentSlotType) | null
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export type VxeColumnProps<D = any> = {
|
|
323
|
+
colId?: VxeColumnPropTypes.ColId
|
|
324
|
+
/**
|
|
325
|
+
* 渲染类型
|
|
326
|
+
*/
|
|
327
|
+
type?: VxeColumnPropTypes.Type
|
|
328
|
+
/**
|
|
329
|
+
* 列字段名
|
|
330
|
+
*/
|
|
331
|
+
field?: VxeColumnPropTypes.Field
|
|
332
|
+
/**
|
|
333
|
+
* 列标题
|
|
334
|
+
*/
|
|
335
|
+
title?: VxeColumnPropTypes.Title
|
|
336
|
+
/**
|
|
337
|
+
* 列宽度
|
|
338
|
+
*/
|
|
339
|
+
width?: VxeColumnPropTypes.Width
|
|
340
|
+
/**
|
|
341
|
+
* 列最小宽度,把剩余宽度按比例分配
|
|
342
|
+
*/
|
|
343
|
+
minWidth?: VxeColumnPropTypes.MinWidth
|
|
344
|
+
/**
|
|
345
|
+
* 列最大宽度
|
|
346
|
+
*/
|
|
347
|
+
maxWidth?: VxeColumnPropTypes.MaxWidth
|
|
348
|
+
/**
|
|
349
|
+
* 是否允许拖动列宽调整大小
|
|
350
|
+
*/
|
|
351
|
+
resizable?: VxeColumnPropTypes.Resizable
|
|
352
|
+
/**
|
|
353
|
+
* 将列固定在左侧或者右侧
|
|
354
|
+
*/
|
|
355
|
+
fixed?: VxeColumnPropTypes.Fixed
|
|
356
|
+
/**
|
|
357
|
+
* 列对其方式
|
|
358
|
+
*/
|
|
359
|
+
align?: VxeColumnPropTypes.Align
|
|
360
|
+
/**
|
|
361
|
+
* 表头对齐方式
|
|
362
|
+
*/
|
|
363
|
+
headerAlign?: VxeColumnPropTypes.HeaderAlign
|
|
364
|
+
/**
|
|
365
|
+
* 表尾列的对齐方式
|
|
366
|
+
*/
|
|
367
|
+
footerAlign?: VxeColumnPropTypes.FooterAlign
|
|
368
|
+
/**
|
|
369
|
+
* 当内容过长时显示为省略号
|
|
370
|
+
*/
|
|
371
|
+
showOverflow?: VxeColumnPropTypes.ShowOverflow
|
|
372
|
+
/**
|
|
373
|
+
* 当表头内容过长时显示为省略号
|
|
374
|
+
*/
|
|
375
|
+
showHeaderOverflow?: VxeColumnPropTypes.ShowHeaderOverflow
|
|
376
|
+
/**
|
|
377
|
+
* 当表尾内容过长时显示为省略号
|
|
378
|
+
*/
|
|
379
|
+
showFooterOverflow?: VxeColumnPropTypes.ShowFooterOverflow
|
|
380
|
+
/**
|
|
381
|
+
* 给单元格附加 className
|
|
382
|
+
*/
|
|
383
|
+
className?: VxeColumnPropTypes.ClassName<D>
|
|
384
|
+
/**
|
|
385
|
+
* 给表头单元格附加 className
|
|
386
|
+
*/
|
|
387
|
+
headerClassName?: VxeColumnPropTypes.HeaderClassName<D>
|
|
388
|
+
/**
|
|
389
|
+
* 给表尾单元格附加 className
|
|
390
|
+
*/
|
|
391
|
+
footerClassName?: VxeColumnPropTypes.FooterClassName<D>
|
|
392
|
+
/**
|
|
393
|
+
* 格式化显示内容
|
|
394
|
+
*/
|
|
395
|
+
formatter?: VxeColumnPropTypes.Formatter<D>
|
|
396
|
+
/**
|
|
397
|
+
* 是否允许排序
|
|
398
|
+
*/
|
|
399
|
+
sortable?: VxeColumnPropTypes.Sortable
|
|
400
|
+
/**
|
|
401
|
+
* 自定义排序的属性
|
|
402
|
+
*/
|
|
403
|
+
sortBy?: VxeColumnPropTypes.SortBy<D>
|
|
404
|
+
/**
|
|
405
|
+
* 排序的字段类型,比如字符串转数值等
|
|
406
|
+
*/
|
|
407
|
+
sortType?: VxeColumnPropTypes.SortType
|
|
408
|
+
/**
|
|
409
|
+
* 配置筛选条件数组
|
|
410
|
+
*/
|
|
411
|
+
filters?: VxeColumnPropTypes.Filter[]
|
|
412
|
+
/**
|
|
413
|
+
* 筛选是否允许多选
|
|
414
|
+
*/
|
|
415
|
+
filterMultiple?: VxeColumnPropTypes.FilterMultiple
|
|
416
|
+
/**
|
|
417
|
+
* 自定义筛选方法
|
|
418
|
+
*/
|
|
419
|
+
filterMethod?: VxeColumnPropTypes.FilterMethod<D>
|
|
420
|
+
/**
|
|
421
|
+
* 筛选模板配置项
|
|
422
|
+
*/
|
|
423
|
+
filterRender?: VxeColumnPropTypes.FilterRender
|
|
424
|
+
/**
|
|
425
|
+
* 指定为树节点
|
|
426
|
+
*/
|
|
427
|
+
treeNode?: VxeColumnPropTypes.TreeNode
|
|
428
|
+
/**
|
|
429
|
+
* 是否可视
|
|
430
|
+
*/
|
|
431
|
+
visible?: VxeColumnPropTypes.Visible
|
|
432
|
+
/**
|
|
433
|
+
* 自定义表尾单元格数据导出方法
|
|
434
|
+
*/
|
|
435
|
+
headerExportMethod?: VxeColumnPropTypes.HeaderExportMethod<D>
|
|
436
|
+
/**
|
|
437
|
+
* 自定义单元格数据导出方法
|
|
438
|
+
*/
|
|
439
|
+
exportMethod?: VxeColumnPropTypes.ExportMethod<D>
|
|
440
|
+
/**
|
|
441
|
+
* 自定义表尾单元格数据导出方法
|
|
442
|
+
*/
|
|
443
|
+
footerExportMethod?: VxeColumnPropTypes.FooterExportMethod<D>
|
|
444
|
+
/**
|
|
445
|
+
* 已废弃,被 titlePrefix 替换
|
|
446
|
+
* @deprecated
|
|
447
|
+
*/
|
|
448
|
+
titleHelp?: VxeColumnPropTypes.TitleHelp
|
|
449
|
+
/**
|
|
450
|
+
* 标题前缀图标配置项
|
|
451
|
+
*/
|
|
452
|
+
titlePrefix?: VxeColumnPropTypes.TitlePrefix
|
|
453
|
+
/**
|
|
454
|
+
* 标题后缀图标配置项
|
|
455
|
+
*/
|
|
456
|
+
titleSuffix?: VxeColumnPropTypes.TitleSuffix
|
|
457
|
+
/**
|
|
458
|
+
* 单元格值类型
|
|
459
|
+
*/
|
|
460
|
+
cellType?: VxeColumnPropTypes.CellType
|
|
461
|
+
/**
|
|
462
|
+
* 单元格渲染配置项
|
|
463
|
+
*/
|
|
464
|
+
cellRender?: VxeColumnPropTypes.CellRender<D>
|
|
465
|
+
/**
|
|
466
|
+
* 单元格编辑渲染配置项
|
|
467
|
+
*/
|
|
468
|
+
editRender?: VxeColumnPropTypes.EditRender<D>
|
|
469
|
+
/**
|
|
470
|
+
* 内容渲染配置项
|
|
471
|
+
*/
|
|
472
|
+
contentRender?: VxeColumnPropTypes.ContentRender
|
|
473
|
+
/**
|
|
474
|
+
* 额外的参数
|
|
475
|
+
*/
|
|
476
|
+
params?: VxeColumnPropTypes.Params
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
export interface ColumnPrivateComputed {
|
|
480
|
+
}
|
|
481
|
+
export interface VxeColumnPrivateComputed extends ColumnPrivateComputed { }
|
|
482
|
+
|
|
483
|
+
export interface ColumnReactData {
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
export interface ColumnMethods {
|
|
487
|
+
dispatchEvent(type: ValueOf<VxeColumnEmits>, params: Record<string, any>, evnt: Event | null): void
|
|
488
|
+
}
|
|
489
|
+
export interface VxeColumnMethods extends ColumnMethods { }
|
|
490
|
+
|
|
491
|
+
export interface ColumnPrivateMethods { }
|
|
492
|
+
export interface VxeColumnPrivateMethods extends ColumnPrivateMethods { }
|
|
493
|
+
|
|
494
|
+
export type VxeColumnEmits = []
|
|
495
|
+
|
|
496
|
+
export namespace VxeColumnDefines {
|
|
497
|
+
export interface ColumnEventParams extends VxeComponentEventParams {
|
|
498
|
+
$column: VxeColumnConstructor
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export type VxeColumnEventProps = {}
|
|
503
|
+
|
|
504
|
+
export interface VxeColumnListeners { }
|
|
505
|
+
|
|
506
|
+
export namespace VxeColumnEvents { }
|
|
507
|
+
|
|
508
|
+
export namespace VxeColumnSlotTypes {
|
|
509
|
+
export interface FilterSlotParams<D = any> {
|
|
510
|
+
$panel: VxeTableDefines.VxeFilterPanel
|
|
511
|
+
column: {
|
|
512
|
+
filters: VxeTableDefines.FilterOption[]
|
|
513
|
+
} & VxeTableDefines.ColumnInfo<D>
|
|
514
|
+
columnIndex: number
|
|
515
|
+
$columnIndex: number
|
|
516
|
+
$rowIndex: number
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
export interface EditSlotParams<D = any> {
|
|
520
|
+
column: VxeTableDefines.ColumnInfo<D>
|
|
521
|
+
columnIndex: number
|
|
522
|
+
$columnIndex: number
|
|
523
|
+
row: D
|
|
524
|
+
rowIndex: number
|
|
525
|
+
$rowIndex: number
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export interface FooterSlotParams<D = any> {
|
|
529
|
+
row: D
|
|
530
|
+
rowIndex: number
|
|
531
|
+
column: VxeTableDefines.ColumnInfo<D>
|
|
532
|
+
columnIndex: number
|
|
533
|
+
_columnIndex: number
|
|
534
|
+
$columnIndex: number
|
|
535
|
+
$rowIndex: number
|
|
536
|
+
items: any[]
|
|
537
|
+
data: D[][]
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
export interface HeaderSlotParams<D = any> extends VxeTableDefines.CellRenderHeaderParams<D> { }
|
|
541
|
+
|
|
542
|
+
export interface ContentSlotParams<D = any> {
|
|
543
|
+
column: VxeTableDefines.ColumnInfo<D>
|
|
544
|
+
columnIndex: number
|
|
545
|
+
$columnIndex: number
|
|
546
|
+
row: D
|
|
547
|
+
rowIndex: number
|
|
548
|
+
$rowIndex: number
|
|
549
|
+
isHidden: boolean
|
|
550
|
+
fixed: VxeColumnPropTypes.Fixed
|
|
551
|
+
type: string
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
export interface DefaultSlotParams<D = any> extends VxeTableDefines.CellRenderBodyParams<D> { }
|
|
555
|
+
|
|
556
|
+
export interface CheckboxSlotParams<D = any> extends DefaultSlotParams<D> {
|
|
557
|
+
checked: boolean
|
|
558
|
+
indeterminate: boolean
|
|
559
|
+
}
|
|
560
|
+
export interface RadioSlotParams<D = any> extends DefaultSlotParams<D> {
|
|
561
|
+
checked: boolean
|
|
562
|
+
}
|
|
563
|
+
export interface IconSlotParams<D = any> extends DefaultSlotParams<D> { }
|
|
564
|
+
|
|
565
|
+
export interface ValidSlotParams<D = any> extends DefaultSlotParams<D> {
|
|
566
|
+
rule: VxeTableDefines.ValidatorRule<D>
|
|
567
|
+
content: string
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
export interface VxeColumnSlots<D = any> {
|
|
572
|
+
/**
|
|
573
|
+
* 自定义显示内容模板
|
|
574
|
+
*/
|
|
575
|
+
default: (params: VxeColumnSlotTypes.DefaultSlotParams<D>) => any
|
|
576
|
+
/**
|
|
577
|
+
* 自定义表头内容的模板
|
|
578
|
+
*/
|
|
579
|
+
header: (params: VxeColumnSlotTypes.HeaderSlotParams<D>) => any
|
|
580
|
+
/**
|
|
581
|
+
* 自定义表尾内容的模板
|
|
582
|
+
*/
|
|
583
|
+
footer: (params: VxeColumnSlotTypes.FooterSlotParams<D>) => any
|
|
584
|
+
/**
|
|
585
|
+
* 只对 type=checkbox,radio 有效,自定义标题模板
|
|
586
|
+
*/
|
|
587
|
+
title: (params: VxeColumnSlotTypes.HeaderSlotParams<D>) => any
|
|
588
|
+
/**
|
|
589
|
+
* 只对 type=checkbox 有效,自定义复选框模板
|
|
590
|
+
*/
|
|
591
|
+
checkbox: (params: VxeColumnSlotTypes.CheckboxSlotParams<D>) => any
|
|
592
|
+
/**
|
|
593
|
+
* 只对 type=radio 有效,自定义单选框模板
|
|
594
|
+
*/
|
|
595
|
+
radio: (params: VxeColumnSlotTypes.RadioSlotParams<D>) => any
|
|
596
|
+
/**
|
|
597
|
+
* 只对 type=expand 有效,自定义展开后的内容模板
|
|
598
|
+
*/
|
|
599
|
+
content: (params: VxeColumnSlotTypes.ContentSlotParams<D>) => any
|
|
600
|
+
/**
|
|
601
|
+
* 只对 filter-render 启用时有效,自定义筛选模板
|
|
602
|
+
*/
|
|
603
|
+
filter: (params: VxeColumnSlotTypes.FilterSlotParams<D>) => any
|
|
604
|
+
/**
|
|
605
|
+
* 只对 edit-render 启用时有效,自定义可编辑组件模板
|
|
606
|
+
*/
|
|
607
|
+
edit: (params: VxeColumnSlotTypes.EditSlotParams<D>) => any
|
|
608
|
+
/**
|
|
609
|
+
* 只对 edit-render 启用时有效,自定义展示错误校验模板
|
|
610
|
+
*/
|
|
611
|
+
valid: (params: VxeColumnSlotTypes.ValidSlotParams<D>) => any
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* 已废弃
|
|
615
|
+
* @deprecated
|
|
616
|
+
*/
|
|
617
|
+
icon: (params: VxeColumnSlotTypes.IconSlotParams<D>) => any
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
export const Column: typeof VxeColumn
|
|
621
|
+
export default VxeColumn
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { RenderFunction, SetupContext, Ref, DefineComponent } from 'vue'
|
|
2
|
-
import {
|
|
2
|
+
import { defineVxeComponent, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentStyleType, VxeComponentSlotType } from '@vxe-ui/core'
|
|
3
|
+
import { VxeFormDefines, VxeFormConstructor, VxeFormPropTypes } from './form'
|
|
4
|
+
import { VxeGridConstructor } from './grid'
|
|
5
|
+
import { VxeTooltipPropTypes } from './tooltip'
|
|
3
6
|
|
|
4
7
|
/* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
|
|
5
8
|
|
|
@@ -107,6 +110,7 @@ export namespace VxeFormItemPropTypes {
|
|
|
107
110
|
label?: string
|
|
108
111
|
key?: string
|
|
109
112
|
}
|
|
113
|
+
children?: any[]
|
|
110
114
|
/**
|
|
111
115
|
* 渲染组件的内容(需要渲染器支持)
|
|
112
116
|
*/
|
|
@@ -116,8 +120,8 @@ export namespace VxeFormItemPropTypes {
|
|
|
116
120
|
}
|
|
117
121
|
export type Rules = VxeFormDefines.FormRule[]
|
|
118
122
|
export type Slots = {
|
|
119
|
-
title?: string | ((params: FormItemTitleRenderParams) =>
|
|
120
|
-
default?: string | ((params: FormItemContentRenderParams) =>
|
|
123
|
+
title?: string | ((params: FormItemTitleRenderParams) => VxeComponentSlotType | VxeComponentSlotType[]) | null
|
|
124
|
+
default?: string | ((params: FormItemContentRenderParams) => VxeComponentSlotType | VxeComponentSlotType[]) | null
|
|
121
125
|
}
|
|
122
126
|
}
|
|
123
127
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RenderFunction, SetupContext, Ref, ComponentPublicInstance, DefineComponent } from 'vue'
|
|
2
|
-
import { defineVxeComponent, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, ValueOf } from '@vxe-ui/core'
|
|
2
|
+
import { defineVxeComponent, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeComponentSlotType } from '@vxe-ui/core'
|
|
3
3
|
import { VxeFormItemPropTypes } from './form-item'
|
|
4
4
|
|
|
5
5
|
/* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
|
|
@@ -177,7 +177,7 @@ export interface FormMethods {
|
|
|
177
177
|
export interface VxeFormMethods extends FormMethods { }
|
|
178
178
|
|
|
179
179
|
export interface FormPrivateMethods {
|
|
180
|
-
callSlot<T>(slotFunc: ((params: T) =>
|
|
180
|
+
callSlot<T>(slotFunc: ((params: T) => VxeComponentSlotType | VxeComponentSlotType[]) | string | null, params: T): VxeComponentSlotType[]
|
|
181
181
|
triggerItemEvent(evnt: Event | { type: string }, field: string, itemValue?: any): Promise<any>
|
|
182
182
|
toggleCollapseEvent(evnt: Event): void
|
|
183
183
|
triggerTitleTipEvent(evnt: MouseEvent, params: {
|