vxe-pc-ui 4.8.11 → 4.8.13
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/README.md +4 -4
- package/es/form/index.js +0 -1
- package/es/form/src/form-config-item.js +1 -0
- package/es/form/src/form-group.js +1 -0
- package/es/form/src/form-item.js +1 -0
- package/es/form/src/form.js +67 -9
- package/es/form/src/render.js +5 -5
- package/es/icon/style.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +9 -0
- package/es/ui/src/log.js +1 -1
- package/lib/form/index.js +0 -1
- package/lib/form/index.min.js +1 -1
- package/lib/form/src/form-config-item.js +1 -0
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-group.js +1 -0
- package/lib/form/src/form-group.min.js +1 -1
- package/lib/form/src/form-item.js +1 -0
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +75 -8
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/render.js +6 -3
- package/lib/form/src/render.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +1409 -1328
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +10 -0
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/form/index.ts +0 -1
- package/packages/form/src/form-config-item.ts +1 -0
- package/packages/form/src/form-group.ts +1 -0
- package/packages/form/src/form-item.ts +1 -0
- package/packages/form/src/form.ts +71 -10
- package/packages/form/src/render.ts +11 -11
- package/packages/ui/src/dom.ts +10 -0
- package/types/components/form.d.ts +11 -2
- package/types/components/gantt-module/gantt-view.d.ts +164 -0
- package/types/components/gantt-module/index.d.ts +1 -0
- package/types/components/gantt.d.ts +113 -29
- package/types/components/grid.d.ts +38 -18
- package/types/components/table-module/custom.d.ts +2 -1
- package/types/components/table.d.ts +32 -9
- package/types/ui/commands.d.ts +3 -1
- package/types/ui/hooks.d.ts +2 -0
- /package/es/icon/{iconfont.1754563062233.ttf → iconfont.1754905375075.ttf} +0 -0
- /package/es/icon/{iconfont.1754563062233.woff → iconfont.1754905375075.woff} +0 -0
- /package/es/icon/{iconfont.1754563062233.woff2 → iconfont.1754905375075.woff2} +0 -0
- /package/es/{iconfont.1754563062233.ttf → iconfont.1754905375075.ttf} +0 -0
- /package/es/{iconfont.1754563062233.woff → iconfont.1754905375075.woff} +0 -0
- /package/es/{iconfont.1754563062233.woff2 → iconfont.1754905375075.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1754563062233.ttf → iconfont.1754905375075.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1754563062233.woff → iconfont.1754905375075.woff} +0 -0
- /package/lib/icon/style/{iconfont.1754563062233.woff2 → iconfont.1754905375075.woff2} +0 -0
- /package/lib/{iconfont.1754563062233.ttf → iconfont.1754905375075.ttf} +0 -0
- /package/lib/{iconfont.1754563062233.woff → iconfont.1754905375075.woff} +0 -0
- /package/lib/{iconfont.1754563062233.woff2 → iconfont.1754905375075.woff2} +0 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { RenderFunction, SetupContext, Ref } from 'vue'
|
|
2
|
+
import { VxeComponentBaseOptions, DefineVxeComponentInstance } from '@vxe-ui/core'
|
|
3
|
+
import { VxeTableConstructor, VxeTableMethods, VxeTablePrivateMethods } from '../table'
|
|
4
|
+
import { VxeGanttPropTypes } from '../gantt'
|
|
5
|
+
|
|
6
|
+
/* eslint-disable no-use-before-define */
|
|
7
|
+
|
|
8
|
+
export interface VxeGanttViewConstructor extends VxeComponentBaseOptions, VxeGanttViewMethods {
|
|
9
|
+
props: VxeGanttViewProps
|
|
10
|
+
context: SetupContext<VxeGanttViewEmits>
|
|
11
|
+
reactData: GanttViewReactData
|
|
12
|
+
internalData: GanttViewInternalData
|
|
13
|
+
getRefMaps(): GanttViewPrivateRef
|
|
14
|
+
getComputeMaps(): GanttViewPrivateComputed
|
|
15
|
+
renderVN: RenderFunction
|
|
16
|
+
}
|
|
17
|
+
export type VxeGanttViewInstance = DefineVxeComponentInstance<VxeGanttViewProps, VxeGanttViewConstructor>
|
|
18
|
+
|
|
19
|
+
interface VxeGanttViewProps {
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface GanttViewReactData {
|
|
23
|
+
// 是否启用了横向 X 可视渲染方式加载
|
|
24
|
+
scrollXLoad: boolean
|
|
25
|
+
// 是否启用了纵向 Y 可视渲染方式加载
|
|
26
|
+
scrollYLoad: boolean
|
|
27
|
+
// 是否存在纵向滚动条
|
|
28
|
+
overflowY: boolean
|
|
29
|
+
// 是否存在横向滚动条
|
|
30
|
+
overflowX: boolean
|
|
31
|
+
// 纵向滚动条的宽度
|
|
32
|
+
scrollbarWidth: number
|
|
33
|
+
// 横向滚动条的高度
|
|
34
|
+
scrollbarHeight: number
|
|
35
|
+
|
|
36
|
+
lazScrollLoading: boolean
|
|
37
|
+
|
|
38
|
+
scrollVMLoading: boolean
|
|
39
|
+
scrollYHeight: number
|
|
40
|
+
scrollYTop: number
|
|
41
|
+
isScrollYBig: boolean
|
|
42
|
+
scrollXLeft: number
|
|
43
|
+
scrollXWidth: number
|
|
44
|
+
isScrollXBig: boolean
|
|
45
|
+
|
|
46
|
+
minViewDate: Date | null
|
|
47
|
+
maxViewDate: Date | null
|
|
48
|
+
tableData: any[]
|
|
49
|
+
tableColumn: VxeGanttPropTypes.Column[]
|
|
50
|
+
headerGroups: VxeGanttPropTypes.Column[][]
|
|
51
|
+
|
|
52
|
+
rowHeightStore: {
|
|
53
|
+
large: number
|
|
54
|
+
default: number
|
|
55
|
+
medium: number
|
|
56
|
+
small: number
|
|
57
|
+
mini: number
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface GanttViewInternalData {
|
|
62
|
+
xeTable: (VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods) | null
|
|
63
|
+
startMaps: Record<string, any>
|
|
64
|
+
endMaps: Record<string, any>
|
|
65
|
+
elemStore: {
|
|
66
|
+
[key: string]: Ref<HTMLElement> | null
|
|
67
|
+
}
|
|
68
|
+
// 存放横向 X 虚拟滚动相关的信息
|
|
69
|
+
scrollXStore: {
|
|
70
|
+
preloadSize: number
|
|
71
|
+
offsetSize: number
|
|
72
|
+
visibleSize: number
|
|
73
|
+
visibleStartIndex: number
|
|
74
|
+
visibleEndIndex: number
|
|
75
|
+
startIndex: number
|
|
76
|
+
endIndex: number
|
|
77
|
+
}
|
|
78
|
+
// 存放纵向 Y 虚拟滚动相关信息
|
|
79
|
+
scrollYStore: {
|
|
80
|
+
adaptive?: boolean
|
|
81
|
+
preloadSize: number
|
|
82
|
+
offsetSize: number
|
|
83
|
+
visibleSize: number
|
|
84
|
+
visibleStartIndex: number
|
|
85
|
+
visibleEndIndex: number
|
|
86
|
+
startIndex: number
|
|
87
|
+
endIndex: number
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// 滚动属性
|
|
91
|
+
intoRunScroll?: boolean
|
|
92
|
+
inVirtualScroll?: boolean
|
|
93
|
+
inWheelScroll?: boolean
|
|
94
|
+
|
|
95
|
+
inHeaderScroll?: boolean
|
|
96
|
+
inBodyScroll?: boolean
|
|
97
|
+
inFooterScroll?: boolean
|
|
98
|
+
scrollRenderType?: '' | 'left' | 'right'
|
|
99
|
+
// 同步滚动
|
|
100
|
+
lcsTimeout?: undefined | number
|
|
101
|
+
lcsRunTime?: undefined | number
|
|
102
|
+
|
|
103
|
+
// 横向虚拟
|
|
104
|
+
lxRunTime?: undefined | number
|
|
105
|
+
lxTimeout?: undefined | number
|
|
106
|
+
// 纵向虚拟
|
|
107
|
+
lyRunTime?: undefined | number
|
|
108
|
+
lyTimeout?: undefined | number
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface GanttViewPrivateRef {
|
|
112
|
+
refElem: Ref<HTMLDivElement | undefined>
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface GanttViewPrivateComputed {
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface VxeGanttViewPrivateMethods {
|
|
119
|
+
/**
|
|
120
|
+
* @private
|
|
121
|
+
*/
|
|
122
|
+
handleUpdateStyle(): void
|
|
123
|
+
/**
|
|
124
|
+
* @private
|
|
125
|
+
*/
|
|
126
|
+
handleLazyRecalculate(): Promise<void>
|
|
127
|
+
/**
|
|
128
|
+
* @private
|
|
129
|
+
*/
|
|
130
|
+
triggerHeaderScrollEvent(evnt: Event): void
|
|
131
|
+
/**
|
|
132
|
+
* @private
|
|
133
|
+
*/
|
|
134
|
+
triggerBodyScrollEvent(evnt: Event): void
|
|
135
|
+
/**
|
|
136
|
+
* @private
|
|
137
|
+
*/
|
|
138
|
+
triggerFooterScrollEvent(evnt: Event): void
|
|
139
|
+
/**
|
|
140
|
+
* @private
|
|
141
|
+
*/
|
|
142
|
+
triggerVirtualScrollXEvent(evnt: Event): void
|
|
143
|
+
/**
|
|
144
|
+
* @private
|
|
145
|
+
*/
|
|
146
|
+
triggerVirtualScrollYEvent(evnt: Event): void
|
|
147
|
+
/**
|
|
148
|
+
* @private
|
|
149
|
+
*/
|
|
150
|
+
updateScrollXSpace(): void
|
|
151
|
+
/**
|
|
152
|
+
* @private
|
|
153
|
+
*/
|
|
154
|
+
updateScrollYSpace(): void
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface VxeGanttViewMethods {
|
|
158
|
+
updateViewData(): Promise<void>
|
|
159
|
+
connectUpdate(params: {
|
|
160
|
+
$table: VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods
|
|
161
|
+
}): Promise<void>
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
type VxeGanttViewEmits = []
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './gantt-view'
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { RenderFunction, SetupContext,
|
|
2
|
-
import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf
|
|
3
|
-
import {
|
|
1
|
+
import { RenderFunction, SetupContext, ComputedRef } from 'vue'
|
|
2
|
+
import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf } from '@vxe-ui/core'
|
|
3
|
+
import { GridPrivateRef, VxeGridProps, VxeGridPropTypes, GridPrivateComputed, GridReactData, GridInternalData, GridMethods, GridPrivateMethods, VxeGridEmits, VxeGridSlots, VxeGridListeners, VxeGridEventProps, VxeGridMethods } from './grid'
|
|
4
|
+
import { VxeTablePropTypes } from './table'
|
|
4
5
|
|
|
5
6
|
/* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
|
|
6
7
|
|
|
7
8
|
export declare const VxeGantt: DefineVxeComponentApp<VxeGanttProps, VxeGanttEventProps, VxeGanttSlots, VxeGanttMethods>
|
|
8
9
|
export type VxeGanttComponent = DefineVxeComponentOptions<VxeGanttProps, VxeGanttEventProps>
|
|
9
10
|
|
|
10
|
-
export type VxeGanttInstance = DefineVxeComponentInstance<VxeGanttProps
|
|
11
|
+
export type VxeGanttInstance<D = any> = DefineVxeComponentInstance<VxeGanttProps<D>, VxeGanttConstructor<D>>
|
|
11
12
|
|
|
12
|
-
export interface VxeGanttConstructor extends VxeComponentBaseOptions, VxeGanttMethods {
|
|
13
|
+
export interface VxeGanttConstructor<D = any> extends VxeComponentBaseOptions, VxeGanttMethods<D> {
|
|
13
14
|
props: VxeGanttProps
|
|
14
15
|
context: SetupContext<VxeGanttEmits>
|
|
15
16
|
reactData: GanttReactData
|
|
@@ -19,59 +20,142 @@ export interface VxeGanttConstructor extends VxeComponentBaseOptions, VxeGanttMe
|
|
|
19
20
|
renderVN: RenderFunction
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
export interface GanttPrivateRef<D = any> {
|
|
23
|
-
refElem: Ref<HTMLDivElement | undefined>
|
|
24
|
-
refTable: Ref<VxeTableInstance<D> | undefined>
|
|
23
|
+
export interface GanttPrivateRef<D = any> extends GridPrivateRef<D> {
|
|
25
24
|
}
|
|
26
|
-
export interface VxeGanttPrivateRef extends GanttPrivateRef { }
|
|
25
|
+
export interface VxeGanttPrivateRef<D = any> extends GanttPrivateRef<D> { }
|
|
27
26
|
|
|
28
27
|
export namespace VxeGanttPropTypes {
|
|
29
|
-
export type Size =
|
|
28
|
+
export type Size = VxeGridPropTypes.Size
|
|
29
|
+
export type Layouts = VxeGridPropTypes.Layouts
|
|
30
|
+
export type Column<D = any> = VxeGridPropTypes.Column<D>
|
|
31
|
+
export type Columns<D = any> = Column<D>[]
|
|
32
|
+
export interface PagerConfig extends VxeGridPropTypes.PagerConfig {}
|
|
33
|
+
export interface ProxyConfig<D = any> extends VxeGridPropTypes.ProxyConfig<D> {}
|
|
34
|
+
export interface ToolbarConfig extends VxeGridPropTypes.ToolbarConfig {}
|
|
35
|
+
export interface FormConfig extends VxeGridPropTypes.FormConfig {}
|
|
36
|
+
export interface ZoomConfig extends VxeGridPropTypes.ZoomConfig {}
|
|
37
|
+
|
|
38
|
+
export interface TaskConfig {
|
|
39
|
+
/**
|
|
40
|
+
* 标题的字段名
|
|
41
|
+
*/
|
|
42
|
+
titleField?: string
|
|
43
|
+
/**
|
|
44
|
+
* 开始日期的字段名
|
|
45
|
+
*/
|
|
46
|
+
startField?: string
|
|
47
|
+
/**
|
|
48
|
+
* 结束日期的字段名
|
|
49
|
+
*/
|
|
50
|
+
endField?: string
|
|
51
|
+
/**
|
|
52
|
+
* 进度的字段名
|
|
53
|
+
*/
|
|
54
|
+
progressField?: string
|
|
55
|
+
}
|
|
56
|
+
export interface TaskViewConfig<D = any> {
|
|
57
|
+
/**
|
|
58
|
+
* 视图的渲染模式
|
|
59
|
+
*/
|
|
60
|
+
mode?: 'day' | 'week' | 'month' | 'quarter' | 'year'
|
|
61
|
+
/**
|
|
62
|
+
* 表格样式
|
|
63
|
+
*/
|
|
64
|
+
tableStyle?: {
|
|
65
|
+
width?: number | string
|
|
66
|
+
minWidth?: number | string
|
|
67
|
+
maxWidth?: number | string
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* 视图样式
|
|
71
|
+
*/
|
|
72
|
+
viewStyle?: {
|
|
73
|
+
width?: number | string
|
|
74
|
+
minWidth?: number | string
|
|
75
|
+
maxWidth?: number | string
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
export interface TaskBarConfig<D = any> {
|
|
79
|
+
/**
|
|
80
|
+
* 是否在进度条显示标题
|
|
81
|
+
*/
|
|
82
|
+
showTitle?: boolean
|
|
83
|
+
/**
|
|
84
|
+
* 自定义标题的方法
|
|
85
|
+
*/
|
|
86
|
+
titleMethod?(params: {
|
|
87
|
+
title: string
|
|
88
|
+
row: D
|
|
89
|
+
}): string | number
|
|
90
|
+
}
|
|
30
91
|
}
|
|
31
92
|
|
|
32
|
-
export
|
|
33
|
-
|
|
93
|
+
export interface VxeGanttProps<D = any> extends VxeGridProps<D> {
|
|
94
|
+
taskConfig?: VxeGanttPropTypes.TaskConfig
|
|
95
|
+
taskViewConfig?: VxeGanttPropTypes.TaskViewConfig
|
|
96
|
+
taskBarConfig?: VxeGanttPropTypes.TaskBarConfig
|
|
34
97
|
}
|
|
35
98
|
|
|
36
|
-
export interface GanttPrivateComputed {
|
|
99
|
+
export interface GanttPrivateComputed<D = any> extends GridPrivateComputed<D> {
|
|
100
|
+
computeTaskOpts: ComputedRef<VxeGanttPropTypes.TaskConfig>
|
|
101
|
+
computeTaskViewOpts: ComputedRef<VxeGanttPropTypes.TaskViewConfig>
|
|
102
|
+
computeTaskBarOpts: ComputedRef<VxeGanttPropTypes.TaskBarConfig>
|
|
103
|
+
computeTitleField: ComputedRef<string>
|
|
104
|
+
computeStartField: ComputedRef<string>
|
|
105
|
+
computeEndField: ComputedRef<string>
|
|
106
|
+
computeProgressField: ComputedRef<string>
|
|
107
|
+
computeScrollbarOpts: ComputedRef<VxeTablePropTypes.ScrollbarConfig>
|
|
108
|
+
computeScrollbarXToTop: ComputedRef<boolean>
|
|
109
|
+
computeScrollbarYToLeft: ComputedRef<boolean>
|
|
37
110
|
}
|
|
38
|
-
export interface VxeGanttPrivateComputed extends GanttPrivateComputed { }
|
|
111
|
+
export interface VxeGanttPrivateComputed<D = any> extends GanttPrivateComputed<D> { }
|
|
39
112
|
|
|
40
|
-
export interface GanttReactData {
|
|
113
|
+
export interface GanttReactData<D = any> extends GridReactData<D> {
|
|
41
114
|
}
|
|
42
115
|
|
|
43
|
-
export interface GanttInternalData {
|
|
44
|
-
}
|
|
116
|
+
export interface GanttInternalData extends GridInternalData {}
|
|
45
117
|
|
|
46
|
-
export interface GanttMethods {
|
|
118
|
+
export interface GanttMethods<D = any> extends Omit<GridMethods<D>, 'dispatchEvent'> {
|
|
47
119
|
dispatchEvent(type: ValueOf<VxeGanttEmits>, params: Record<string, any>, evnt: Event | null): void
|
|
48
120
|
}
|
|
49
|
-
export interface VxeGanttMethods extends GanttMethods { }
|
|
121
|
+
export interface VxeGanttMethods<D = any> extends GanttMethods<D>, Omit<VxeGridMethods<D>, 'dispatchEvent'> { }
|
|
50
122
|
|
|
51
|
-
export interface GanttPrivateMethods {
|
|
123
|
+
export interface GanttPrivateMethods extends GridPrivateMethods {
|
|
124
|
+
}
|
|
52
125
|
export interface VxeGanttPrivateMethods extends GanttPrivateMethods { }
|
|
53
126
|
|
|
54
|
-
export type VxeGanttEmits = [
|
|
127
|
+
export type VxeGanttEmits = [
|
|
128
|
+
...VxeGridEmits
|
|
129
|
+
]
|
|
55
130
|
|
|
56
131
|
export namespace VxeGanttDefines {
|
|
57
|
-
export interface GanttEventParams extends VxeComponentEventParams {
|
|
58
|
-
$gantt: VxeGanttConstructor
|
|
132
|
+
export interface GanttEventParams<D = any> extends VxeComponentEventParams {
|
|
133
|
+
$gantt: VxeGanttConstructor<D>
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface GroupHeaderColumn<D = any> extends VxeGanttPropTypes.Column<D> {
|
|
137
|
+
children: VxeGanttPropTypes.Column<D>[]
|
|
59
138
|
}
|
|
60
139
|
}
|
|
61
140
|
|
|
62
|
-
export
|
|
141
|
+
export interface VxeGanttEventProps<D = any> extends VxeGridEventProps<D> {}
|
|
63
142
|
|
|
64
|
-
export interface VxeGanttListeners {
|
|
143
|
+
export interface VxeGanttListeners<D = any> extends VxeGridListeners<D> {
|
|
144
|
+
}
|
|
65
145
|
|
|
66
|
-
export namespace VxeGanttEvents {
|
|
146
|
+
export namespace VxeGanttEvents {
|
|
147
|
+
}
|
|
67
148
|
|
|
68
149
|
export namespace VxeGanttSlotTypes {
|
|
69
|
-
export interface DefaultSlotParams {
|
|
150
|
+
export interface DefaultSlotParams<D = any> {
|
|
151
|
+
$gantt: VxeGanttConstructor<D>
|
|
152
|
+
}
|
|
70
153
|
}
|
|
71
154
|
|
|
72
|
-
export interface VxeGanttSlots {
|
|
73
|
-
default?: (params: VxeGanttSlotTypes.DefaultSlotParams) => any
|
|
155
|
+
export interface VxeGanttSlots<D = any> extends VxeGridSlots<D> {
|
|
74
156
|
}
|
|
75
157
|
|
|
158
|
+
export * from './gantt-module'
|
|
159
|
+
|
|
76
160
|
export const Gantt: typeof VxeGantt
|
|
77
161
|
export default VxeGantt
|
|
@@ -6,6 +6,7 @@ import { VxeColumnPropTypes } from './column'
|
|
|
6
6
|
import { VxePagerInstance, VxePagerProps, VxePagerDefines, VxePagerSlotTypes } from './pager'
|
|
7
7
|
import { VxeFormInstance, VxeFormProps, VxeFormDefines } from './form'
|
|
8
8
|
import { VxeFormItemPropTypes, VxeFormItemProps } from './form-item'
|
|
9
|
+
import { VxeGanttConstructor } from './gantt'
|
|
9
10
|
|
|
10
11
|
/* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
|
|
11
12
|
|
|
@@ -26,10 +27,10 @@ export interface VxeGridConstructor<D = any> extends VxeComponentBaseOptions, Vx
|
|
|
26
27
|
|
|
27
28
|
export interface GridPrivateRef<D = any> {
|
|
28
29
|
refElem: Ref<HTMLDivElement | undefined>
|
|
29
|
-
refTable: Ref<VxeTableInstance<D
|
|
30
|
-
refForm: Ref<VxeFormInstance>
|
|
31
|
-
refToolbar: Ref<VxeToolbarInstance>
|
|
32
|
-
refPager: Ref<VxePagerInstance>
|
|
30
|
+
refTable: Ref<VxeTableInstance<D> | undefined>
|
|
31
|
+
refForm: Ref<VxeFormInstance | undefined>
|
|
32
|
+
refToolbar: Ref<VxeToolbarInstance | undefined>
|
|
33
|
+
refPager: Ref<VxePagerInstance | undefined>
|
|
33
34
|
}
|
|
34
35
|
export interface VxeGridPrivateRef<D = any> extends GridPrivateRef<D> { }
|
|
35
36
|
|
|
@@ -79,7 +80,9 @@ export namespace VxeGridPropTypes {
|
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
interface ProxyAjaxQueryParams<D = any> {
|
|
82
|
-
$
|
|
83
|
+
$table: VxeTableConstructor<D>
|
|
84
|
+
$grid: VxeGridConstructor<D> | null | undefined
|
|
85
|
+
$gantt: VxeGanttConstructor<D> | null | undefined
|
|
83
86
|
page: ProxyAjaxQueryPageParams
|
|
84
87
|
sort: ProxyAjaxQuerySortCheckedParams<D>
|
|
85
88
|
sorts: ProxyAjaxQuerySortCheckedParams<D>[]
|
|
@@ -91,7 +94,8 @@ export namespace VxeGridPropTypes {
|
|
|
91
94
|
|
|
92
95
|
interface ProxyAjaxQueryAllParams<D = any> {
|
|
93
96
|
$table: VxeTableConstructor<D>
|
|
94
|
-
$grid: VxeGridConstructor<D>
|
|
97
|
+
$grid: VxeGridConstructor<D> | null | undefined
|
|
98
|
+
$gantt: VxeGanttConstructor<D> | null | undefined
|
|
95
99
|
sort: ProxyAjaxQuerySortCheckedParams<D>
|
|
96
100
|
sorts: ProxyAjaxQuerySortCheckedParams<D>[]
|
|
97
101
|
filters: VxeTableDefines.FilterCheckedParams[]
|
|
@@ -102,14 +106,18 @@ export namespace VxeGridPropTypes {
|
|
|
102
106
|
}
|
|
103
107
|
|
|
104
108
|
interface ProxyAjaxDeleteParams<D = any> {
|
|
105
|
-
$
|
|
109
|
+
$table: VxeTableConstructor<D>
|
|
110
|
+
$grid: VxeGridConstructor<D> | null | undefined
|
|
111
|
+
$gantt: VxeGanttConstructor<D> | null | undefined
|
|
106
112
|
body: {
|
|
107
113
|
removeRecords: D[]
|
|
108
114
|
}
|
|
109
115
|
}
|
|
110
116
|
|
|
111
117
|
interface ProxyAjaxSaveParams<D = any> {
|
|
112
|
-
$
|
|
118
|
+
$table: VxeTableConstructor<D>
|
|
119
|
+
$grid: VxeGridConstructor<D> | null | undefined
|
|
120
|
+
$gantt: VxeGanttConstructor<D> | null | undefined
|
|
113
121
|
body: {
|
|
114
122
|
insertRecords: D[]
|
|
115
123
|
updateRecords: D[]
|
|
@@ -145,19 +153,27 @@ export namespace VxeGridPropTypes {
|
|
|
145
153
|
response?: {
|
|
146
154
|
list?: string | null | ((params: {
|
|
147
155
|
data: any
|
|
148
|
-
$
|
|
156
|
+
$table: VxeTableConstructor<D>
|
|
157
|
+
$grid: VxeGridConstructor<D> | null | undefined
|
|
158
|
+
$gantt: VxeGanttConstructor<D> | null | undefined
|
|
149
159
|
}) => any[])
|
|
150
160
|
result?: string | ((params: {
|
|
151
161
|
data: any
|
|
152
|
-
$
|
|
162
|
+
$table: VxeTableConstructor<D>
|
|
163
|
+
$grid: VxeGridConstructor<D> | null | undefined
|
|
164
|
+
$gantt: VxeGanttConstructor<D> | null | undefined
|
|
153
165
|
}) => any[])
|
|
154
166
|
total?: string | ((params: {
|
|
155
167
|
data: any
|
|
156
|
-
$
|
|
168
|
+
$table: VxeTableConstructor<D>
|
|
169
|
+
$grid: VxeGridConstructor<D> | null | undefined
|
|
170
|
+
$gantt: VxeGanttConstructor<D> | null | undefined
|
|
157
171
|
}) => number)
|
|
158
172
|
message?: string | ((params: {
|
|
159
173
|
data: any
|
|
160
|
-
$
|
|
174
|
+
$table: VxeTableConstructor<D>
|
|
175
|
+
$grid: VxeGridConstructor<D> | null | undefined
|
|
176
|
+
$gantt: VxeGanttConstructor<D> | null | undefined
|
|
161
177
|
}) => string)
|
|
162
178
|
}
|
|
163
179
|
ajax?: {
|
|
@@ -268,14 +284,14 @@ export interface VxeGridProps<D = any> extends VxeTableProps<D> {
|
|
|
268
284
|
zoomConfig?: VxeGridPropTypes.ZoomConfig
|
|
269
285
|
}
|
|
270
286
|
|
|
271
|
-
export interface GridPrivateComputed {
|
|
272
|
-
computeProxyOpts: ComputedRef<VxeGridPropTypes.
|
|
287
|
+
export interface GridPrivateComputed<D = any> {
|
|
288
|
+
computeProxyOpts: ComputedRef<VxeGridPropTypes.ProxyConfig<D>>
|
|
273
289
|
computePagerOpts: ComputedRef<VxeGridPropTypes.PagerOpts>
|
|
274
290
|
computeFormOpts: ComputedRef<VxeGridPropTypes.FormOpts>
|
|
275
291
|
computeToolbarOpts: ComputedRef<VxeGridPropTypes.ToolbarOpts>
|
|
276
292
|
computeZoomOpts: ComputedRef<VxeGridPropTypes.ZoomOpts>
|
|
277
293
|
}
|
|
278
|
-
export interface VxeGridPrivateComputed extends GridPrivateComputed { }
|
|
294
|
+
export interface VxeGridPrivateComputed<D = any> extends GridPrivateComputed<D> { }
|
|
279
295
|
|
|
280
296
|
export interface GridReactData<D = any> {
|
|
281
297
|
tableLoading: boolean
|
|
@@ -322,12 +338,12 @@ export interface GridMethods<D = any> {
|
|
|
322
338
|
/**
|
|
323
339
|
* 对表单进行校验,返回校验结果 promise
|
|
324
340
|
*/
|
|
325
|
-
validateForm(): Promise<VxeFormDefines.ValidateErrorMapParams>
|
|
341
|
+
validateForm(): Promise<VxeFormDefines.ValidateErrorMapParams | void>
|
|
326
342
|
/**
|
|
327
343
|
* 对表单指定项进行校验,返回校验结果 promise
|
|
328
344
|
* @param field 字段名
|
|
329
345
|
*/
|
|
330
|
-
validateFormField(field: VxeFormItemPropTypes.Field | VxeFormItemPropTypes.Field[] | VxeFormDefines.ItemInfo | VxeFormDefines.ItemInfo[] | null): Promise<VxeFormDefines.ValidateErrorMapParams>
|
|
346
|
+
validateFormField(field: VxeFormItemPropTypes.Field | VxeFormItemPropTypes.Field[] | VxeFormDefines.ItemInfo | VxeFormDefines.ItemInfo[] | null): Promise<VxeFormDefines.ValidateErrorMapParams | void>
|
|
331
347
|
/**
|
|
332
348
|
* 手动清除表单校验状态,如果指定 field 则清除指定的项,否则清除整个表单
|
|
333
349
|
* @param field 字段名
|
|
@@ -457,7 +473,9 @@ export type VxeGridEmits = [
|
|
|
457
473
|
|
|
458
474
|
export namespace VxeGridDefines {
|
|
459
475
|
export interface GridEventParams<D = any> extends VxeComponentEventParams {
|
|
460
|
-
$
|
|
476
|
+
$table: VxeTableConstructor<D>
|
|
477
|
+
$grid: VxeGridConstructor<D> | null | undefined
|
|
478
|
+
$gantt: VxeGanttConstructor<D> | null | undefined
|
|
461
479
|
}
|
|
462
480
|
|
|
463
481
|
export interface KeydownStartEventParams<D = any> extends GridEventParams<D>, VxeTableDefines.KeydownStartEventParams<D> { }
|
|
@@ -781,6 +799,7 @@ export namespace VxeGridSlotTypes {
|
|
|
781
799
|
export interface DefaultSlotParams<D = any> {
|
|
782
800
|
$table: VxeTableConstructor<D>
|
|
783
801
|
$grid: VxeGridConstructor<D> | null | undefined
|
|
802
|
+
$gantt: VxeGanttConstructor<D> | null | undefined
|
|
784
803
|
rowid: string
|
|
785
804
|
/**
|
|
786
805
|
* 当前行对象,支持数据双向绑定
|
|
@@ -846,6 +865,7 @@ export namespace VxeGridSlotTypes {
|
|
|
846
865
|
export interface BaseSlotParams<D = any> {
|
|
847
866
|
$table: VxeTableConstructor<D>
|
|
848
867
|
$grid: VxeGridConstructor<D> | null | undefined
|
|
868
|
+
$gantt: VxeGanttConstructor<D> | null | undefined
|
|
849
869
|
}
|
|
850
870
|
export interface EmptySlotParams<D = any> extends BaseSlotParams<D> {}
|
|
851
871
|
export interface LoadingSlotParams<D = any> extends BaseSlotParams<D> {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RenderFunction, SetupContext, Ref } from 'vue'
|
|
2
|
-
import { VxeComponentBaseOptions } from '@vxe-ui/core'
|
|
2
|
+
import { VxeComponentBaseOptions, DefineVxeComponentInstance } from '@vxe-ui/core'
|
|
3
3
|
import { VxeTableDefines, VxeTableConstructor, VxeTableMethods, VxeTablePrivateMethods } from '../table'
|
|
4
4
|
|
|
5
5
|
/* eslint-disable no-use-before-define */
|
|
@@ -15,6 +15,7 @@ export interface VxeTableCustomPanelConstructor extends VxeComponentBaseOptions,
|
|
|
15
15
|
|
|
16
16
|
xeTable: VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods
|
|
17
17
|
}
|
|
18
|
+
export type VxeTableCustomPanelInstance = DefineVxeComponentInstance<VxeTableCustomPanelProps, VxeTableCustomPanelConstructor>
|
|
18
19
|
|
|
19
20
|
interface VxeTableCustomPanelProps {
|
|
20
21
|
customStore?: VxeTableDefines.VxeTableCustomStoreObj
|
|
@@ -8,6 +8,8 @@ import { VxeModalPropTypes } from './modal'
|
|
|
8
8
|
import { VxeDrawerPropTypes } from './drawer'
|
|
9
9
|
import { VxeToolbarConstructor, VxeToolbarInstance } from './toolbar'
|
|
10
10
|
import { VxeTableCustomPanelConstructor } from './table-module/custom'
|
|
11
|
+
import { VxeGanttConstructor } from './gantt'
|
|
12
|
+
import { VxeGanttViewConstructor, VxeGanttViewInstance, VxeGanttViewPrivateMethods } from './gantt-module/gantt-view'
|
|
11
13
|
|
|
12
14
|
/* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
|
|
13
15
|
|
|
@@ -25,7 +27,8 @@ export interface VxeTableConstructor<D = any> extends VxeComponentBaseOptions, V
|
|
|
25
27
|
getComputeMaps(): TablePrivateComputed
|
|
26
28
|
renderVN: RenderFunction
|
|
27
29
|
|
|
28
|
-
xeGrid: VxeGridConstructor<D> | null
|
|
30
|
+
xeGrid: VxeGridConstructor<D> | null | undefined
|
|
31
|
+
xeGantt: VxeGanttConstructor<D> | null | undefined
|
|
29
32
|
|
|
30
33
|
/**
|
|
31
34
|
* @deprecated
|
|
@@ -2551,6 +2554,10 @@ export namespace VxeTablePropTypes {
|
|
|
2551
2554
|
* 滚动条显示位置
|
|
2552
2555
|
*/
|
|
2553
2556
|
position?: 'top' | 'bottom' | ''
|
|
2557
|
+
/**
|
|
2558
|
+
* 是否显示
|
|
2559
|
+
*/
|
|
2560
|
+
visible?: boolean
|
|
2554
2561
|
}
|
|
2555
2562
|
/**
|
|
2556
2563
|
* 纵向滚动条
|
|
@@ -2560,6 +2567,10 @@ export namespace VxeTablePropTypes {
|
|
|
2560
2567
|
* 滚动条显示位置
|
|
2561
2568
|
*/
|
|
2562
2569
|
position?: 'left' | 'right' | ''
|
|
2570
|
+
/**
|
|
2571
|
+
* 是否显示
|
|
2572
|
+
*/
|
|
2573
|
+
visible?: boolean
|
|
2563
2574
|
}
|
|
2564
2575
|
}
|
|
2565
2576
|
|
|
@@ -3463,9 +3474,14 @@ export interface TableReactData<D = any> {
|
|
|
3463
3474
|
/**
|
|
3464
3475
|
* 行高
|
|
3465
3476
|
* @deprecated
|
|
3466
|
-
* @property
|
|
3467
3477
|
*/
|
|
3468
3478
|
rowHeight: number
|
|
3479
|
+
// 表头高度
|
|
3480
|
+
tHeaderHeight: number
|
|
3481
|
+
// 表体高度
|
|
3482
|
+
tBodyHeight: number
|
|
3483
|
+
// 表尾高度
|
|
3484
|
+
tFooterHeight: number
|
|
3469
3485
|
// 表格父容器的高度
|
|
3470
3486
|
parentHeight: number
|
|
3471
3487
|
// 是否使用分组表头
|
|
@@ -3727,10 +3743,6 @@ export interface TableInternalData<D = any> {
|
|
|
3727
3743
|
tableWidth: number
|
|
3728
3744
|
// 表格高度
|
|
3729
3745
|
tableHeight: number
|
|
3730
|
-
// 表头高度
|
|
3731
|
-
headerHeight: number
|
|
3732
|
-
// 表尾高度
|
|
3733
|
-
footerHeight: number
|
|
3734
3746
|
customHeight: number
|
|
3735
3747
|
customMinHeight: number
|
|
3736
3748
|
customMaxHeight: number
|
|
@@ -3860,6 +3872,9 @@ export interface TableInternalData<D = any> {
|
|
|
3860
3872
|
// 展开手风琴
|
|
3861
3873
|
treeEATime?: undefined | number
|
|
3862
3874
|
|
|
3875
|
+
// 甘特图
|
|
3876
|
+
xeGanttView?: VxeGanttViewConstructor & VxeGanttViewPrivateMethods
|
|
3877
|
+
|
|
3863
3878
|
// 内部属性
|
|
3864
3879
|
_lastResizeTime?: any
|
|
3865
3880
|
_keyCtx?: any
|
|
@@ -4736,11 +4751,15 @@ export interface TableMethods<DT = any> {
|
|
|
4736
4751
|
* 用于 mouse-config.area,更新已选区域的单元格样式
|
|
4737
4752
|
*/
|
|
4738
4753
|
updateCellAreas(): Promise<void>
|
|
4754
|
+
/**
|
|
4755
|
+
* 已废弃,请使用 connectToolbar
|
|
4756
|
+
* @deprecated
|
|
4757
|
+
*/
|
|
4758
|
+
connect($toolbar: VxeToolbarConstructor | VxeToolbarInstance): Promise<void>
|
|
4739
4759
|
/**
|
|
4740
4760
|
* 连接工具栏
|
|
4741
|
-
* @param toolbar 工具栏组件实例
|
|
4742
4761
|
*/
|
|
4743
|
-
|
|
4762
|
+
connectToolbar($toolbar: VxeToolbarConstructor | VxeToolbarInstance): Promise<void>
|
|
4744
4763
|
/**
|
|
4745
4764
|
* 使表格获取焦点
|
|
4746
4765
|
*/
|
|
@@ -5071,9 +5090,13 @@ export interface TablePrivateMethods<D = any> {
|
|
|
5071
5090
|
* 已废弃,被 getCellElement 替换
|
|
5072
5091
|
* @deprecated
|
|
5073
5092
|
*/
|
|
5074
|
-
getCell(row: any, column: VxeTableDefines.ColumnInfo<any>):
|
|
5093
|
+
getCell(row: any, column: VxeTableDefines.ColumnInfo<any>): HTMLTableCellElement | null
|
|
5075
5094
|
findRowIndexOf(list: any[], row: any): number
|
|
5076
5095
|
eqRow(row1: any, row2: any): boolean
|
|
5096
|
+
/**
|
|
5097
|
+
* @private
|
|
5098
|
+
*/
|
|
5099
|
+
handleConnectGanttView($ganttView: VxeGanttViewConstructor | VxeGanttViewInstance): Promise<void>
|
|
5077
5100
|
}
|
|
5078
5101
|
export interface VxeTablePrivateMethods<D = any> extends TablePrivateMethods<D> { }
|
|
5079
5102
|
|
package/types/ui/commands.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { VxeGridConstructor } from '../components/grid'
|
|
2
2
|
import { VxeToolbarPropTypes } from '../components/toolbar'
|
|
3
3
|
import { VxeTableConstructor } from '../components/table'
|
|
4
|
+
import { VxeGanttConstructor } from '../components/gantt'
|
|
4
5
|
import { VxeDatePickerConstructor, VxeDatePickerDefines } from '../components/date-picker'
|
|
5
6
|
import { VxeDateRangePickerConstructor, VxeDateRangePickerDefines } from '../components/date-range-picker'
|
|
6
7
|
|
|
@@ -46,8 +47,9 @@ declare module '@vxe-ui/core' {
|
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
export interface TableCommandMethodParams {
|
|
49
|
-
$grid: VxeGridConstructor | null | undefined
|
|
50
50
|
$table: VxeTableConstructor
|
|
51
|
+
$grid: VxeGridConstructor | null | undefined
|
|
52
|
+
$gantt: VxeGanttConstructor | null | undefined
|
|
51
53
|
button: VxeToolbarPropTypes.ButtonConfig | null | undefined
|
|
52
54
|
code: string | undefined
|
|
53
55
|
}
|
package/types/ui/hooks.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { VxeTableConstructor, VxeTableMethods, VxeTablePrivateMethods } from '../components/table'
|
|
2
2
|
import { VxeGridConstructor, VxeGridPrivateMethods } from '../components/grid'
|
|
3
|
+
import { VxeGanttConstructor, VxeGanttPrivateMethods } from '../components/gantt'
|
|
3
4
|
|
|
4
5
|
declare module '@vxe-ui/core' {
|
|
5
6
|
export namespace VxeGlobalHooksHandles {
|
|
6
7
|
export interface HookOptions {
|
|
7
8
|
setupTable?($table: VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods<any>): void | Record<string, any>
|
|
8
9
|
setupGrid?($grid: VxeGridConstructor & VxeGridPrivateMethods): void | Record<string, any>
|
|
10
|
+
setupGantt?($grid: VxeGanttConstructor & VxeGanttPrivateMethods): void | Record<string, any>
|
|
9
11
|
}
|
|
10
12
|
}
|
|
11
13
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|