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.
- package/dist/all.esm.js +1398 -881
- package/es/components.js +1 -3
- package/es/gantt/src/gantt-body.js +100 -76
- package/es/gantt/src/gantt-chart.js +363 -239
- package/es/gantt/src/gantt-footer.js +16 -12
- package/es/gantt/src/gantt-header.js +135 -104
- package/es/gantt/src/gantt-view.js +235 -201
- package/es/gantt/src/gantt.js +545 -229
- package/es/gantt/src/grid-emits.js +1 -15
- package/es/style.css +982 -0
- package/es/style.mini.css +1 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.d.ts +1 -1
- package/lib/components.js +1 -3
- package/lib/gantt/src/gantt-body.js +100 -76
- package/lib/gantt/src/gantt-chart.js +363 -239
- package/lib/gantt/src/gantt-footer.js +16 -12
- package/lib/gantt/src/gantt-header.js +135 -104
- package/lib/gantt/src/gantt-view.js +235 -201
- package/lib/gantt/src/gantt.js +545 -229
- package/lib/gantt/src/grid-emits.js +1 -15
- package/lib/index.umd.js +1398 -881
- package/lib/index.umd.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/package.json +11 -4
- package/packages/components.ts +20 -22
- package/packages/gantt/index.ts +21 -21
- package/packages/gantt/src/emits.ts +25 -25
- package/packages/gantt/src/gantt-body.ts +317 -293
- package/packages/gantt/src/gantt-chart.ts +655 -531
- package/packages/gantt/src/gantt-footer.ts +55 -51
- package/packages/gantt/src/gantt-header.ts +193 -162
- package/packages/gantt/src/gantt-view.ts +2695 -2663
- package/packages/gantt/src/gantt.ts +3317 -2982
- package/packages/gantt/src/grid-emits.ts +5 -19
- package/packages/gantt/src/static.ts +35 -35
- package/packages/gantt/src/table-emits.ts +134 -134
- package/packages/gantt/src/util.ts +45 -45
- package/packages/index.ts +4 -4
- package/packages/ui/index.ts +133 -135
- package/packages/ui/src/comp.ts +3 -3
- package/packages/ui/src/depend.ts +14 -14
- package/packages/ui/src/dom.ts +202 -202
- package/packages/ui/src/log.ts +19 -19
- package/packages/ui/src/utils.ts +80 -80
- package/packages/ui/src/vn.ts +9 -9
- package/types/all.d.ts +33 -33
- package/types/index.d.ts +4 -4
package/es/components.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import VxeUI from "./ui";
|
|
2
2
|
import VxeGantt from "./gantt";
|
|
3
3
|
const { setConfig } = VxeUI;
|
|
4
|
-
const components = [
|
|
5
|
-
VxeGantt
|
|
6
|
-
];
|
|
4
|
+
const components = [VxeGantt];
|
|
7
5
|
function install(app, options) {
|
|
8
6
|
setConfig(options);
|
|
9
7
|
components.forEach((component) => app.use(component));
|
|
@@ -89,30 +89,34 @@ var gantt_body_default = defineVxeComponent({
|
|
|
89
89
|
rowIndex,
|
|
90
90
|
_rowIndex
|
|
91
91
|
};
|
|
92
|
-
return h(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
92
|
+
return h(
|
|
93
|
+
"td",
|
|
94
|
+
{
|
|
95
|
+
key: cellClassName || cellStyle ? field : $columnIndex,
|
|
96
|
+
class: [
|
|
97
|
+
"vxe-gantt-view--body-column",
|
|
98
|
+
{
|
|
99
|
+
"is--now": showNowLine && todayValue === field
|
|
100
|
+
},
|
|
101
|
+
getClass(cellClassName, ctParams)
|
|
102
|
+
],
|
|
103
|
+
style: cellStyle ? Object.assign({}, XEUtils.isFunction(cellStyle) ? cellStyle(ctParams) : cellStyle, {
|
|
104
|
+
height: `${cellHeight}px`
|
|
105
|
+
}) : {
|
|
106
|
+
height: `${cellHeight}px`
|
|
98
107
|
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
onDblclick(evnt) {
|
|
110
|
-
$xeGantt.handleTaskCellDblclickEvent(evnt, { row, column });
|
|
108
|
+
onClick(evnt) {
|
|
109
|
+
$xeGantt.handleTaskCellClickEvent(evnt, { row, column });
|
|
110
|
+
},
|
|
111
|
+
onDblclick(evnt) {
|
|
112
|
+
$xeGantt.handleTaskCellDblclickEvent(evnt, { row, column });
|
|
113
|
+
},
|
|
114
|
+
onContextmenu(evnt) {
|
|
115
|
+
$xeGantt.handleTaskBodyContextmenuEvent(evnt, ctParams);
|
|
116
|
+
}
|
|
111
117
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
}, tdVNs);
|
|
118
|
+
tdVNs
|
|
119
|
+
);
|
|
116
120
|
};
|
|
117
121
|
const renderRows = ($xeTable, tableData) => {
|
|
118
122
|
const tableProps = $xeTable.props;
|
|
@@ -172,23 +176,27 @@ var gantt_body_default = defineVxeComponent({
|
|
|
172
176
|
_rowIndex
|
|
173
177
|
};
|
|
174
178
|
trVNs.push(
|
|
175
|
-
h(
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
"row
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
179
|
+
h(
|
|
180
|
+
"tr",
|
|
181
|
+
{
|
|
182
|
+
key: rowClassName || rowStyle || cellClassName || cellStyle ? rowid : $rowIndex,
|
|
183
|
+
class: [
|
|
184
|
+
"vxe-gantt-view--body-row",
|
|
185
|
+
{
|
|
186
|
+
"row--stripe": stripe && (_rowIndex + 1) % 2 === 0,
|
|
187
|
+
"is--new": isNewRow,
|
|
188
|
+
"row--radio": radioOpts.highlight && $xeTable.eqRow(selectRadioRow, row),
|
|
189
|
+
"row--checked": checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
|
|
190
|
+
"row--pending": !!pendingRowFlag && !!pendingRowMaps[rowid]
|
|
191
|
+
},
|
|
192
|
+
getClass(rowClassName, rowParams)
|
|
193
|
+
],
|
|
194
|
+
rowid,
|
|
195
|
+
style: rowStyle ? XEUtils.isFunction(rowStyle) ? rowStyle(rowParams) || void 0 : rowStyle : void 0,
|
|
196
|
+
...trOns
|
|
197
|
+
},
|
|
198
|
+
tableColumn.map((column, $columnIndex) => renderColumn($xeTable, row, rowid, rowIndex, $rowIndex, _rowIndex, column, $columnIndex))
|
|
199
|
+
)
|
|
192
200
|
);
|
|
193
201
|
let isExpandTree = false;
|
|
194
202
|
let rowChildren = [];
|
|
@@ -205,43 +213,59 @@ var gantt_body_default = defineVxeComponent({
|
|
|
205
213
|
const renderVN = () => {
|
|
206
214
|
const $xeTable = $xeGanttView.internalData.xeTable;
|
|
207
215
|
const { tableData, tableColumn, viewCellWidth } = reactData;
|
|
208
|
-
return h(
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
216
|
+
return h(
|
|
217
|
+
"div",
|
|
218
|
+
{
|
|
219
|
+
ref: refElem,
|
|
220
|
+
class: "vxe-gantt-view--body-wrapper"
|
|
221
|
+
},
|
|
222
|
+
[
|
|
223
|
+
h(
|
|
224
|
+
"div",
|
|
225
|
+
{
|
|
226
|
+
ref: refBodyScroll,
|
|
227
|
+
class: "vxe-gantt-view--body-inner-wrapper",
|
|
228
|
+
onScroll: $xeGanttView.triggerBodyScrollEvent,
|
|
229
|
+
onContextmenu(evnt) {
|
|
230
|
+
$xeGantt.handleTaskBodyContextmenuEvent(evnt, { source: sourceType, type: viewType, rowIndex: -1, $rowIndex: -1, _rowIndex: -1 });
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
[
|
|
234
|
+
h("div", {
|
|
235
|
+
ref: refBodyXSpace,
|
|
236
|
+
class: "vxe-body--x-space"
|
|
237
|
+
}),
|
|
238
|
+
h("div", {
|
|
239
|
+
ref: refBodyYSpace,
|
|
240
|
+
class: "vxe-body--y-space"
|
|
241
|
+
}),
|
|
242
|
+
h(
|
|
243
|
+
"table",
|
|
244
|
+
{
|
|
245
|
+
ref: refBodyTable,
|
|
246
|
+
class: "vxe-gantt-view--body-table"
|
|
247
|
+
},
|
|
248
|
+
[
|
|
249
|
+
h(
|
|
250
|
+
"colgroup",
|
|
251
|
+
{},
|
|
252
|
+
tableColumn.map((column, cIndex) => {
|
|
253
|
+
return h("col", {
|
|
254
|
+
key: cIndex,
|
|
255
|
+
style: {
|
|
256
|
+
width: `${viewCellWidth}px`
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
})
|
|
260
|
+
),
|
|
261
|
+
h("tbody", {}, $xeTable ? renderRows($xeTable, tableData) : [])
|
|
262
|
+
]
|
|
263
|
+
),
|
|
264
|
+
h(GanttViewChartComponent)
|
|
265
|
+
]
|
|
266
|
+
)
|
|
267
|
+
]
|
|
268
|
+
);
|
|
245
269
|
};
|
|
246
270
|
onMounted(() => {
|
|
247
271
|
const { elemStore } = internalData;
|