vxe-gantt 4.1.1 → 4.1.2
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/es/gantt/src/gantt-body.js +25 -3
- package/es/gantt/src/gantt-chart.js +14 -4
- package/es/gantt/src/gantt.js +4 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/gantt/src/gantt-body.js +8 -1
- package/lib/gantt/src/gantt-body.min.js +1 -1
- package/lib/gantt/src/gantt-chart.js +10 -5
- package/lib/gantt/src/gantt-chart.min.js +1 -1
- package/lib/gantt/src/gantt.js +4 -1
- package/lib/gantt/src/gantt.min.js +1 -1
- package/lib/index.umd.js +24 -9
- package/lib/index.umd.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/gantt/src/gantt-body.ts +25 -3
- package/packages/gantt/src/gantt-chart.ts +14 -4
- package/packages/gantt/src/gantt.ts +4 -1
|
@@ -17,7 +17,7 @@ export default defineVxeComponent({
|
|
|
17
17
|
const $xeGantt = inject('$xeGantt', {} as (VxeGanttConstructor & VxeGanttPrivateMethods))
|
|
18
18
|
const $xeGanttView = inject('$xeGanttView', {} as VxeGanttViewConstructor & VxeGanttViewPrivateMethods)
|
|
19
19
|
|
|
20
|
-
const { computeTaskViewOpts } = $xeGantt.getComputeMaps()
|
|
20
|
+
const { computeTaskViewOpts, computeScaleUnit } = $xeGantt.getComputeMaps()
|
|
21
21
|
const { reactData, internalData } = $xeGanttView
|
|
22
22
|
|
|
23
23
|
const refElem = ref() as Ref<HTMLDivElement>
|
|
@@ -42,6 +42,7 @@ export default defineVxeComponent({
|
|
|
42
42
|
const { todayDateMaps } = internalData
|
|
43
43
|
const taskViewOpts = computeTaskViewOpts.value
|
|
44
44
|
const { showNowLine, viewStyle } = taskViewOpts
|
|
45
|
+
const scaleUnit = computeScaleUnit.value
|
|
45
46
|
const { scaleItem } = headerGroups[headerGroups.length - 1] || {}
|
|
46
47
|
const { field, dateObj } = column
|
|
47
48
|
const { cellClassName, cellStyle } = viewStyle || {}
|
|
@@ -88,7 +89,18 @@ export default defineVxeComponent({
|
|
|
88
89
|
})
|
|
89
90
|
)
|
|
90
91
|
}
|
|
91
|
-
const ctParams = {
|
|
92
|
+
const ctParams = {
|
|
93
|
+
$gantt: $xeGantt,
|
|
94
|
+
source: sourceType,
|
|
95
|
+
type: viewType,
|
|
96
|
+
scaleType: scaleUnit,
|
|
97
|
+
dateObj,
|
|
98
|
+
row,
|
|
99
|
+
column,
|
|
100
|
+
$rowIndex,
|
|
101
|
+
rowIndex,
|
|
102
|
+
_rowIndex
|
|
103
|
+
}
|
|
92
104
|
return h('td', {
|
|
93
105
|
key: $columnIndex,
|
|
94
106
|
class: [
|
|
@@ -133,6 +145,7 @@ export default defineVxeComponent({
|
|
|
133
145
|
const { transform } = treeOpts
|
|
134
146
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
135
147
|
|
|
148
|
+
const scaleUnit = computeScaleUnit.value
|
|
136
149
|
const taskViewOpts = computeTaskViewOpts.value
|
|
137
150
|
const { viewStyle } = taskViewOpts
|
|
138
151
|
const { rowClassName, rowStyle } = viewStyle || {}
|
|
@@ -170,7 +183,16 @@ export default defineVxeComponent({
|
|
|
170
183
|
trOns.onDragend = $xeTable.handleRowDragDragendEvent
|
|
171
184
|
trOns.onDragover = $xeTable.handleRowDragDragoverEvent
|
|
172
185
|
}
|
|
173
|
-
const rowParams = {
|
|
186
|
+
const rowParams = {
|
|
187
|
+
$gantt: $xeGantt,
|
|
188
|
+
source: sourceType,
|
|
189
|
+
type: viewType,
|
|
190
|
+
scaleType: scaleUnit,
|
|
191
|
+
row,
|
|
192
|
+
rowIndex,
|
|
193
|
+
$rowIndex,
|
|
194
|
+
_rowIndex
|
|
195
|
+
}
|
|
174
196
|
trVNs.push(
|
|
175
197
|
h('tr', {
|
|
176
198
|
key: treeConfig ? rowid : $rowIndex,
|
|
@@ -21,7 +21,7 @@ export default defineVxeComponent({
|
|
|
21
21
|
const $xeGanttView = inject('$xeGanttView', {} as VxeGanttViewConstructor & VxeGanttViewPrivateMethods)
|
|
22
22
|
|
|
23
23
|
const { reactData, internalData } = $xeGanttView
|
|
24
|
-
const { computeProgressField, computeTitleField, computeTaskBarOpts } = $xeGantt.getComputeMaps()
|
|
24
|
+
const { computeProgressField, computeTitleField, computeTaskBarOpts, computeScaleUnit } = $xeGantt.getComputeMaps()
|
|
25
25
|
|
|
26
26
|
const refElem = ref() as Ref<HTMLDivElement>
|
|
27
27
|
|
|
@@ -43,7 +43,8 @@ export default defineVxeComponent({
|
|
|
43
43
|
const titleField = computeTitleField.value
|
|
44
44
|
const progressField = computeProgressField.value
|
|
45
45
|
const taskBarOpts = computeTaskBarOpts.value
|
|
46
|
-
const
|
|
46
|
+
const scaleUnit = computeScaleUnit.value
|
|
47
|
+
const barParams = { $gantt: $xeGantt, row, scaleType: scaleUnit }
|
|
47
48
|
const { showProgress, showContent, contentMethod, barStyle, drag, showTooltip } = taskBarOpts
|
|
48
49
|
const isBarRowStyle = XEUtils.isFunction(barStyle)
|
|
49
50
|
const barStyObj = (barStyle ? (isBarRowStyle ? barStyle(barParams) : barStyle) : {}) || {}
|
|
@@ -72,10 +73,19 @@ export default defineVxeComponent({
|
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
if (contentMethod) {
|
|
75
|
-
title = getStringValue(contentMethod({ row, title }))
|
|
76
|
+
title = getStringValue(contentMethod({ row, title, scaleType: scaleUnit }))
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
const ctParams = {
|
|
79
|
+
const ctParams = {
|
|
80
|
+
$gantt: $xeGantt,
|
|
81
|
+
source: sourceType,
|
|
82
|
+
type: viewType,
|
|
83
|
+
scaleType: scaleUnit,
|
|
84
|
+
row,
|
|
85
|
+
$rowIndex,
|
|
86
|
+
rowIndex,
|
|
87
|
+
_rowIndex
|
|
88
|
+
}
|
|
79
89
|
const ons: {
|
|
80
90
|
onClick: any
|
|
81
91
|
onDblclick: any
|
|
@@ -1762,7 +1762,10 @@ export default defineVxeComponent({
|
|
|
1762
1762
|
const { row } = params
|
|
1763
1763
|
let content = formatText(XEUtils.get(row, titleField))
|
|
1764
1764
|
if (contentMethod) {
|
|
1765
|
-
|
|
1765
|
+
const customContnet = contentMethod(params)
|
|
1766
|
+
if (!XEUtils.eqNull(customContnet)) {
|
|
1767
|
+
content = `${customContnet}`
|
|
1768
|
+
}
|
|
1766
1769
|
}
|
|
1767
1770
|
handleTargetEnterEvent(barTipStore.row !== row)
|
|
1768
1771
|
const tipContent = formatText(content)
|