Skip to content

Commit 06d166e

Browse files
committed
releases 4.11.22
1 parent a630bd5 commit 06d166e

File tree

3 files changed

+112
-6
lines changed

3 files changed

+112
-6
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vxe-pc-ui",
3-
"version": "4.11.20",
3+
"version": "4.11.22",
44
"description": "A vue based PC component library",
55
"scripts": {
66
"update": "npm install --legacy-peer-deps",
@@ -25,7 +25,7 @@
2525
"style": "lib/style.css",
2626
"typings": "types/index.d.ts",
2727
"dependencies": {
28-
"@vxe-ui/core": "^4.2.17"
28+
"@vxe-ui/core": "^4.2.18"
2929
},
3030
"devDependencies": {
3131
"@typescript-eslint/eslint-plugin": "^6.21.0",

types/components/gantt-plugins/extend-gantt-chart.d.ts

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ export interface VxeGanttExtendChartPrivateMethods<D = any> {
5454
title: string
5555
vbStyle: VxeComponentStyleType
5656
vpStyle: VxeComponentStyleType
57+
rowid: string
58+
ctOns: {
59+
onMouseover?: any
60+
onMouseleave?: any
61+
}
5762
}): VNode[]
5863
/**
5964
* @private
@@ -66,7 +71,27 @@ export interface VxeGanttExtendChartPrivateMethods<D = any> {
6671
/**
6772
* @private
6873
*/
69-
renderGanttTaskLines(): VNode[]
74+
handleTaskCreateLinkStartMousedownEvent(evnt: MouseEvent): void
75+
/**
76+
* @private
77+
*/
78+
handleTaskCreateLinkEndMousedownEvent(evnt: MouseEvent): void
79+
/**
80+
* @private
81+
*/
82+
handleTaskCreateLinkPointMouseoverEvent(evnt: MouseEvent): void
83+
/**
84+
* @private
85+
*/
86+
handleTaskCreateLinkPointMouseoutEvent(evnt: MouseEvent): void
87+
/**
88+
* @private
89+
*/
90+
renderGanttTaskChartBefores(): VNode[]
91+
/**
92+
* @private
93+
*/
94+
renderGanttTaskChartAfters(): VNode[]
7095
/**
7196
* @private
7297
*/
@@ -78,7 +103,7 @@ export interface VxeGanttExtendChartPrivateMethods<D = any> {
78103
/**
79104
* @private
80105
*/
81-
handleTaskUpdateLinks(links: VxeGanttPropTypes.Links): Promise<void>
106+
handleTaskLoadLinks(links: VxeGanttPropTypes.Links): Promise<void>
82107
}
83108

84109
declare module '../gantt' {

types/components/gantt.d.ts

Lines changed: 83 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,23 +264,68 @@ export namespace VxeGanttPropTypes {
264264
* 是否启用
265265
*/
266266
enabled?: boolean
267+
/**
268+
* 当鼠标点击依赖线时,是否要高亮当前依赖线
269+
*/
270+
isCurrent?: boolean
271+
/**
272+
* 当鼠标移到依赖线时,是否要高亮当前依赖线
273+
*/
274+
isHover?: boolean
275+
/**
276+
* 是否允许双击依赖线删除
277+
*/
278+
isDblclickToRemove?: boolean
279+
/**
280+
* 依赖线被删除之前的方法,可以通过返回 false 阻止删除
281+
*/
282+
beforeRemoveMethod?(params: {
283+
$gantt: VxeGanttConstructor<D>
284+
linkItem: VxeGanttDefines.LinkConfObj
285+
fromRow: D
286+
toRow: D
287+
}): Promise<boolean> | boolean
288+
/**
289+
* 依赖线删除之后的方法
290+
*/
291+
afterRemoveMethod?(params: {
292+
$gantt: VxeGanttConstructor<D>
293+
linkItem: VxeGanttDefines.LinkConfObj
294+
fromRow: D
295+
toRow: D
296+
}): void
267297
/**
268298
* 拖拽开始时是否允许依赖线创建的方法,该方法的返回值用来决定是否允许被拖拽
269299
*/
270300
createStartMethod?(params: {
271301
$gantt: VxeGanttConstructor<D>
302+
fromRow: D
303+
fromPoint: 'start' | 'end'
272304
}): boolean
273305
/**
274306
* 拖拽依赖线创建结束时的方法,该方法的返回值用来决定是否允依赖线许被创建
275307
*/
276308
createEndMethod?(params: {
277309
$gantt: VxeGanttConstructor<D>
310+
fromRow: D
311+
fromPoint: 'start' | 'end'
312+
toRow: D
313+
toPoint: 'start' | 'end'
278314
}): Promise<boolean> | boolean
279315
/**
280316
* 自定义拖拽结束时依赖线创建被赋值的方法
281317
*/
282318
createSetMethod?(params: {
283319
$gantt: VxeGanttConstructor<D>
320+
fromRow: D
321+
fromPoint: 'start' | 'end'
322+
toRow: D
323+
toPoint: 'start' | 'end'
324+
link: {
325+
from: string
326+
to: string
327+
type: VxeGanttDependencyType
328+
}
284329
}): void
285330
}
286331

@@ -528,6 +573,13 @@ export interface GanttReactData<D = any> extends GridReactData<D> {
528573
}
529574
}
530575

576+
dragLinkFromStore: {
577+
rowid: string | null
578+
type: 0 | 1
579+
}
580+
activeLink: VxeGanttDefines.LinkConfObj | null
581+
activeBarRowid: any
582+
isActiveCeLe: boolean
531583
linkList: VxeGanttDefines.LinkConfObj[]
532584
upLinkFlag: number
533585
}
@@ -538,7 +590,13 @@ export interface GanttInternalData extends GridInternalData {
538590
linkUniqueMaps: Record<string, VxeGanttDefines.LinkConfObj>
539591
resizeTableWidth: number
540592
barTipTimeout?: any
593+
541594
dragBarRow?: any
595+
dragLineRow?: any
596+
dragLinkToStore: {
597+
rowid: string | null
598+
type: 0 | 1
599+
}
542600

543601
_msTout?: any
544602
}
@@ -643,7 +701,10 @@ export type VxeGanttEmits = [
643701
'task-move-end',
644702
'task-resize-start',
645703
'task-resize-drag',
646-
'task-resize-end'
704+
'task-resize-end',
705+
'task-link-click',
706+
'task-link-dblclick',
707+
'task-link-remove'
647708
]
648709

649710
/**
@@ -686,9 +747,12 @@ export namespace VxeGanttDefines {
686747
export type LayoutKey = 'Form' | 'Toolbar' | 'Top' | 'Gantt' | 'Bottom' | 'Pager'
687748

688749
export interface LinkConfObj<D = any> extends VxeGanttPropTypes.Link<D> {
750+
key: string
689751
leColorKey?: string
690752
}
691753

754+
export type LineType = 'dashed' | 'solid' | 'flowDashed'
755+
692756
export interface LinkStyleConfig {
693757
/**
694758
* 线颜色
@@ -705,7 +769,7 @@ export namespace VxeGanttDefines {
705769
/**
706770
* 线类型
707771
*/
708-
lineType?: 'dashed' | 'solid' | 'flowDashed'
772+
lineType?: LineType
709773
/**
710774
* 显示箭头
711775
*/
@@ -887,6 +951,14 @@ export namespace VxeGanttDefines {
887951
targetStartDate: Date
888952
targetEndDate: Date
889953
}
954+
955+
export interface TaskLinkClickEventParams<D = any> extends GanttEventParams<D> {
956+
linkItem: VxeGanttDefines.LinkConfObj
957+
fromRow: D
958+
toRow: D
959+
}
960+
export interface TaskLinkDblclickEventParams<D = any> extends TaskLinkClickEventParams<D> {}
961+
export interface TaskLinkRemoveEventParams<D = any> extends TaskLinkClickEventParams<D> {}
890962
}
891963

892964
export interface VxeGanttEventProps<D = any> extends VxeGridEventProps<D> {
@@ -902,6 +974,9 @@ export interface VxeGanttEventProps<D = any> extends VxeGridEventProps<D> {
902974
onTaskResizeStart?: VxeGanttEvents.TaskResizeStart<D>
903975
onTaskResizeDrag?: VxeGanttEvents.TaskResizeDrag<D>
904976
onTaskResizeEnd?: VxeGanttEvents.TaskResizeEnd<D>
977+
onTaskLinkClick?: VxeGanttEvents.TaskLinkRemove<D>
978+
onTaskLinkDblclick?: VxeGanttEvents.TaskLinkDblclick<D>
979+
onTaskLinkRemove?: VxeGanttEvents.TaskLinkRemove<D>
905980
}
906981

907982
export interface VxeGanttListeners<D = any> extends VxeGridListeners<D> {
@@ -917,6 +992,9 @@ export interface VxeGanttListeners<D = any> extends VxeGridListeners<D> {
917992
taskResizeStart?: VxeGanttEvents.TaskResizeStart<D>
918993
taskResizeDrag?: VxeGanttEvents.TaskResizeDrag<D>
919994
taskResizeEnd?: VxeGanttEvents.TaskResizeEnd<D>
995+
taskLinkClick?: VxeGanttEvents.TaskLinkClick<D>
996+
taskLinkDblclick?: VxeGanttEvents.TaskLinkDblclick<D>
997+
taskLinkRemove?: VxeGanttEvents.TaskLinkRemove<D>
920998
}
921999

9221000
export namespace VxeGanttEvents {
@@ -932,6 +1010,9 @@ export namespace VxeGanttEvents {
9321010
export type TaskResizeStart<D = any> = (params: VxeGanttDefines.TaskResizeStartEventParams<D>) => void
9331011
export type TaskResizeDrag<D = any> = (params: VxeGanttDefines.TaskResizeDragEventParams<D>) => void
9341012
export type TaskResizeEnd<D = any> = (params: VxeGanttDefines.TaskResizeEndEventParams<D>) => void
1013+
export type TaskLinkClick<D = any> = (params: VxeGanttDefines.TaskLinkClickEventParams<D>) => void
1014+
export type TaskLinkDblclick<D = any> = (params: VxeGanttDefines.TaskLinkDblclickEventParams<D>) => void
1015+
export type TaskLinkRemove<D = any> = (params: VxeGanttDefines.TaskLinkRemoveEventParams<D>) => void
9351016
}
9361017

9371018
export namespace VxeGanttSlotTypes {

0 commit comments

Comments
 (0)