vxe-gantt 4.9.2 → 4.9.4

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