vxe-gantt 3.9.4 → 3.9.6

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.
Files changed (48) hide show
  1. package/es/components.d.ts +2 -1
  2. package/es/components.js +3 -4
  3. package/es/gantt/src/gantt-body.js +103 -79
  4. package/es/gantt/src/gantt-chart.js +376 -252
  5. package/es/gantt/src/gantt-footer.js +22 -14
  6. package/es/gantt/src/gantt-header.js +141 -110
  7. package/es/gantt/src/gantt-view.js +243 -198
  8. package/es/gantt/src/gantt.js +295 -187
  9. package/es/index.esm.js +4 -2
  10. package/es/index.js +4 -2
  11. package/es/ui/index.d.ts +0 -1
  12. package/es/ui/index.js +1 -2
  13. package/es/ui/src/log.js +1 -1
  14. package/es/ui/src/utils.d.ts +1 -1
  15. package/lib/components.js +5 -6
  16. package/lib/gantt/src/gantt-body.js +103 -79
  17. package/lib/gantt/src/gantt-chart.js +376 -252
  18. package/lib/gantt/src/gantt-footer.js +22 -14
  19. package/lib/gantt/src/gantt-header.js +141 -110
  20. package/lib/gantt/src/gantt-view.js +243 -198
  21. package/lib/gantt/src/gantt.js +295 -187
  22. package/lib/index.common.js +4 -2
  23. package/lib/index.js +4 -2
  24. package/lib/index.umd.js +1369 -1029
  25. package/lib/index.umd.min.js +1 -1
  26. package/lib/ui/index.js +1 -2
  27. package/lib/ui/src/log.js +1 -1
  28. package/package.json +7 -7
  29. package/packages/components.ts +21 -22
  30. package/packages/gantt/index.ts +32 -32
  31. package/packages/gantt/src/gantt-body.ts +349 -325
  32. package/packages/gantt/src/gantt-chart.ts +699 -575
  33. package/packages/gantt/src/gantt-footer.ts +81 -73
  34. package/packages/gantt/src/gantt-header.ts +218 -187
  35. package/packages/gantt/src/gantt-view.ts +2861 -2823
  36. package/packages/gantt/src/gantt.ts +3308 -3192
  37. package/packages/gantt/src/static.ts +35 -35
  38. package/packages/gantt/src/util.ts +35 -35
  39. package/packages/index.ts +15 -13
  40. package/packages/ui/index.ts +132 -135
  41. package/packages/ui/src/comp.ts +3 -3
  42. package/packages/ui/src/depend.ts +14 -14
  43. package/packages/ui/src/dom.ts +202 -202
  44. package/packages/ui/src/log.ts +19 -19
  45. package/packages/ui/src/utils.ts +68 -68
  46. package/packages/ui/src/vn.ts +13 -13
  47. package/types/all.d.ts +29 -29
  48. package/types/index.d.ts +4 -4
@@ -132,260 +132,355 @@ var gantt_chart_default = defineVxeComponent({
132
132
  if (isExpandTree) {
133
133
  if (showOverview) {
134
134
  cbVNs.push(
135
- h("div", {
136
- key: "vcso",
137
- class: "vxe-gantt-view--chart-subview-wrapper is--overview"
138
- }, [
139
- h("div", {
140
- key: rowid,
141
- attrs: {
142
- rowid
143
- },
144
- class: ["vxe-gantt-view--chart-subview-row", {
145
- "is--progress": showProgress,
146
- "is--round": barRound,
147
- "is--move": moveable
148
- }]
149
- }, [
150
- h("div", {
151
- attrs: {
152
- rowid
135
+ h(
136
+ "div",
137
+ {
138
+ key: "vcso",
139
+ class: "vxe-gantt-view--chart-subview-wrapper is--overview"
140
+ },
141
+ [
142
+ h(
143
+ "div",
144
+ {
145
+ key: rowid,
146
+ attrs: {
147
+ rowid
148
+ },
149
+ class: [
150
+ "vxe-gantt-view--chart-subview-row",
151
+ {
152
+ "is--progress": showProgress,
153
+ "is--round": barRound,
154
+ "is--move": moveable
155
+ }
156
+ ]
153
157
  },
154
- class: [taskBarOverviewSlot ? "vxe-gantt-view--chart-subview-custom-bar" : "vxe-gantt-view--chart-subview-bar", `is--${renderTaskType}`]
155
- }, [
156
- taskBarOverviewSlot ? h("div", {
157
- key: "cbc",
158
- class: "vxe-gantt-view--chart-subview-custom-bar-content-wrapper"
159
- }, $xeGantt.callSlot(taskBarOverviewSlot, barParams, h)) : h("div", {
160
- class: "vxe-gantt-view--chart-subview-bar-content-wrapper"
161
- }, [
162
- showContent ? h("div", {
163
- class: "vxe-gantt-view--chart-content"
164
- }, title) : renderEmptyElement($xeGantt)
165
- ])
166
- ])
167
- ])
168
- ])
158
+ [
159
+ h(
160
+ "div",
161
+ {
162
+ attrs: {
163
+ rowid
164
+ },
165
+ class: [taskBarOverviewSlot ? "vxe-gantt-view--chart-subview-custom-bar" : "vxe-gantt-view--chart-subview-bar", `is--${renderTaskType}`]
166
+ },
167
+ [
168
+ taskBarOverviewSlot ? h(
169
+ "div",
170
+ {
171
+ key: "cbc",
172
+ class: "vxe-gantt-view--chart-subview-custom-bar-content-wrapper"
173
+ },
174
+ $xeGantt.callSlot(taskBarOverviewSlot, barParams, h)
175
+ ) : h(
176
+ "div",
177
+ {
178
+ class: "vxe-gantt-view--chart-subview-bar-content-wrapper"
179
+ },
180
+ [
181
+ showContent ? h(
182
+ "div",
183
+ {
184
+ class: "vxe-gantt-view--chart-content"
185
+ },
186
+ title
187
+ ) : renderEmptyElement($xeGantt)
188
+ ]
189
+ )
190
+ ]
191
+ )
192
+ ]
193
+ )
194
+ ]
195
+ )
169
196
  );
170
197
  }
171
198
  } else {
172
199
  const cbcVNs = [];
173
- XEUtils.eachTree(rowChildren, (childRow) => {
174
- const childBarParams = {
175
- $gantt: $xeGantt,
176
- source: sourceType,
177
- type: viewType,
178
- scaleType: scaleUnit,
179
- row: childRow,
180
- $rowIndex: $xeTable.getRowIndex(childRow),
181
- rowIndex: $xeTable.getVMRowIndex(childRow),
182
- _rowIndex: $xeTable.getVTRowIndex(childRow)
183
- };
184
- const isChildBarRowStyle = XEUtils.isFunction(subBarStyle);
185
- const childBarStyObj = XEUtils.assign(
186
- {},
187
- (barStyle ? isBarRowStyle ? barStyle(childBarParams) : barStyle : {}) || {},
188
- (subBarStyle ? isChildBarRowStyle ? subBarStyle(childBarParams) : subBarStyle : {}) || {}
189
- );
190
- const childRound = childBarStyObj.round;
191
- const childBgColor = childBarStyObj.bgColor;
192
- const childCompletedBgColor = childBarStyObj.completedBgColor;
193
- const childBarHtmlStyle = childBarStyObj.style;
194
- const childRowid = $xeTable.getRowid(childRow);
195
- let childTitle = getStringValue(XEUtils.get(childRow, titleField));
196
- const childProgressValue = showProgress ? Math.min(100, Math.max(0, XEUtils.toNumber(XEUtils.get(childRow, progressField)))) : 0;
197
- const childRenderTaskType = getTaskType(XEUtils.get(childRow, typeField));
198
- const isChildMilestone = !!(hasEnableConf(taskBarMilestoneConfig, taskBarMilestoneOpts) && hasMilestoneTask(childRenderTaskType));
199
- const isChildSubview = !!(hasEnableConf(taskBarSubviewConfig, taskBarSubviewOpts) && hasSubviewTask(childRenderTaskType));
200
- if (isChildSubview) {
201
- return;
202
- }
203
- const childVbStyle = {};
204
- const childVpStyle = {
205
- width: `${childProgressValue || 0}%`
206
- };
207
- if (!isChildMilestone) {
208
- if (childBgColor) {
209
- childVbStyle["--vxe-ui-gantt-view-task-bar-background-color"] = childBgColor;
200
+ XEUtils.eachTree(
201
+ rowChildren,
202
+ (childRow) => {
203
+ const childBarParams = {
204
+ $gantt: $xeGantt,
205
+ source: sourceType,
206
+ type: viewType,
207
+ scaleType: scaleUnit,
208
+ row: childRow,
209
+ $rowIndex: $xeTable.getRowIndex(childRow),
210
+ rowIndex: $xeTable.getVMRowIndex(childRow),
211
+ _rowIndex: $xeTable.getVTRowIndex(childRow)
212
+ };
213
+ const isChildBarRowStyle = XEUtils.isFunction(subBarStyle);
214
+ const childBarStyObj = XEUtils.assign({}, (barStyle ? isBarRowStyle ? barStyle(childBarParams) : barStyle : {}) || {}, (subBarStyle ? isChildBarRowStyle ? subBarStyle(childBarParams) : subBarStyle : {}) || {});
215
+ const childRound = childBarStyObj.round;
216
+ const childBgColor = childBarStyObj.bgColor;
217
+ const childCompletedBgColor = childBarStyObj.completedBgColor;
218
+ const childBarHtmlStyle = childBarStyObj.style;
219
+ const childRowid = $xeTable.getRowid(childRow);
220
+ let childTitle = getStringValue(XEUtils.get(childRow, titleField));
221
+ const childProgressValue = showProgress ? Math.min(100, Math.max(0, XEUtils.toNumber(XEUtils.get(childRow, progressField)))) : 0;
222
+ const childRenderTaskType = getTaskType(XEUtils.get(childRow, typeField));
223
+ const isChildMilestone = !!(hasEnableConf(taskBarMilestoneConfig, taskBarMilestoneOpts) && hasMilestoneTask(childRenderTaskType));
224
+ const isChildSubview = !!(hasEnableConf(taskBarSubviewConfig, taskBarSubviewOpts) && hasSubviewTask(childRenderTaskType));
225
+ if (isChildSubview) {
226
+ return;
210
227
  }
211
- if (childCompletedBgColor) {
212
- childVpStyle["--vxe-ui-gantt-view-task-bar-completed-background-color"] = childCompletedBgColor;
228
+ const childVbStyle = {};
229
+ const childVpStyle = {
230
+ width: `${childProgressValue || 0}%`
231
+ };
232
+ if (!isChildMilestone) {
233
+ if (childBgColor) {
234
+ childVbStyle["--vxe-ui-gantt-view-task-bar-background-color"] = childBgColor;
235
+ }
236
+ if (childCompletedBgColor) {
237
+ childVpStyle["--vxe-ui-gantt-view-task-bar-completed-background-color"] = childCompletedBgColor;
238
+ }
213
239
  }
214
- }
215
- if (childBarStyObj.top) {
216
- childVbStyle.top = childBarStyObj.top;
217
- }
218
- if (childBarHtmlStyle) {
219
- XEUtils.assign(childVbStyle, childBarHtmlStyle);
220
- }
221
- const childCtParams = { ...childBarParams };
222
- if (contentMethod) {
223
- childTitle = getStringValue(contentMethod({ row: childRow, title: childTitle, scaleType: scaleUnit }));
224
- }
225
- cbcVNs.push(
226
- h("div", {
227
- key: childRowid,
228
- attrs: {
229
- rowid: childRowid
230
- },
231
- class: ["vxe-gantt-view--chart-subview-row", `is--${childRenderTaskType}`, {
232
- "is--progress": showProgress,
233
- "is--critical": showCriticalPath && criticalPathFlag && criticalRowMaps.has(childRowid),
234
- "is--round": childRound,
235
- "is--move": moveable,
236
- "row--pending": !!pendingRowFlag && !!pendingRowMaps[childRowid]
237
- }]
238
- }, [
239
- h("div", {
240
- attrs: {
241
- rowid: childRowid
242
- },
243
- class: [taskBarSlot ? "vxe-gantt-view--chart-subview-custom-bar" : "vxe-gantt-view--chart-subview-bar", `is--${childRenderTaskType}`],
244
- style: childVbStyle,
245
- on: {
246
- click(evnt) {
247
- evnt.stopPropagation();
248
- $xeGantt.handleTaskBarClickEvent(evnt, childCtParams);
249
- },
250
- dblclick(evnt) {
251
- evnt.stopPropagation();
252
- $xeGantt.handleTaskBarDblclickEvent(evnt, childCtParams);
240
+ if (childBarStyObj.top) {
241
+ childVbStyle.top = childBarStyObj.top;
242
+ }
243
+ if (childBarHtmlStyle) {
244
+ XEUtils.assign(childVbStyle, childBarHtmlStyle);
245
+ }
246
+ const childCtParams = { ...childBarParams };
247
+ if (contentMethod) {
248
+ childTitle = getStringValue(contentMethod({ row: childRow, title: childTitle, scaleType: scaleUnit }));
249
+ }
250
+ cbcVNs.push(
251
+ h(
252
+ "div",
253
+ {
254
+ key: childRowid,
255
+ attrs: {
256
+ rowid: childRowid
253
257
  },
254
- mousedown(evnt) {
255
- evnt.stopPropagation();
256
- if ($xeGantt.handleTaskBarModnEvent) {
257
- $xeGantt.handleTaskBarModnEvent(evnt, childCtParams);
258
+ class: [
259
+ "vxe-gantt-view--chart-subview-row",
260
+ `is--${childRenderTaskType}`,
261
+ {
262
+ "is--progress": showProgress,
263
+ "is--critical": showCriticalPath && criticalPathFlag && criticalRowMaps.has(childRowid),
264
+ "is--round": childRound,
265
+ "is--move": moveable,
266
+ "row--pending": !!pendingRowFlag && !!pendingRowMaps[childRowid]
258
267
  }
259
- }
260
- }
261
- }, [
262
- taskBarSlot ? h("div", {
263
- key: "cbc",
264
- class: "vxe-gantt-view--chart-subview-custom-bar-content-wrapper",
265
- on: ctOns
266
- }, $xeGantt.callSlot(taskBarSlot, childCtParams, h)) : h("div", {
267
- class: "vxe-gantt-view--chart-subview-bar-content-wrapper",
268
- on: ctOns
269
- }, [
270
- showProgress ? h("div", {
271
- class: "vxe-gantt-view--chart-progress",
272
- style: childVpStyle
273
- }) : renderEmptyElement($xeGantt),
274
- showContent ? h("div", {
275
- class: "vxe-gantt-view--chart-content"
276
- }, childTitle) : renderEmptyElement($xeGantt)
277
- ])
278
- ])
279
- ])
280
- );
281
- }, { children: childrenField });
268
+ ]
269
+ },
270
+ [
271
+ h(
272
+ "div",
273
+ {
274
+ attrs: {
275
+ rowid: childRowid
276
+ },
277
+ class: [taskBarSlot ? "vxe-gantt-view--chart-subview-custom-bar" : "vxe-gantt-view--chart-subview-bar", `is--${childRenderTaskType}`],
278
+ style: childVbStyle,
279
+ on: {
280
+ click(evnt) {
281
+ evnt.stopPropagation();
282
+ $xeGantt.handleTaskBarClickEvent(evnt, childCtParams);
283
+ },
284
+ dblclick(evnt) {
285
+ evnt.stopPropagation();
286
+ $xeGantt.handleTaskBarDblclickEvent(evnt, childCtParams);
287
+ },
288
+ mousedown(evnt) {
289
+ evnt.stopPropagation();
290
+ if ($xeGantt.handleTaskBarModnEvent) {
291
+ $xeGantt.handleTaskBarModnEvent(evnt, childCtParams);
292
+ }
293
+ }
294
+ }
295
+ },
296
+ [
297
+ taskBarSlot ? h(
298
+ "div",
299
+ {
300
+ key: "cbc",
301
+ class: "vxe-gantt-view--chart-subview-custom-bar-content-wrapper",
302
+ on: ctOns
303
+ },
304
+ $xeGantt.callSlot(taskBarSlot, childCtParams, h)
305
+ ) : h(
306
+ "div",
307
+ {
308
+ class: "vxe-gantt-view--chart-subview-bar-content-wrapper",
309
+ on: ctOns
310
+ },
311
+ [
312
+ showProgress ? h("div", {
313
+ class: "vxe-gantt-view--chart-progress",
314
+ style: childVpStyle
315
+ }) : renderEmptyElement($xeGantt),
316
+ showContent ? h(
317
+ "div",
318
+ {
319
+ class: "vxe-gantt-view--chart-content"
320
+ },
321
+ childTitle
322
+ ) : renderEmptyElement($xeGantt)
323
+ ]
324
+ )
325
+ ]
326
+ )
327
+ ]
328
+ )
329
+ );
330
+ },
331
+ { children: childrenField }
332
+ );
282
333
  cbVNs.push(
283
- h("div", {
284
- key: "vcsc",
285
- class: "vxe-gantt-view--chart-subview-wrapper is--inline"
286
- }, cbcVNs)
334
+ h(
335
+ "div",
336
+ {
337
+ key: "vcsc",
338
+ class: "vxe-gantt-view--chart-subview-wrapper is--inline"
339
+ },
340
+ cbcVNs
341
+ )
287
342
  );
288
343
  }
289
344
  } else {
290
345
  if (taskBarSlot) {
291
346
  cbVNs.push(
292
- h("div", {
293
- key: "cbc",
294
- class: "vxe-gantt-view--chart-custom-bar-content-wrapper",
295
- on: ctOns
296
- }, $xeGantt.callSlot(taskBarSlot, barParams, h))
347
+ h(
348
+ "div",
349
+ {
350
+ key: "cbc",
351
+ class: "vxe-gantt-view--chart-custom-bar-content-wrapper",
352
+ on: ctOns
353
+ },
354
+ $xeGantt.callSlot(taskBarSlot, barParams, h)
355
+ )
297
356
  );
298
357
  } else if (isMilestone) {
299
358
  const { icon, iconStatus, iconStyle } = taskBarMilestoneOpts;
300
359
  const tbmParams = { $gantt: $xeGantt, row };
301
360
  cbVNs.push(
302
- h("div", {
303
- key: "vcm",
304
- class: "vxe-gantt-view--chart-milestone-wrapper",
305
- on: ctOns
306
- }, [
307
- h("div", {
308
- class: ["vxe-gantt-view--chart-milestone-icon", iconStatus ? `theme--${XEUtils.isFunction(iconStatus) ? iconStatus(tbmParams) : iconStatus}` : ""],
309
- style: iconStyle ? Object.assign({}, XEUtils.isFunction(iconStyle) ? iconStyle(tbmParams) : iconStyle) : void 0
310
- }, [
311
- h("i", {
312
- class: (icon ? XEUtils.isFunction(icon) ? icon(tbmParams) : icon : "") || getIcon().GANTT_VIEW_TASK_MILESTONE
313
- })
314
- ]),
315
- showContent ? h("div", {
316
- class: "vxe-gantt-view--chart-milestone-content"
317
- }, title) : renderEmptyElement($xeGantt)
318
- ])
361
+ h(
362
+ "div",
363
+ {
364
+ key: "vcm",
365
+ class: "vxe-gantt-view--chart-milestone-wrapper",
366
+ on: ctOns
367
+ },
368
+ [
369
+ h(
370
+ "div",
371
+ {
372
+ class: ["vxe-gantt-view--chart-milestone-icon", iconStatus ? `theme--${XEUtils.isFunction(iconStatus) ? iconStatus(tbmParams) : iconStatus}` : ""],
373
+ style: iconStyle ? Object.assign({}, XEUtils.isFunction(iconStyle) ? iconStyle(tbmParams) : iconStyle) : void 0
374
+ },
375
+ [
376
+ h("i", {
377
+ class: (icon ? XEUtils.isFunction(icon) ? icon(tbmParams) : icon : "") || getIcon().GANTT_VIEW_TASK_MILESTONE
378
+ })
379
+ ]
380
+ ),
381
+ showContent ? h(
382
+ "div",
383
+ {
384
+ class: "vxe-gantt-view--chart-milestone-content"
385
+ },
386
+ title
387
+ ) : renderEmptyElement($xeGantt)
388
+ ]
389
+ )
319
390
  );
320
391
  } else {
321
392
  cbVNs.push(
322
- h("div", {
323
- key: "vbc",
324
- class: "vxe-gantt-view--chart-bar-content-wrapper",
325
- on: ctOns
326
- }, [
327
- showProgress ? h("div", {
328
- class: "vxe-gantt-view--chart-progress",
329
- style: vpStyle
330
- }) : renderEmptyElement($xeGantt),
331
- showContent ? h("div", {
332
- class: "vxe-gantt-view--chart-content"
333
- }, title) : renderEmptyElement($xeGantt)
334
- ])
393
+ h(
394
+ "div",
395
+ {
396
+ key: "vbc",
397
+ class: "vxe-gantt-view--chart-bar-content-wrapper",
398
+ on: ctOns
399
+ },
400
+ [
401
+ showProgress ? h("div", {
402
+ class: "vxe-gantt-view--chart-progress",
403
+ style: vpStyle
404
+ }) : renderEmptyElement($xeGantt),
405
+ showContent ? h(
406
+ "div",
407
+ {
408
+ class: "vxe-gantt-view--chart-content"
409
+ },
410
+ title
411
+ ) : renderEmptyElement($xeGantt)
412
+ ]
413
+ )
335
414
  );
336
415
  }
337
416
  }
338
417
  }
339
- return h("div", {
340
- key: rowid,
341
- attrs: {
342
- rowid
343
- },
344
- class: ["vxe-gantt-view--chart-row", `is--${renderTaskType}`, {
345
- "is--progress": showProgress,
346
- "is--critical": showCriticalPath && criticalPathFlag && criticalRowMaps.has(rowid),
347
- "row--pending": !!pendingRowFlag && !!pendingRowMaps[rowid],
348
- "is--round": barRound,
349
- "is--move": moveable
350
- }],
351
- style: {
352
- height: `${cellHeight}px`
353
- },
354
- on: {
355
- onDragstart(evnt) {
356
- if (ganttInternalData.dragBarRow) {
357
- evnt.preventDefault();
358
- }
359
- },
360
- contextmenu(evnt) {
361
- $xeGantt.handleTaskBarContextmenuEvent(evnt, ctParams);
362
- }
363
- }
364
- }, [
365
- h("div", {
366
- class: [taskBarSlot ? "vxe-gantt-view--chart-custom-bar" : "vxe-gantt-view--chart-bar", `is--${renderTaskType}`, {
367
- "is--active": activeBarRowid === rowid,
368
- "active--link": activeLink && (rowid === `${activeLink.from}` || rowid === `${activeLink.to}`)
369
- }],
370
- style: vbStyle,
418
+ return h(
419
+ "div",
420
+ {
421
+ key: rowid,
371
422
  attrs: {
372
423
  rowid
373
424
  },
425
+ class: [
426
+ "vxe-gantt-view--chart-row",
427
+ `is--${renderTaskType}`,
428
+ {
429
+ "is--progress": showProgress,
430
+ "is--critical": showCriticalPath && criticalPathFlag && criticalRowMaps.has(rowid),
431
+ "row--pending": !!pendingRowFlag && !!pendingRowMaps[rowid],
432
+ "is--round": barRound,
433
+ "is--move": moveable
434
+ }
435
+ ],
436
+ style: {
437
+ height: `${cellHeight}px`
438
+ },
374
439
  on: {
375
- click(evnt) {
376
- $xeGantt.handleTaskBarClickEvent(evnt, barParams);
377
- },
378
- dblclick(evnt) {
379
- $xeGantt.handleTaskBarDblclickEvent(evnt, barParams);
380
- },
381
- mousedown(evnt) {
382
- if ($xeGantt.handleTaskBarModnEvent) {
383
- $xeGantt.handleTaskBarModnEvent(evnt, barParams);
440
+ onDragstart(evnt) {
441
+ if (ganttInternalData.dragBarRow) {
442
+ evnt.preventDefault();
384
443
  }
444
+ },
445
+ contextmenu(evnt) {
446
+ $xeGantt.handleTaskBarContextmenuEvent(evnt, ctParams);
385
447
  }
386
448
  }
387
- }, cbVNs)
388
- ]);
449
+ },
450
+ [
451
+ h(
452
+ "div",
453
+ {
454
+ class: [
455
+ taskBarSlot ? "vxe-gantt-view--chart-custom-bar" : "vxe-gantt-view--chart-bar",
456
+ `is--${renderTaskType}`,
457
+ {
458
+ "is--active": activeBarRowid === rowid,
459
+ "active--link": activeLink && (rowid === `${activeLink.from}` || rowid === `${activeLink.to}`)
460
+ }
461
+ ],
462
+ style: vbStyle,
463
+ attrs: {
464
+ rowid
465
+ },
466
+ on: {
467
+ click(evnt) {
468
+ $xeGantt.handleTaskBarClickEvent(evnt, barParams);
469
+ },
470
+ dblclick(evnt) {
471
+ $xeGantt.handleTaskBarDblclickEvent(evnt, barParams);
472
+ },
473
+ mousedown(evnt) {
474
+ if ($xeGantt.handleTaskBarModnEvent) {
475
+ $xeGantt.handleTaskBarModnEvent(evnt, barParams);
476
+ }
477
+ }
478
+ }
479
+ },
480
+ cbVNs
481
+ )
482
+ ]
483
+ );
389
484
  },
390
485
  renderTaskRows(h, $xeTable, tableData) {
391
486
  const _vm = this;
@@ -441,38 +536,67 @@ var gantt_chart_default = defineVxeComponent({
441
536
  const { isCurrent, isHover } = taskLinkOpts;
442
537
  const { linkCreatable } = taskBarOpts;
443
538
  const taskNowLineSlot = ganttSlots.taskNowLine || ganttSlots["task-now-line"];
444
- return h("div", {
445
- ref: "refElem",
446
- class: ["vxe-gantt-view--chart-wrapper", {
447
- "is--cl-drag": dragLinkFromStore.rowid
448
- }]
449
- }, [
450
- nowLineLeft > 0 ? h("div", {
451
- ref: "refNowLineElem",
452
- class: "vxe-gantt-view--chart-now-line",
453
- style: {
454
- left: nowLineLeft + "px"
455
- }
456
- }, taskNowLineSlot ? taskNowLineSlot({}) : []) : renderEmptyElement($xeGantt),
457
- $xeGantt.renderGanttTaskChartBefores ? h("div", {
458
- ref: "refChartBeforeWrapperElem",
459
- class: ["vxe-gantt-view--chart-before-wrapper", {
460
- "link--current": isCurrent,
461
- "link--hover": isHover
462
- }]
463
- }, $xeTable && isEnableConf(taskLinkOpts) ? $xeGantt.renderGanttTaskChartBefores(h) : []) : renderEmptyElement($xeGantt),
464
- h("div", {
465
- ref: "refTaskWrapperElem",
466
- class: ["vxe-gantt-view--chart-task-wrapper", {
467
- "link--current": isCurrent,
468
- "link--create": linkCreatable
469
- }]
470
- }, $xeTable ? _vm.renderTaskRows(h, $xeTable, tableData) : []),
471
- $xeGantt.renderGanttTaskChartAfters ? h("div", {
472
- ref: "refChartAfterWrapperElem",
473
- class: "vxe-gantt-view--chart-after-wrapper"
474
- }, $xeTable && isEnableConf(taskLinkOpts) ? $xeGantt.renderGanttTaskChartAfters(h) : []) : renderEmptyElement($xeGantt)
475
- ]);
539
+ return h(
540
+ "div",
541
+ {
542
+ ref: "refElem",
543
+ class: [
544
+ "vxe-gantt-view--chart-wrapper",
545
+ {
546
+ "is--cl-drag": dragLinkFromStore.rowid
547
+ }
548
+ ]
549
+ },
550
+ [
551
+ nowLineLeft > 0 ? h(
552
+ "div",
553
+ {
554
+ ref: "refNowLineElem",
555
+ class: "vxe-gantt-view--chart-now-line",
556
+ style: {
557
+ left: nowLineLeft + "px"
558
+ }
559
+ },
560
+ taskNowLineSlot ? taskNowLineSlot({}) : []
561
+ ) : renderEmptyElement($xeGantt),
562
+ $xeGantt.renderGanttTaskChartBefores ? h(
563
+ "div",
564
+ {
565
+ ref: "refChartBeforeWrapperElem",
566
+ class: [
567
+ "vxe-gantt-view--chart-before-wrapper",
568
+ {
569
+ "link--current": isCurrent,
570
+ "link--hover": isHover
571
+ }
572
+ ]
573
+ },
574
+ $xeTable && isEnableConf(taskLinkOpts) ? $xeGantt.renderGanttTaskChartBefores(h) : []
575
+ ) : renderEmptyElement($xeGantt),
576
+ h(
577
+ "div",
578
+ {
579
+ ref: "refTaskWrapperElem",
580
+ class: [
581
+ "vxe-gantt-view--chart-task-wrapper",
582
+ {
583
+ "link--current": isCurrent,
584
+ "link--create": linkCreatable
585
+ }
586
+ ]
587
+ },
588
+ $xeTable ? _vm.renderTaskRows(h, $xeTable, tableData) : []
589
+ ),
590
+ $xeGantt.renderGanttTaskChartAfters ? h(
591
+ "div",
592
+ {
593
+ ref: "refChartAfterWrapperElem",
594
+ class: "vxe-gantt-view--chart-after-wrapper"
595
+ },
596
+ $xeTable && isEnableConf(taskLinkOpts) ? $xeGantt.renderGanttTaskChartAfters(h) : []
597
+ ) : renderEmptyElement($xeGantt)
598
+ ]
599
+ );
476
600
  }
477
601
  },
478
602
  mounted() {