vxe-gantt 4.6.10 → 4.7.1

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/dist/all.esm.js CHANGED
@@ -6,7 +6,7 @@ import DomZIndex from 'dom-zindex';
6
6
  import { VxeTable } from 'vxe-table';
7
7
 
8
8
  const { setConfig: setConfig$1, setIcon } = VxeUI;
9
- VxeUI.ganttVersion = "4.6.10";
9
+ VxeUI.ganttVersion = "4.7.1";
10
10
  const ymdFormat = 'yyyy-MM-dd';
11
11
  const ymdhmsFormat = 'yyyy-MM-dd HH:mm:ss';
12
12
  setConfig$1({
@@ -115,7 +115,7 @@ setIcon({
115
115
  });
116
116
 
117
117
  const { log } = VxeUI;
118
- const ganttVersion = `gantt v${"4.6.10"}`;
118
+ const ganttVersion = `gantt v${"4.7.1"}`;
119
119
  function createComponentLog(name) {
120
120
  const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
121
121
  const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
@@ -183,7 +183,13 @@ function getClsRE(cls) {
183
183
  return reClsMap[cls];
184
184
  }
185
185
  function hasClass(elem, cls) {
186
- return !!(elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
186
+ if (elem) {
187
+ if (elem.classList) {
188
+ return elem.classList.contains(cls);
189
+ }
190
+ return !!(elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
191
+ }
192
+ return false;
187
193
  }
188
194
  function removeClass(elem, cls) {
189
195
  if (elem && hasClass(elem, cls)) {
@@ -628,17 +634,7 @@ var GanttViewChartComponent = defineVxeComponent({
628
634
  const taskBarSubviewOpts = computeTaskBarSubviewOpts.value;
629
635
  const { showOverview, barStyle: subBarStyle } = taskBarSubviewOpts;
630
636
  const scaleUnit = computeScaleUnit.value;
631
- const barParams = { $gantt: $xeGantt, row, scaleType: scaleUnit };
632
- const { showProgress, showContent, contentMethod, barStyle, moveable, showTooltip } = taskBarOpts;
633
- const isBarRowStyle = XEUtils.isFunction(barStyle);
634
- const barStyObj = (barStyle ? (isBarRowStyle ? barStyle(barParams) || undefined : barStyle) : {}) || {};
635
- const { round } = barStyObj;
636
- const rowRest = fullAllDataRowIdData[rowid] || {};
637
- const cellHeight = resizeHeightFlag ? getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) : 0;
638
- let title = getStringValue(XEUtils.get(row, titleField));
639
- const progressValue = showProgress ? Math.min(100, Math.max(0, XEUtils.toNumber(XEUtils.get(row, progressField)))) : 0;
640
- const renderTaskType = getTaskType(XEUtils.get(row, typeField));
641
- const ctParams = {
637
+ const barParams = {
642
638
  $gantt: $xeGantt,
643
639
  source: sourceType$3,
644
640
  type: viewType$2,
@@ -648,19 +644,35 @@ var GanttViewChartComponent = defineVxeComponent({
648
644
  rowIndex,
649
645
  _rowIndex
650
646
  };
647
+ const { showProgress, showContent, contentMethod, barStyle, moveable, showTooltip } = taskBarOpts;
648
+ const isBarRowStyle = XEUtils.isFunction(barStyle);
649
+ const barStyObj = (barStyle ? (isBarRowStyle ? barStyle(barParams) || undefined : barStyle) : {}) || {};
650
+ const barRound = barStyObj.round;
651
+ const barBgColor = barStyObj.bgColor;
652
+ const barCompletedBgColor = barStyObj.completedBgColor;
653
+ const barHtmlStyle = barStyObj.style;
654
+ const rowRest = fullAllDataRowIdData[rowid] || {};
655
+ const cellHeight = resizeHeightFlag ? getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) : 0;
656
+ let title = getStringValue(XEUtils.get(row, titleField));
657
+ const progressValue = showProgress ? Math.min(100, Math.max(0, XEUtils.toNumber(XEUtils.get(row, progressField)))) : 0;
658
+ const renderTaskType = getTaskType(XEUtils.get(row, typeField));
659
+ const isMilestone = !!(hasEnableConf(taskBarMilestoneConfig, taskBarMilestoneOpts) && hasMilestoneTask(renderTaskType));
660
+ const ctParams = Object.assign({}, barParams);
651
661
  const vbStyle = {};
652
662
  const vpStyle = {
653
663
  width: `${progressValue || 0}%`
654
664
  };
655
- if (isBarRowStyle) {
656
- const { bgColor, completedBgColor } = barStyObj;
657
- if (bgColor) {
658
- vbStyle.backgroundColor = XEUtils.isFunction(bgColor) ? bgColor(ctParams) : bgColor;
665
+ if (!isMilestone) {
666
+ if (barBgColor) {
667
+ vbStyle.backgroundColor = barBgColor;
659
668
  }
660
- if (completedBgColor) {
661
- vpStyle.backgroundColor = completedBgColor;
669
+ if (barCompletedBgColor) {
670
+ vpStyle.backgroundColor = barCompletedBgColor;
662
671
  }
663
672
  }
673
+ if (barHtmlStyle) {
674
+ XEUtils.assign(vbStyle, barHtmlStyle);
675
+ }
664
676
  let cbVNs = [];
665
677
  if ($xeGantt.renderGanttTaskBarContent) {
666
678
  cbVNs = $xeGantt.renderGanttTaskBarContent(ctParams, {
@@ -670,7 +682,6 @@ var GanttViewChartComponent = defineVxeComponent({
670
682
  });
671
683
  }
672
684
  else {
673
- const isMilestone = !!(hasEnableConf(taskBarMilestoneConfig, taskBarMilestoneOpts) && hasMilestoneTask(renderTaskType));
674
685
  const isSubview = !!(hasEnableConf(taskBarSubviewConfig, taskBarSubviewOpts) && hasSubviewTask(renderTaskType));
675
686
  if (contentMethod) {
676
687
  title = getStringValue(contentMethod({ row, title, scaleType: scaleUnit }));
@@ -706,7 +717,7 @@ var GanttViewChartComponent = defineVxeComponent({
706
717
  rowid: rowid,
707
718
  class: ['vxe-gantt-view--chart-subview-row', {
708
719
  'is--progress': showProgress,
709
- 'is--round': round,
720
+ 'is--round': barRound,
710
721
  'is--move': moveable
711
722
  }]
712
723
  }, [
@@ -736,32 +747,51 @@ var GanttViewChartComponent = defineVxeComponent({
736
747
  else {
737
748
  const cbcVNs = [];
738
749
  XEUtils.eachTree(rowChildren, childRow => {
739
- const childBarParams = { $gantt: $xeGantt, row: childRow, scaleType: scaleUnit };
740
- const childBarStyObj = (barStyle ? (isBarRowStyle ? barStyle(childBarParams) : barStyle) : {}) || {};
741
- const { round } = childBarStyObj;
750
+ const childBarParams = {
751
+ $gantt: $xeGantt,
752
+ source: sourceType$3,
753
+ type: viewType$2,
754
+ scaleType: scaleUnit,
755
+ row: childRow,
756
+ $rowIndex: $xeTable.getRowIndex(childRow),
757
+ rowIndex: $xeTable.getVMRowIndex(childRow),
758
+ _rowIndex: $xeTable.getVTRowIndex(childRow)
759
+ };
760
+ const childBarStyObj = XEUtils.assign({}, (barStyle ? (XEUtils.isFunction(barStyle) ? barStyle(childBarParams) : barStyle) : {}) || {}, (subBarStyle ? (XEUtils.isFunction(subBarStyle) ? subBarStyle(childBarParams) : subBarStyle) : {}) || {});
761
+ const childRound = childBarStyObj.round;
762
+ const childBgColor = childBarStyObj.bgColor;
763
+ const childCompletedBgColor = childBarStyObj.completedBgColor;
764
+ const childBarHtmlStyle = childBarStyObj.style;
742
765
  const childRowid = $xeTable.getRowid(childRow);
743
766
  let childTitle = getStringValue(XEUtils.get(childRow, titleField));
744
767
  const childProgressValue = showProgress ? Math.min(100, Math.max(0, XEUtils.toNumber(XEUtils.get(childRow, progressField)))) : 0;
745
768
  const childRenderTaskType = getTaskType(XEUtils.get(childRow, typeField));
769
+ const isChildMilestone = !!(hasEnableConf(taskBarMilestoneConfig, taskBarMilestoneOpts) && hasMilestoneTask(childRenderTaskType));
746
770
  const isChildSubview = !!(hasEnableConf(taskBarSubviewConfig, taskBarSubviewOpts) && hasSubviewTask(childRenderTaskType));
747
771
  if (isChildSubview) {
748
772
  return;
749
773
  }
774
+ const childVbStyle = {};
750
775
  const childVpStyle = {
751
776
  width: `${childProgressValue || 0}%`
752
777
  };
753
- if (isBarRowStyle) {
754
- const { bgColor, completedBgColor } = childBarStyObj;
755
- if (completedBgColor) {
756
- childVpStyle.backgroundColor = completedBgColor;
778
+ if (!isChildMilestone) {
779
+ if (childBgColor) {
780
+ childVbStyle.backgroundColor = childBgColor;
781
+ }
782
+ if (childCompletedBgColor) {
783
+ childVpStyle.backgroundColor = childCompletedBgColor;
757
784
  }
758
785
  }
759
- const childCtParams = XEUtils.assign({}, ctParams, {
760
- row: childRow,
761
- rowIndex: $xeTable.getRowIndex(childRow),
762
- $rowIndex: $xeTable.getVMRowIndex(childRow),
763
- _rowIndex: $xeTable.getVTRowIndex(childRow)
764
- });
786
+ // 已废弃
787
+ if (childBarStyObj.top) {
788
+ childVbStyle.top = childBarStyObj.top;
789
+ }
790
+ // 已废弃
791
+ if (childBarHtmlStyle) {
792
+ XEUtils.assign(childVbStyle, childBarHtmlStyle);
793
+ }
794
+ const childCtParams = Object.assign({}, childBarParams);
765
795
  if (contentMethod) {
766
796
  childTitle = getStringValue(contentMethod({ row: childRow, title: childTitle, scaleType: scaleUnit }));
767
797
  }
@@ -770,7 +800,7 @@ var GanttViewChartComponent = defineVxeComponent({
770
800
  rowid: childRowid,
771
801
  class: ['vxe-gantt-view--chart-subview-row', `is--${childRenderTaskType}`, {
772
802
  'is--progress': showProgress,
773
- 'is--round': round,
803
+ 'is--round': childRound,
774
804
  'is--move': moveable,
775
805
  'row--pending': !!pendingRowFlag && !!pendingRowMaps[childRowid]
776
806
  }]
@@ -778,7 +808,7 @@ var GanttViewChartComponent = defineVxeComponent({
778
808
  h('div', {
779
809
  rowid: childRowid,
780
810
  class: [taskBarSlot ? 'vxe-gantt-view--chart-subview-custom-bar' : 'vxe-gantt-view--chart-subview-bar', `is--${childRenderTaskType}`],
781
- style: subBarStyle ? (XEUtils.isFunction(subBarStyle) ? subBarStyle(childCtParams) : subBarStyle) : undefined,
811
+ style: childVbStyle,
782
812
  onClick(evnt) {
783
813
  evnt.stopPropagation();
784
814
  $xeGantt.handleTaskBarClickEvent(evnt, childCtParams);
@@ -864,7 +894,7 @@ var GanttViewChartComponent = defineVxeComponent({
864
894
  class: ['vxe-gantt-view--chart-row', `is--${renderTaskType}`, {
865
895
  'is--progress': showProgress,
866
896
  'row--pending': !!pendingRowFlag && !!pendingRowMaps[rowid],
867
- 'is--round': round,
897
+ 'is--round': barRound,
868
898
  'is--move': moveable
869
899
  }],
870
900
  style: {
@@ -2577,7 +2607,7 @@ var GanttViewComponent = defineVxeComponent({
2577
2607
  reactData.scrollXWidth = viewTableWidth;
2578
2608
  return Promise.all([
2579
2609
  updateTaskChartStyle(),
2580
- $xeGantt.handleUpdateTaskLinkStyle ? $xeGantt.handleUpdateTaskLinkStyle($xeGanttView) : null
2610
+ $xeGantt.handleUpTaskLinkStyle ? $xeGantt.handleUpTaskLinkStyle($xeGanttView) : null
2581
2611
  ]);
2582
2612
  };
2583
2613
  const handleRecalculateStyle = () => {
@@ -3589,7 +3619,7 @@ var VxeGanttComponent = defineVxeComponent({
3589
3619
  stys['--vxe-ui-gantt-view-task-now-line-background-color'] = nlbgColor;
3590
3620
  }
3591
3621
  if (nlWidth) {
3592
- stys['--vxe-ui-gantt-view-task-now-line-width'] = nlWidth;
3622
+ stys['--vxe-ui-gantt-view-task-now-line-width'] = toCssUnit(nlWidth);
3593
3623
  }
3594
3624
  if (viewStyle) {
3595
3625
  const { cellWidth } = viewStyle;
@@ -5793,8 +5823,8 @@ var VxeGanttComponent = defineVxeComponent({
5793
5823
  $xeGantt.refreshTaskView();
5794
5824
  });
5795
5825
  watch(computeTaskLinkStyle, () => {
5796
- if ($xeGantt.handleUpdateTaskLinkData) {
5797
- $xeGantt.handleUpdateTaskLinkData();
5826
+ if ($xeGantt.handleUpTaskLinkData) {
5827
+ $xeGantt.handleUpTaskLinkData();
5798
5828
  }
5799
5829
  });
5800
5830
  hooks.forEach((options) => {
@@ -5814,7 +5844,17 @@ var VxeGanttComponent = defineVxeComponent({
5814
5844
  handleTaskScaleConfig();
5815
5845
  initPages();
5816
5846
  onMounted(() => {
5817
- if (!$xeGantt.handleUpdateTaskLinkData) {
5847
+ const taskBarSubviewOpts = computeTaskBarSubviewOpts.value;
5848
+ const { barStyle } = taskBarSubviewOpts;
5849
+ if (barStyle) {
5850
+ if (barStyle.top) {
5851
+ warnLog('vxe.error.delProp', ['task-bar-subview-config.barStyle.top', 'task-bar-subview-config.barStyle.style.top']);
5852
+ }
5853
+ if (barStyle.backgroundColor) {
5854
+ warnLog('vxe.error.delProp', ['task-bar-subview-config.barStyle.backgroundColor', 'task-bar-subview-config.barStyle.style.backgroundColor']);
5855
+ }
5856
+ }
5857
+ if (!$xeGantt.handleUpTaskLinkData) {
5818
5858
  if (props.links) {
5819
5859
  warnLog('vxe.error.notProp', ['links']);
5820
5860
  }
@@ -46,17 +46,7 @@ export default defineVxeComponent({
46
46
  const taskBarSubviewOpts = computeTaskBarSubviewOpts.value;
47
47
  const { showOverview, barStyle: subBarStyle } = taskBarSubviewOpts;
48
48
  const scaleUnit = computeScaleUnit.value;
49
- const barParams = { $gantt: $xeGantt, row, scaleType: scaleUnit };
50
- const { showProgress, showContent, contentMethod, barStyle, moveable, showTooltip } = taskBarOpts;
51
- const isBarRowStyle = XEUtils.isFunction(barStyle);
52
- const barStyObj = (barStyle ? (isBarRowStyle ? barStyle(barParams) || undefined : barStyle) : {}) || {};
53
- const { round } = barStyObj;
54
- const rowRest = fullAllDataRowIdData[rowid] || {};
55
- const cellHeight = resizeHeightFlag ? getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) : 0;
56
- let title = getStringValue(XEUtils.get(row, titleField));
57
- const progressValue = showProgress ? Math.min(100, Math.max(0, XEUtils.toNumber(XEUtils.get(row, progressField)))) : 0;
58
- const renderTaskType = getTaskType(XEUtils.get(row, typeField));
59
- const ctParams = {
49
+ const barParams = {
60
50
  $gantt: $xeGantt,
61
51
  source: sourceType,
62
52
  type: viewType,
@@ -66,19 +56,35 @@ export default defineVxeComponent({
66
56
  rowIndex,
67
57
  _rowIndex
68
58
  };
59
+ const { showProgress, showContent, contentMethod, barStyle, moveable, showTooltip } = taskBarOpts;
60
+ const isBarRowStyle = XEUtils.isFunction(barStyle);
61
+ const barStyObj = (barStyle ? (isBarRowStyle ? barStyle(barParams) || undefined : barStyle) : {}) || {};
62
+ const barRound = barStyObj.round;
63
+ const barBgColor = barStyObj.bgColor;
64
+ const barCompletedBgColor = barStyObj.completedBgColor;
65
+ const barHtmlStyle = barStyObj.style;
66
+ const rowRest = fullAllDataRowIdData[rowid] || {};
67
+ const cellHeight = resizeHeightFlag ? getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) : 0;
68
+ let title = getStringValue(XEUtils.get(row, titleField));
69
+ const progressValue = showProgress ? Math.min(100, Math.max(0, XEUtils.toNumber(XEUtils.get(row, progressField)))) : 0;
70
+ const renderTaskType = getTaskType(XEUtils.get(row, typeField));
71
+ const isMilestone = !!(hasEnableConf(taskBarMilestoneConfig, taskBarMilestoneOpts) && hasMilestoneTask(renderTaskType));
72
+ const ctParams = Object.assign({}, barParams);
69
73
  const vbStyle = {};
70
74
  const vpStyle = {
71
75
  width: `${progressValue || 0}%`
72
76
  };
73
- if (isBarRowStyle) {
74
- const { bgColor, completedBgColor } = barStyObj;
75
- if (bgColor) {
76
- vbStyle.backgroundColor = XEUtils.isFunction(bgColor) ? bgColor(ctParams) : bgColor;
77
+ if (!isMilestone) {
78
+ if (barBgColor) {
79
+ vbStyle.backgroundColor = barBgColor;
77
80
  }
78
- if (completedBgColor) {
79
- vpStyle.backgroundColor = completedBgColor;
81
+ if (barCompletedBgColor) {
82
+ vpStyle.backgroundColor = barCompletedBgColor;
80
83
  }
81
84
  }
85
+ if (barHtmlStyle) {
86
+ XEUtils.assign(vbStyle, barHtmlStyle);
87
+ }
82
88
  let cbVNs = [];
83
89
  if ($xeGantt.renderGanttTaskBarContent) {
84
90
  cbVNs = $xeGantt.renderGanttTaskBarContent(ctParams, {
@@ -88,7 +94,6 @@ export default defineVxeComponent({
88
94
  });
89
95
  }
90
96
  else {
91
- const isMilestone = !!(hasEnableConf(taskBarMilestoneConfig, taskBarMilestoneOpts) && hasMilestoneTask(renderTaskType));
92
97
  const isSubview = !!(hasEnableConf(taskBarSubviewConfig, taskBarSubviewOpts) && hasSubviewTask(renderTaskType));
93
98
  if (contentMethod) {
94
99
  title = getStringValue(contentMethod({ row, title, scaleType: scaleUnit }));
@@ -124,7 +129,7 @@ export default defineVxeComponent({
124
129
  rowid: rowid,
125
130
  class: ['vxe-gantt-view--chart-subview-row', {
126
131
  'is--progress': showProgress,
127
- 'is--round': round,
132
+ 'is--round': barRound,
128
133
  'is--move': moveable
129
134
  }]
130
135
  }, [
@@ -154,13 +159,26 @@ export default defineVxeComponent({
154
159
  else {
155
160
  const cbcVNs = [];
156
161
  XEUtils.eachTree(rowChildren, childRow => {
157
- const childBarParams = { $gantt: $xeGantt, row: childRow, scaleType: scaleUnit };
158
- const childBarStyObj = (barStyle ? (isBarRowStyle ? barStyle(childBarParams) : barStyle) : {}) || {};
159
- const { round } = childBarStyObj;
162
+ const childBarParams = {
163
+ $gantt: $xeGantt,
164
+ source: sourceType,
165
+ type: viewType,
166
+ scaleType: scaleUnit,
167
+ row: childRow,
168
+ $rowIndex: $xeTable.getRowIndex(childRow),
169
+ rowIndex: $xeTable.getVMRowIndex(childRow),
170
+ _rowIndex: $xeTable.getVTRowIndex(childRow)
171
+ };
172
+ const childBarStyObj = XEUtils.assign({}, (barStyle ? (XEUtils.isFunction(barStyle) ? barStyle(childBarParams) : barStyle) : {}) || {}, (subBarStyle ? (XEUtils.isFunction(subBarStyle) ? subBarStyle(childBarParams) : subBarStyle) : {}) || {});
173
+ const childRound = childBarStyObj.round;
174
+ const childBgColor = childBarStyObj.bgColor;
175
+ const childCompletedBgColor = childBarStyObj.completedBgColor;
176
+ const childBarHtmlStyle = childBarStyObj.style;
160
177
  const childRowid = $xeTable.getRowid(childRow);
161
178
  let childTitle = getStringValue(XEUtils.get(childRow, titleField));
162
179
  const childProgressValue = showProgress ? Math.min(100, Math.max(0, XEUtils.toNumber(XEUtils.get(childRow, progressField)))) : 0;
163
180
  const childRenderTaskType = getTaskType(XEUtils.get(childRow, typeField));
181
+ const isChildMilestone = !!(hasEnableConf(taskBarMilestoneConfig, taskBarMilestoneOpts) && hasMilestoneTask(childRenderTaskType));
164
182
  const isChildSubview = !!(hasEnableConf(taskBarSubviewConfig, taskBarSubviewOpts) && hasSubviewTask(childRenderTaskType));
165
183
  if (isChildSubview) {
166
184
  return;
@@ -169,21 +187,23 @@ export default defineVxeComponent({
169
187
  const childVpStyle = {
170
188
  width: `${childProgressValue || 0}%`
171
189
  };
172
- if (isBarRowStyle) {
173
- const { bgColor, completedBgColor } = childBarStyObj;
174
- if (bgColor) {
175
- childVbStyle.backgroundColor = bgColor;
190
+ if (!isChildMilestone) {
191
+ if (childBgColor) {
192
+ childVbStyle.backgroundColor = childBgColor;
176
193
  }
177
- if (completedBgColor) {
178
- childVpStyle.backgroundColor = completedBgColor;
194
+ if (childCompletedBgColor) {
195
+ childVpStyle.backgroundColor = childCompletedBgColor;
179
196
  }
180
197
  }
181
- const childCtParams = XEUtils.assign({}, ctParams, {
182
- row: childRow,
183
- rowIndex: $xeTable.getRowIndex(childRow),
184
- $rowIndex: $xeTable.getVMRowIndex(childRow),
185
- _rowIndex: $xeTable.getVTRowIndex(childRow)
186
- });
198
+ // 已废弃
199
+ if (childBarStyObj.top) {
200
+ childVbStyle.top = childBarStyObj.top;
201
+ }
202
+ // 已废弃
203
+ if (childBarHtmlStyle) {
204
+ XEUtils.assign(childVbStyle, childBarHtmlStyle);
205
+ }
206
+ const childCtParams = Object.assign({}, childBarParams);
187
207
  if (contentMethod) {
188
208
  childTitle = getStringValue(contentMethod({ row: childRow, title: childTitle, scaleType: scaleUnit }));
189
209
  }
@@ -192,7 +212,7 @@ export default defineVxeComponent({
192
212
  rowid: childRowid,
193
213
  class: ['vxe-gantt-view--chart-subview-row', `is--${childRenderTaskType}`, {
194
214
  'is--progress': showProgress,
195
- 'is--round': round,
215
+ 'is--round': childRound,
196
216
  'is--move': moveable,
197
217
  'row--pending': !!pendingRowFlag && !!pendingRowMaps[childRowid]
198
218
  }]
@@ -200,7 +220,7 @@ export default defineVxeComponent({
200
220
  h('div', {
201
221
  rowid: childRowid,
202
222
  class: [taskBarSlot ? 'vxe-gantt-view--chart-subview-custom-bar' : 'vxe-gantt-view--chart-subview-bar', `is--${childRenderTaskType}`],
203
- style: subBarStyle ? (XEUtils.isFunction(subBarStyle) ? subBarStyle(childCtParams) : subBarStyle) : undefined,
223
+ style: childVbStyle,
204
224
  onClick(evnt) {
205
225
  evnt.stopPropagation();
206
226
  $xeGantt.handleTaskBarClickEvent(evnt, childCtParams);
@@ -286,7 +306,7 @@ export default defineVxeComponent({
286
306
  class: ['vxe-gantt-view--chart-row', `is--${renderTaskType}`, {
287
307
  'is--progress': showProgress,
288
308
  'row--pending': !!pendingRowFlag && !!pendingRowMaps[rowid],
289
- 'is--round': round,
309
+ 'is--round': barRound,
290
310
  'is--move': moveable
291
311
  }],
292
312
  style: {
@@ -1281,7 +1281,7 @@ export default defineVxeComponent({
1281
1281
  reactData.scrollXWidth = viewTableWidth;
1282
1282
  return Promise.all([
1283
1283
  updateTaskChartStyle(),
1284
- $xeGantt.handleUpdateTaskLinkStyle ? $xeGantt.handleUpdateTaskLinkStyle($xeGanttView) : null
1284
+ $xeGantt.handleUpTaskLinkStyle ? $xeGantt.handleUpTaskLinkStyle($xeGanttView) : null
1285
1285
  ]);
1286
1286
  };
1287
1287
  const handleRecalculateStyle = () => {
@@ -320,7 +320,7 @@ export default defineVxeComponent({
320
320
  stys['--vxe-ui-gantt-view-task-now-line-background-color'] = nlbgColor;
321
321
  }
322
322
  if (nlWidth) {
323
- stys['--vxe-ui-gantt-view-task-now-line-width'] = nlWidth;
323
+ stys['--vxe-ui-gantt-view-task-now-line-width'] = toCssUnit(nlWidth);
324
324
  }
325
325
  if (viewStyle) {
326
326
  const { cellWidth } = viewStyle;
@@ -2524,8 +2524,8 @@ export default defineVxeComponent({
2524
2524
  $xeGantt.refreshTaskView();
2525
2525
  });
2526
2526
  watch(computeTaskLinkStyle, () => {
2527
- if ($xeGantt.handleUpdateTaskLinkData) {
2528
- $xeGantt.handleUpdateTaskLinkData();
2527
+ if ($xeGantt.handleUpTaskLinkData) {
2528
+ $xeGantt.handleUpTaskLinkData();
2529
2529
  }
2530
2530
  });
2531
2531
  hooks.forEach((options) => {
@@ -2545,7 +2545,17 @@ export default defineVxeComponent({
2545
2545
  handleTaskScaleConfig();
2546
2546
  initPages();
2547
2547
  onMounted(() => {
2548
- if (!$xeGantt.handleUpdateTaskLinkData) {
2548
+ const taskBarSubviewOpts = computeTaskBarSubviewOpts.value;
2549
+ const { barStyle } = taskBarSubviewOpts;
2550
+ if (barStyle) {
2551
+ if (barStyle.top) {
2552
+ warnLog('vxe.error.delProp', ['task-bar-subview-config.barStyle.top', 'task-bar-subview-config.barStyle.style.top']);
2553
+ }
2554
+ if (barStyle.backgroundColor) {
2555
+ warnLog('vxe.error.delProp', ['task-bar-subview-config.barStyle.backgroundColor', 'task-bar-subview-config.barStyle.style.backgroundColor']);
2556
+ }
2557
+ }
2558
+ if (!$xeGantt.handleUpTaskLinkData) {
2549
2559
  if (props.links) {
2550
2560
  warnLog('vxe.error.notProp', ['links']);
2551
2561
  }
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { setConfig, setIcon } = VxeUI;
3
- VxeUI.ganttVersion = "4.6.10";
3
+ VxeUI.ganttVersion = "4.7.1";
4
4
  const ymdFormat = 'yyyy-MM-dd';
5
5
  const ymdhmsFormat = 'yyyy-MM-dd HH:mm:ss';
6
6
  setConfig({
package/es/ui/src/dom.js CHANGED
@@ -45,7 +45,13 @@ export function isScale(val) {
45
45
  return val && /^\d+(\.\d+)?%$/.test(val);
46
46
  }
47
47
  export function hasClass(elem, cls) {
48
- return !!(elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
48
+ if (elem) {
49
+ if (elem.classList) {
50
+ return elem.classList.contains(cls);
51
+ }
52
+ return !!(elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
53
+ }
54
+ return false;
49
55
  }
50
56
  export function removeClass(elem, cls) {
51
57
  if (elem && hasClass(elem, cls)) {
package/es/ui/src/log.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const ganttVersion = `gantt v${"4.6.10"}`;
3
+ const ganttVersion = `gantt v${"4.7.1"}`;
4
4
  export function createComponentLog(name) {
5
5
  const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
6
6
  const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
@@ -23,6 +23,12 @@ export function nextZIndex() {
23
23
  export function getLastZIndex() {
24
24
  return DomZIndex.getCurrent();
25
25
  }
26
+ export function getGlobalDefaultConfig(value, globalValue) {
27
+ if (XEUtils.eqNull(value)) {
28
+ return globalValue;
29
+ }
30
+ return value;
31
+ }
26
32
  export function hasChildrenList(item) {
27
33
  return item && item.children && item.children.length > 0;
28
34
  }