vxe-gantt 4.1.13 → 4.1.15

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.
@@ -109,7 +109,9 @@ export default defineVxeComponent({
109
109
  const internalData = createInternalData()
110
110
 
111
111
  const refMaps: GanttViewPrivateRef = {
112
- refElem
112
+ refElem,
113
+ refScrollXHandleElem,
114
+ refScrollYHandleElem
113
115
  }
114
116
 
115
117
  const computeScaleDateList = computed(() => {
@@ -681,6 +683,7 @@ export default defineVxeComponent({
681
683
  if ($xeTable) {
682
684
  const startField = computeStartField.value
683
685
  const endField = computeEndField.value
686
+ const typeField = computeTypeField.value
684
687
  const { computeAggregateOpts, computeTreeOpts } = $xeTable.getComputeMaps()
685
688
  const tableReactData = $xeTable.reactData
686
689
  const { isRowGroupStatus } = tableReactData
@@ -692,8 +695,16 @@ export default defineVxeComponent({
692
695
  const childrenField = treeOpts.children || treeOpts.childrenField
693
696
 
694
697
  const handleMinMaxData = (row: any) => {
695
- const startValue = XEUtils.get(row, startField)
696
- const endValue = XEUtils.get(row, endField)
698
+ let startValue = XEUtils.get(row, startField)
699
+ let endValue = XEUtils.get(row, endField)
700
+ const typeValue = XEUtils.get(row, typeField)
701
+ const isMilestone = hasMilestoneTask(typeValue)
702
+ if (!startValue) {
703
+ startValue = endValue
704
+ }
705
+ if (isMilestone || !endValue) {
706
+ endValue = startValue
707
+ }
697
708
  if (startValue) {
698
709
  const startDate = parseStringDate(startValue)
699
710
  if (!minDate || minDate.getTime() > startDate.getTime()) {
@@ -1778,6 +1778,10 @@ export default defineVxeComponent({
1778
1778
  },
1779
1779
  triggerTaskBarTooltipEvent (evnt, params) {
1780
1780
  const { barTipStore } = reactData
1781
+ const { dragBarRow } = internalData
1782
+ if (dragBarRow) {
1783
+ return
1784
+ }
1781
1785
  const taskBarTooltipOpts = computeTaskBarTooltipOpts.value
1782
1786
  const titleField = computeTitleField.value
1783
1787
  const { contentMethod } = taskBarTooltipOpts
@@ -46,12 +46,11 @@ export function getTaskLinkKey (from: string | number, to: string | number) {
46
46
  return `${from}_${to}`
47
47
  }
48
48
 
49
- export function hasMilestoneTask (type: string) {
50
- return type === 'milestone'
49
+ const taskTypeMaps: Record<string, boolean> = {
50
+ milestone: true
51
51
  }
52
-
53
- const taskTypeMaps: Record<string, number> = {
54
- milestone: 1
52
+ export function hasMilestoneTask (type: string) {
53
+ return taskTypeMaps[type]
55
54
  }
56
55
  export function gettaskType (type: string) {
57
56
  return taskTypeMaps[type] ? type : 'default'