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/gantt/src/gantt.js
CHANGED
|
@@ -15,7 +15,177 @@ const { warnLog, errLog } = createComponentLog("gantt");
|
|
|
15
15
|
const { getConfig, getIcon, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = VxeUI;
|
|
16
16
|
const tableProps = VxeTableComponent.props;
|
|
17
17
|
const tableComponentPropKeys = Object.keys(tableProps);
|
|
18
|
-
const tableComponentMethodKeys = [
|
|
18
|
+
const tableComponentMethodKeys = [
|
|
19
|
+
"clearAll",
|
|
20
|
+
"syncData",
|
|
21
|
+
"updateData",
|
|
22
|
+
"loadData",
|
|
23
|
+
"reloadData",
|
|
24
|
+
"reloadRow",
|
|
25
|
+
"loadColumn",
|
|
26
|
+
"reloadColumn",
|
|
27
|
+
"getRowNode",
|
|
28
|
+
"getColumnNode",
|
|
29
|
+
"getRowIndex",
|
|
30
|
+
"getVTRowIndex",
|
|
31
|
+
"getVMRowIndex",
|
|
32
|
+
"getColumnIndex",
|
|
33
|
+
"getVTColumnIndex",
|
|
34
|
+
"getVMColumnIndex",
|
|
35
|
+
"setRow",
|
|
36
|
+
"createData",
|
|
37
|
+
"createRow",
|
|
38
|
+
"revertData",
|
|
39
|
+
"clearData",
|
|
40
|
+
"isRemoveByRow",
|
|
41
|
+
"isInsertByRow",
|
|
42
|
+
"isUpdateByRow",
|
|
43
|
+
"getColumns",
|
|
44
|
+
"getColumnById",
|
|
45
|
+
"getColumnByField",
|
|
46
|
+
"getTableColumn",
|
|
47
|
+
"getFullColumns",
|
|
48
|
+
"getData",
|
|
49
|
+
"getCheckboxRecords",
|
|
50
|
+
"getParentRow",
|
|
51
|
+
"getTreeRowChildren",
|
|
52
|
+
"getTreeRowLevel",
|
|
53
|
+
"getTreeParentRow",
|
|
54
|
+
"getRowSeq",
|
|
55
|
+
"getRowById",
|
|
56
|
+
"getRowid",
|
|
57
|
+
"getTableData",
|
|
58
|
+
"getFullData",
|
|
59
|
+
"setColumnFixed",
|
|
60
|
+
"clearColumnFixed",
|
|
61
|
+
"setColumnWidth",
|
|
62
|
+
"getColumnWidth",
|
|
63
|
+
"recalcRowHeight",
|
|
64
|
+
"setRowHeightConf",
|
|
65
|
+
"getRowHeightConf",
|
|
66
|
+
"setRowHeight",
|
|
67
|
+
"getRowHeight",
|
|
68
|
+
"hideColumn",
|
|
69
|
+
"showColumn",
|
|
70
|
+
"resetColumn",
|
|
71
|
+
"refreshColumn",
|
|
72
|
+
"refreshScroll",
|
|
73
|
+
"recalculate",
|
|
74
|
+
"closeTooltip",
|
|
75
|
+
"isAllCheckboxChecked",
|
|
76
|
+
"isAllCheckboxIndeterminate",
|
|
77
|
+
"getCheckboxIndeterminateRecords",
|
|
78
|
+
"setCheckboxRow",
|
|
79
|
+
"setCheckboxRowKey",
|
|
80
|
+
"isCheckedByCheckboxRow",
|
|
81
|
+
"isCheckedByCheckboxRowKey",
|
|
82
|
+
"isIndeterminateByCheckboxRow",
|
|
83
|
+
"isIndeterminateByCheckboxRowKey",
|
|
84
|
+
"toggleCheckboxRow",
|
|
85
|
+
"setAllCheckboxRow",
|
|
86
|
+
"getRadioReserveRecord",
|
|
87
|
+
"clearRadioReserve",
|
|
88
|
+
"getCheckboxReserveRecords",
|
|
89
|
+
"clearCheckboxReserve",
|
|
90
|
+
"toggleAllCheckboxRow",
|
|
91
|
+
"clearCheckboxRow",
|
|
92
|
+
"setCurrentRow",
|
|
93
|
+
"isCheckedByRadioRow",
|
|
94
|
+
"isCheckedByRadioRowKey",
|
|
95
|
+
"setRadioRow",
|
|
96
|
+
"setRadioRowKey",
|
|
97
|
+
"clearCurrentRow",
|
|
98
|
+
"clearRadioRow",
|
|
99
|
+
"getCurrentRecord",
|
|
100
|
+
"getRadioRecord",
|
|
101
|
+
"getCurrentColumn",
|
|
102
|
+
"setCurrentColumn",
|
|
103
|
+
"clearCurrentColumn",
|
|
104
|
+
"setPendingRow",
|
|
105
|
+
"togglePendingRow",
|
|
106
|
+
"hasPendingByRow",
|
|
107
|
+
"isPendingByRow",
|
|
108
|
+
"getPendingRecords",
|
|
109
|
+
"clearPendingRow",
|
|
110
|
+
"setFilterByEvent",
|
|
111
|
+
"sort",
|
|
112
|
+
"setSort",
|
|
113
|
+
"setSortByEvent",
|
|
114
|
+
"clearSort",
|
|
115
|
+
"clearSortByEvent",
|
|
116
|
+
"isSort",
|
|
117
|
+
"getSortColumns",
|
|
118
|
+
"closeFilter",
|
|
119
|
+
"isFilter",
|
|
120
|
+
"clearFilterByEvent",
|
|
121
|
+
"isActiveFilterByColumn",
|
|
122
|
+
"isRowExpandLoaded",
|
|
123
|
+
"clearRowExpandLoaded",
|
|
124
|
+
"reloadRowExpand",
|
|
125
|
+
"reloadRowExpand",
|
|
126
|
+
"toggleRowExpand",
|
|
127
|
+
"setAllRowExpand",
|
|
128
|
+
"setRowExpand",
|
|
129
|
+
"isExpandByRow",
|
|
130
|
+
"isRowExpandByRow",
|
|
131
|
+
"clearRowExpand",
|
|
132
|
+
"clearRowExpandReserve",
|
|
133
|
+
"getRowExpandRecords",
|
|
134
|
+
"getTreeExpandRecords",
|
|
135
|
+
"isTreeExpandLoaded",
|
|
136
|
+
"clearTreeExpandLoaded",
|
|
137
|
+
"reloadTreeExpand",
|
|
138
|
+
"reloadTreeChilds",
|
|
139
|
+
"toggleTreeExpand",
|
|
140
|
+
"setAllTreeExpand",
|
|
141
|
+
"setTreeExpand",
|
|
142
|
+
"isTreeExpandByRow",
|
|
143
|
+
"clearTreeExpand",
|
|
144
|
+
"clearTreeExpandReserve",
|
|
145
|
+
"getScroll",
|
|
146
|
+
"scrollTo",
|
|
147
|
+
"scrollToStartRow",
|
|
148
|
+
"scrollToEndRow",
|
|
149
|
+
"scrollToRow",
|
|
150
|
+
"scrollToStartColumn",
|
|
151
|
+
"scrollToEndColumn",
|
|
152
|
+
"scrollToColumn",
|
|
153
|
+
"clearScroll",
|
|
154
|
+
"updateFooter",
|
|
155
|
+
"updateStatus",
|
|
156
|
+
"setMergeCells",
|
|
157
|
+
"removeInsertRow",
|
|
158
|
+
"removeMergeCells",
|
|
159
|
+
"getMergeCells",
|
|
160
|
+
"clearMergeCells",
|
|
161
|
+
"setMergeFooterItems",
|
|
162
|
+
"removeMergeFooterItems",
|
|
163
|
+
"getMergeFooterItems",
|
|
164
|
+
"clearMergeFooterItems",
|
|
165
|
+
"getCustomStoreData",
|
|
166
|
+
"setRowGroupExpand",
|
|
167
|
+
"setRowGroupExpandByField",
|
|
168
|
+
"setAllRowGroupExpand",
|
|
169
|
+
"clearRowGroupExpand",
|
|
170
|
+
"isRowGroupExpandByRow",
|
|
171
|
+
"isRowGroupRecord",
|
|
172
|
+
"isAggregateRecord",
|
|
173
|
+
"isAggregateExpandByRow",
|
|
174
|
+
"getAggregateContentByRow",
|
|
175
|
+
"getAggregateRowChildren",
|
|
176
|
+
"setRowGroups",
|
|
177
|
+
"clearRowGroups",
|
|
178
|
+
"openTooltip",
|
|
179
|
+
"moveColumnTo",
|
|
180
|
+
"moveRowTo",
|
|
181
|
+
"getCellLabel",
|
|
182
|
+
"undo",
|
|
183
|
+
"redo",
|
|
184
|
+
"getCellElement",
|
|
185
|
+
"focus",
|
|
186
|
+
"blur",
|
|
187
|
+
"connect"
|
|
188
|
+
];
|
|
19
189
|
const defaultLayouts = [["Form"], ["Toolbar", "Top", "Gantt", "Bottom", "Pager"]];
|
|
20
190
|
function createInternalData() {
|
|
21
191
|
return {
|
|
@@ -1223,10 +1393,7 @@ var gantt_default = defineVxeComponent({
|
|
|
1223
1393
|
reactData.sortData = sortList;
|
|
1224
1394
|
reactData.filterData = filterList;
|
|
1225
1395
|
reactData.tableLoading = true;
|
|
1226
|
-
return Promise.all([
|
|
1227
|
-
Promise.resolve((oldBeforeQuery || qMethod)(commitParams, ...args)),
|
|
1228
|
-
operPromise
|
|
1229
|
-
]).then(([rest]) => {
|
|
1396
|
+
return Promise.all([Promise.resolve((oldBeforeQuery || qMethod)(commitParams, ...args)), operPromise]).then(([rest]) => {
|
|
1230
1397
|
reactData.tableLoading = false;
|
|
1231
1398
|
if (aqMethod) {
|
|
1232
1399
|
aqMethod({ ...commitParams, response: rest, status: "success" }, ...args);
|
|
@@ -1596,9 +1763,13 @@ var gantt_default = defineVxeComponent({
|
|
|
1596
1763
|
const { formConfig } = props;
|
|
1597
1764
|
const { items } = formOpts;
|
|
1598
1765
|
const itemList = [];
|
|
1599
|
-
XEUtils.eachTree(
|
|
1600
|
-
|
|
1601
|
-
|
|
1766
|
+
XEUtils.eachTree(
|
|
1767
|
+
formConfig && isEnableConf(formOpts) && items ? items : [],
|
|
1768
|
+
(item) => {
|
|
1769
|
+
itemList.push(item);
|
|
1770
|
+
},
|
|
1771
|
+
{ children: "children" }
|
|
1772
|
+
);
|
|
1602
1773
|
return XEUtils.isUndefined(itemIndex) ? itemList : itemList[itemIndex];
|
|
1603
1774
|
},
|
|
1604
1775
|
getFormFlatItems() {
|
|
@@ -1952,11 +2123,17 @@ var gantt_default = defineVxeComponent({
|
|
|
1952
2123
|
const rowOpts = computeRowOpts.value;
|
|
1953
2124
|
const { row } = params;
|
|
1954
2125
|
if (rowOpts.isCurrent || highlightCurrentRow) {
|
|
1955
|
-
$xeTable.triggerCurrentRowEvent(
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
2126
|
+
$xeTable.triggerCurrentRowEvent(
|
|
2127
|
+
evnt,
|
|
2128
|
+
Object.assign(
|
|
2129
|
+
{
|
|
2130
|
+
$table: $xeTable,
|
|
2131
|
+
rowIndex: $xeTable.getRowIndex(row),
|
|
2132
|
+
$rowIndex: $xeTable.getVMRowIndex(row)
|
|
2133
|
+
},
|
|
2134
|
+
params
|
|
2135
|
+
)
|
|
2136
|
+
);
|
|
1960
2137
|
}
|
|
1961
2138
|
if (radioColumn && radioOpts.trigger === "row") {
|
|
1962
2139
|
$xeTable.triggerRadioRowEvent(evnt, params);
|
|
@@ -2134,6 +2311,7 @@ var gantt_default = defineVxeComponent({
|
|
|
2134
2311
|
if (formOpts.items) {
|
|
2135
2312
|
const formSlots = {};
|
|
2136
2313
|
if (!formOpts.inited) {
|
|
2314
|
+
;
|
|
2137
2315
|
formOpts.inited = true;
|
|
2138
2316
|
const beforeItem = proxyOpts.beforeItem;
|
|
2139
2317
|
if (proxyOpts && beforeItem) {
|
|
@@ -2153,25 +2331,33 @@ var gantt_default = defineVxeComponent({
|
|
|
2153
2331
|
});
|
|
2154
2332
|
if (VxeUIFormComponent) {
|
|
2155
2333
|
slotVNs.push(
|
|
2156
|
-
h(
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2334
|
+
h(
|
|
2335
|
+
VxeUIFormComponent,
|
|
2336
|
+
{
|
|
2337
|
+
ref: refForm,
|
|
2338
|
+
...Object.assign({}, formOpts, {
|
|
2339
|
+
data: proxyConfig && isEnableConf(proxyOpts) && proxyOpts.form ? formData : formOpts.data
|
|
2340
|
+
}),
|
|
2341
|
+
onSubmit: submitFormEvent,
|
|
2342
|
+
onReset: resetFormEvent,
|
|
2343
|
+
onSubmitInvalid: submitInvalidEvent,
|
|
2344
|
+
onCollapse: collapseEvent
|
|
2345
|
+
},
|
|
2346
|
+
formSlots
|
|
2347
|
+
)
|
|
2166
2348
|
);
|
|
2167
2349
|
}
|
|
2168
2350
|
}
|
|
2169
2351
|
}
|
|
2170
|
-
return h(
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2352
|
+
return h(
|
|
2353
|
+
"div",
|
|
2354
|
+
{
|
|
2355
|
+
ref: refFormWrapper,
|
|
2356
|
+
key: "form",
|
|
2357
|
+
class: "vxe-gantt--form-wrapper"
|
|
2358
|
+
},
|
|
2359
|
+
slotVNs
|
|
2360
|
+
);
|
|
2175
2361
|
}
|
|
2176
2362
|
return renderEmptyElement($xeGantt);
|
|
2177
2363
|
};
|
|
@@ -2213,47 +2399,67 @@ var gantt_default = defineVxeComponent({
|
|
|
2213
2399
|
}
|
|
2214
2400
|
}
|
|
2215
2401
|
slotVNs.push(
|
|
2216
|
-
h(
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2402
|
+
h(
|
|
2403
|
+
VxeToolbarComponent,
|
|
2404
|
+
{
|
|
2405
|
+
ref: refToolbar,
|
|
2406
|
+
...toolbarOpts,
|
|
2407
|
+
slots: void 0
|
|
2408
|
+
},
|
|
2409
|
+
toolbarSlots
|
|
2410
|
+
)
|
|
2221
2411
|
);
|
|
2222
2412
|
}
|
|
2223
|
-
return h(
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2413
|
+
return h(
|
|
2414
|
+
"div",
|
|
2415
|
+
{
|
|
2416
|
+
ref: refToolbarWrapper,
|
|
2417
|
+
key: "toolbar",
|
|
2418
|
+
class: "vxe-gantt--toolbar-wrapper"
|
|
2419
|
+
},
|
|
2420
|
+
slotVNs
|
|
2421
|
+
);
|
|
2228
2422
|
}
|
|
2229
2423
|
return renderEmptyElement($xeGantt);
|
|
2230
2424
|
};
|
|
2231
2425
|
const renderTop = () => {
|
|
2232
2426
|
const topSlot = slots.top;
|
|
2233
2427
|
if (topSlot) {
|
|
2234
|
-
return h(
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2428
|
+
return h(
|
|
2429
|
+
"div",
|
|
2430
|
+
{
|
|
2431
|
+
ref: refTopWrapper,
|
|
2432
|
+
key: "top",
|
|
2433
|
+
class: "vxe-gantt--top-wrapper"
|
|
2434
|
+
},
|
|
2435
|
+
topSlot({ $grid: null, $gantt: $xeGantt })
|
|
2436
|
+
);
|
|
2239
2437
|
}
|
|
2240
2438
|
return renderEmptyElement($xeGantt);
|
|
2241
2439
|
};
|
|
2242
2440
|
const renderTableLeft = () => {
|
|
2243
2441
|
const leftSlot = slots.left;
|
|
2244
2442
|
if (leftSlot) {
|
|
2245
|
-
return h(
|
|
2246
|
-
|
|
2247
|
-
|
|
2443
|
+
return h(
|
|
2444
|
+
"div",
|
|
2445
|
+
{
|
|
2446
|
+
class: "vxe-gantt--left-wrapper"
|
|
2447
|
+
},
|
|
2448
|
+
leftSlot({ $grid: null, $gantt: $xeGantt })
|
|
2449
|
+
);
|
|
2248
2450
|
}
|
|
2249
2451
|
return renderEmptyElement($xeGantt);
|
|
2250
2452
|
};
|
|
2251
2453
|
const renderTableRight = () => {
|
|
2252
2454
|
const rightSlot = slots.right;
|
|
2253
2455
|
if (rightSlot) {
|
|
2254
|
-
return h(
|
|
2255
|
-
|
|
2256
|
-
|
|
2456
|
+
return h(
|
|
2457
|
+
"div",
|
|
2458
|
+
{
|
|
2459
|
+
class: "vxe-gantt--right-wrapper"
|
|
2460
|
+
},
|
|
2461
|
+
rightSlot({ $grid: null, $gantt: $xeGantt })
|
|
2462
|
+
);
|
|
2257
2463
|
}
|
|
2258
2464
|
return renderEmptyElement($xeGantt);
|
|
2259
2465
|
};
|
|
@@ -2301,24 +2507,36 @@ var gantt_default = defineVxeComponent({
|
|
|
2301
2507
|
if (footerTooltipSlot) {
|
|
2302
2508
|
slotObj.footerTooltip = footerTooltipSlot;
|
|
2303
2509
|
}
|
|
2304
|
-
return h(
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2510
|
+
return h(
|
|
2511
|
+
"div",
|
|
2512
|
+
{
|
|
2513
|
+
ref: refTableWrapper,
|
|
2514
|
+
class: "vxe-gantt--table-wrapper"
|
|
2515
|
+
},
|
|
2516
|
+
[
|
|
2517
|
+
h(
|
|
2518
|
+
VxeTableComponent2,
|
|
2519
|
+
{
|
|
2520
|
+
ref: refTable,
|
|
2521
|
+
...tableProps2,
|
|
2522
|
+
...tableOns
|
|
2523
|
+
},
|
|
2524
|
+
slotObj
|
|
2525
|
+
)
|
|
2526
|
+
]
|
|
2527
|
+
);
|
|
2314
2528
|
};
|
|
2315
2529
|
const renderBottom = () => {
|
|
2316
2530
|
if (slots.bottom) {
|
|
2317
|
-
return h(
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2531
|
+
return h(
|
|
2532
|
+
"div",
|
|
2533
|
+
{
|
|
2534
|
+
ref: refBottomWrapper,
|
|
2535
|
+
key: "bottom",
|
|
2536
|
+
class: "vxe-gantt--bottom-wrapper"
|
|
2537
|
+
},
|
|
2538
|
+
slots.bottom({ $grid: null, $gantt: $xeGantt })
|
|
2539
|
+
);
|
|
2322
2540
|
}
|
|
2323
2541
|
return renderEmptyElement($xeGantt);
|
|
2324
2542
|
};
|
|
@@ -2328,30 +2546,42 @@ var gantt_default = defineVxeComponent({
|
|
|
2328
2546
|
const pagerOpts = computePagerOpts.value;
|
|
2329
2547
|
const pagerSlot = slots.pager;
|
|
2330
2548
|
if (pagerConfig && isEnableConf(pagerOpts) || slots.pager) {
|
|
2331
|
-
return h(
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2549
|
+
return h(
|
|
2550
|
+
"div",
|
|
2551
|
+
{
|
|
2552
|
+
ref: refPagerWrapper,
|
|
2553
|
+
key: "pager",
|
|
2554
|
+
class: "vxe-gantt--pager-wrapper"
|
|
2555
|
+
},
|
|
2556
|
+
pagerSlot ? pagerSlot({ $grid: null, $gantt: $xeGantt }) : [
|
|
2557
|
+
VxeUIPagerComponent ? h(
|
|
2558
|
+
VxeUIPagerComponent,
|
|
2559
|
+
{
|
|
2560
|
+
ref: refPager,
|
|
2561
|
+
...pagerOpts,
|
|
2562
|
+
...proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {},
|
|
2563
|
+
onPageChange: pageChangeEvent
|
|
2564
|
+
},
|
|
2565
|
+
getConfigSlot(pagerOpts.slots)
|
|
2566
|
+
) : renderEmptyElement($xeGantt)
|
|
2567
|
+
]
|
|
2568
|
+
);
|
|
2343
2569
|
}
|
|
2344
2570
|
return renderEmptyElement($xeGantt);
|
|
2345
2571
|
};
|
|
2346
2572
|
const renderTaskView = () => {
|
|
2347
|
-
return h(
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2573
|
+
return h(
|
|
2574
|
+
"div",
|
|
2575
|
+
{
|
|
2576
|
+
ref: refGanttWrapper,
|
|
2577
|
+
class: "vxe-gantt--view-wrapper"
|
|
2578
|
+
},
|
|
2579
|
+
[
|
|
2580
|
+
h(GanttViewComponent, {
|
|
2581
|
+
ref: refGanttView
|
|
2582
|
+
})
|
|
2583
|
+
]
|
|
2584
|
+
);
|
|
2355
2585
|
};
|
|
2356
2586
|
const renderSplitBar = () => {
|
|
2357
2587
|
const { showLeftView, showRightView } = reactData;
|
|
@@ -2365,36 +2595,55 @@ var gantt_default = defineVxeComponent({
|
|
|
2365
2595
|
if (isResize) {
|
|
2366
2596
|
ons.onMousedown = dragSplitEvent;
|
|
2367
2597
|
}
|
|
2368
|
-
return h(
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2598
|
+
return h(
|
|
2599
|
+
"div",
|
|
2600
|
+
{
|
|
2601
|
+
class: [
|
|
2602
|
+
"vxe-gantt--view-split-bar",
|
|
2603
|
+
{
|
|
2604
|
+
"is--resize": isResize
|
|
2605
|
+
}
|
|
2606
|
+
]
|
|
2607
|
+
},
|
|
2608
|
+
[
|
|
2609
|
+
h("div", {
|
|
2610
|
+
class: "vxe-gantt--view-split-bar-handle",
|
|
2611
|
+
...ons
|
|
2612
|
+
}),
|
|
2613
|
+
showCollapseTableButton || showCollapseTaskButton ? h(
|
|
2614
|
+
"div",
|
|
2615
|
+
{
|
|
2616
|
+
class: "vxe-gantt--view-split-bar-btn-wrapper"
|
|
2617
|
+
},
|
|
2618
|
+
[
|
|
2619
|
+
showCollapseTableButton && showRightView ? h(
|
|
2620
|
+
"div",
|
|
2621
|
+
{
|
|
2622
|
+
class: ["vxe-gantt--view-split-bar-action-btn", showLeftView ? "is--prev" : "is--next"],
|
|
2623
|
+
onClick: handleSplitLeftViewEvent
|
|
2624
|
+
},
|
|
2625
|
+
[
|
|
2626
|
+
h("i", {
|
|
2627
|
+
class: showLeftView ? getIcon().GANTT_VIEW_LEFT_OPEN : getIcon().GANTT_VIEW_LEFT_CLOSE
|
|
2628
|
+
})
|
|
2629
|
+
]
|
|
2630
|
+
) : renderEmptyElement($xeGantt),
|
|
2631
|
+
showCollapseTaskButton && showLeftView ? h(
|
|
2632
|
+
"div",
|
|
2633
|
+
{
|
|
2634
|
+
class: ["vxe-gantt--view-split-bar-action-btn", showRightView ? "is--next" : "is--prev"],
|
|
2635
|
+
onClick: handleSplitRightViewEvent
|
|
2636
|
+
},
|
|
2637
|
+
[
|
|
2638
|
+
h("i", {
|
|
2639
|
+
class: showRightView ? getIcon().GANTT_VIEW_RIGHT_OPEN : getIcon().GANTT_VIEW_RIGHT_CLOSE
|
|
2640
|
+
})
|
|
2641
|
+
]
|
|
2642
|
+
) : renderEmptyElement($xeGantt)
|
|
2643
|
+
]
|
|
2644
|
+
) : renderEmptyElement($xeGantt)
|
|
2645
|
+
]
|
|
2646
|
+
);
|
|
2398
2647
|
};
|
|
2399
2648
|
const renderChildLayout = (layoutKeys) => {
|
|
2400
2649
|
const { showLeftView, showRightView } = reactData;
|
|
@@ -2419,47 +2668,64 @@ var gantt_default = defineVxeComponent({
|
|
|
2419
2668
|
break;
|
|
2420
2669
|
case "Gantt":
|
|
2421
2670
|
childVNs.push(
|
|
2422
|
-
h(
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
"
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2671
|
+
h(
|
|
2672
|
+
"div",
|
|
2673
|
+
{
|
|
2674
|
+
ref: refGanttContainerElem,
|
|
2675
|
+
key: "tv",
|
|
2676
|
+
class: [
|
|
2677
|
+
"vxe-gantt--gantt-container",
|
|
2678
|
+
`sx-pos--${scrollbarXToTop ? "top" : "bottom"}`,
|
|
2679
|
+
`sy-pos--${scrollbarYToLeft ? "left" : "right"}`,
|
|
2680
|
+
{
|
|
2681
|
+
"is--virtual-scrollbar": isVScrollbar,
|
|
2682
|
+
"ov-x--auto-hide": isVScrollbar && scrollXAutoHide,
|
|
2683
|
+
"ov-y--auto-hide": isVScrollbar && scrollYAutoHide,
|
|
2684
|
+
"show--left": showLeftView,
|
|
2685
|
+
"hide--left": !showLeftView,
|
|
2686
|
+
"show--right": showRightView,
|
|
2687
|
+
"hide--right": !showRightView,
|
|
2688
|
+
"is--ah-split-btn": autoHideCollapseButton
|
|
2689
|
+
}
|
|
2690
|
+
]
|
|
2691
|
+
},
|
|
2692
|
+
[
|
|
2693
|
+
renderTableLeft(),
|
|
2694
|
+
renderTable(),
|
|
2695
|
+
renderSplitBar(),
|
|
2696
|
+
renderTaskView(),
|
|
2697
|
+
renderTableRight(),
|
|
2448
2698
|
h("div", {
|
|
2449
|
-
|
|
2450
|
-
},
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
class: "vxe-gantt--resizable-split-
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2699
|
+
ref: refClassifyWrapperElem
|
|
2700
|
+
}),
|
|
2701
|
+
h(
|
|
2702
|
+
"div",
|
|
2703
|
+
{
|
|
2704
|
+
ref: refResizableSplitTip,
|
|
2705
|
+
class: "vxe-gantt--resizable-split-tip"
|
|
2706
|
+
},
|
|
2707
|
+
[
|
|
2708
|
+
h(
|
|
2709
|
+
"div",
|
|
2710
|
+
{
|
|
2711
|
+
class: "vxe-gantt--resizable-split-tip-number"
|
|
2712
|
+
},
|
|
2713
|
+
[
|
|
2714
|
+
h("div", {
|
|
2715
|
+
class: "vxe-gantt--resizable-split-number-left"
|
|
2716
|
+
}),
|
|
2717
|
+
h("div", {
|
|
2718
|
+
class: "vxe-gantt--resizable-split-number-right"
|
|
2719
|
+
})
|
|
2720
|
+
]
|
|
2721
|
+
)
|
|
2722
|
+
]
|
|
2723
|
+
),
|
|
2724
|
+
h("div", {
|
|
2725
|
+
class: "vxe-gantt--border-line"
|
|
2726
|
+
})
|
|
2727
|
+
]
|
|
2728
|
+
)
|
|
2463
2729
|
);
|
|
2464
2730
|
break;
|
|
2465
2731
|
case "Bottom":
|
|
@@ -2484,56 +2750,84 @@ var gantt_default = defineVxeComponent({
|
|
|
2484
2750
|
const asideRightSlot = slots.asideRight || slots["aside-right"];
|
|
2485
2751
|
const taskBarTooltipSlot = slots.taskBarTooltip || slots["task-bar-tooltip"];
|
|
2486
2752
|
return [
|
|
2487
|
-
h(
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
class: "vxe-gantt--layout-body-
|
|
2498
|
-
},
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2753
|
+
h(
|
|
2754
|
+
"div",
|
|
2755
|
+
{
|
|
2756
|
+
class: "vxe-gantt--layout-header-wrapper"
|
|
2757
|
+
},
|
|
2758
|
+
renderChildLayout(headKeys)
|
|
2759
|
+
),
|
|
2760
|
+
h(
|
|
2761
|
+
"div",
|
|
2762
|
+
{
|
|
2763
|
+
class: "vxe-gantt--layout-body-wrapper"
|
|
2764
|
+
},
|
|
2765
|
+
[
|
|
2766
|
+
asideLeftSlot ? h(
|
|
2767
|
+
"div",
|
|
2768
|
+
{
|
|
2769
|
+
class: "vxe-gantt--layout-aside-left-wrapper"
|
|
2770
|
+
},
|
|
2771
|
+
asideLeftSlot({})
|
|
2772
|
+
) : renderEmptyElement($xeGantt),
|
|
2773
|
+
h(
|
|
2774
|
+
"div",
|
|
2775
|
+
{
|
|
2776
|
+
class: "vxe-gantt--layout-body-content-wrapper"
|
|
2777
|
+
},
|
|
2778
|
+
renderChildLayout(bodyKeys)
|
|
2779
|
+
),
|
|
2780
|
+
asideRightSlot ? h(
|
|
2781
|
+
"div",
|
|
2782
|
+
{
|
|
2783
|
+
class: "vxe-gantt--layout-aside-right-wrapper"
|
|
2784
|
+
},
|
|
2785
|
+
asideRightSlot({})
|
|
2786
|
+
) : renderEmptyElement($xeGantt)
|
|
2787
|
+
]
|
|
2788
|
+
),
|
|
2789
|
+
h(
|
|
2790
|
+
"div",
|
|
2791
|
+
{
|
|
2792
|
+
class: "vxe-gantt--layout-footer-wrapper"
|
|
2793
|
+
},
|
|
2794
|
+
renderChildLayout(footKeys)
|
|
2795
|
+
),
|
|
2506
2796
|
h("div", {
|
|
2507
2797
|
ref: refPopupContainerElem
|
|
2508
2798
|
}),
|
|
2509
2799
|
h("div", {}, [
|
|
2510
2800
|
/**
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
h(
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2801
|
+
* 任务条提示
|
|
2802
|
+
*/
|
|
2803
|
+
h(
|
|
2804
|
+
VxeUITooltipComponent,
|
|
2805
|
+
{
|
|
2806
|
+
key: "gtp",
|
|
2807
|
+
ref: refTooltip,
|
|
2808
|
+
theme: taskBarTooltipOpts.theme,
|
|
2809
|
+
enterable: taskBarTooltipOpts.enterable,
|
|
2810
|
+
enterDelay: taskBarTooltipOpts.enterDelay,
|
|
2811
|
+
leaveDelay: taskBarTooltipOpts.leaveDelay,
|
|
2812
|
+
useHtml: XEUtils.isBoolean(taskBarTooltipOpts.useHtml) ? taskBarTooltipOpts.useHtml : taskBarTooltipOpts.useHTML,
|
|
2813
|
+
width: taskBarTooltipOpts.width,
|
|
2814
|
+
height: taskBarTooltipOpts.height,
|
|
2815
|
+
minWidth: taskBarTooltipOpts.minWidth,
|
|
2816
|
+
minHeight: taskBarTooltipOpts.minHeight,
|
|
2817
|
+
maxWidth: taskBarTooltipOpts.maxWidth,
|
|
2818
|
+
maxHeight: taskBarTooltipOpts.maxHeight,
|
|
2819
|
+
isArrow: false
|
|
2820
|
+
},
|
|
2821
|
+
taskBarTooltipSlot ? {
|
|
2822
|
+
content: () => {
|
|
2823
|
+
const { row, content: tooltipContent } = barTipStore;
|
|
2824
|
+
if (row) {
|
|
2825
|
+
return h("div", {}, taskBarTooltipSlot(Object.assign({ tooltipContent, $gantt: $xeGantt }, barTipStore.params)));
|
|
2826
|
+
}
|
|
2827
|
+
return renderEmptyElement($xeGantt);
|
|
2533
2828
|
}
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
} : {})
|
|
2829
|
+
} : {}
|
|
2830
|
+
)
|
|
2537
2831
|
])
|
|
2538
2832
|
];
|
|
2539
2833
|
};
|
|
@@ -2547,39 +2841,58 @@ var gantt_default = defineVxeComponent({
|
|
|
2547
2841
|
const tableBorder = computeTableBorder.value;
|
|
2548
2842
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
2549
2843
|
const scrollbarYToLeft = computeScrollbarYToLeft.value;
|
|
2550
|
-
return h(
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2844
|
+
return h(
|
|
2845
|
+
"div",
|
|
2846
|
+
{
|
|
2847
|
+
ref: refElem,
|
|
2848
|
+
class: [
|
|
2849
|
+
"vxe-gantt",
|
|
2850
|
+
`border--${tableBorder}`,
|
|
2851
|
+
`sx-pos--${scrollbarXToTop ? "top" : "bottom"}`,
|
|
2852
|
+
`sy-pos--${scrollbarYToLeft ? "left" : "right"}`,
|
|
2853
|
+
{
|
|
2854
|
+
[`size--${vSize}`]: vSize,
|
|
2855
|
+
"is--virtual-scrollbar": isVScrollbar,
|
|
2856
|
+
"is--round": props.round,
|
|
2857
|
+
"show--animat": taskSplitOpts.animation,
|
|
2858
|
+
"is--maximize": reactData.isZMax,
|
|
2859
|
+
"is--loading": isLoading,
|
|
2860
|
+
"is--animat": showSplitAnimat,
|
|
2861
|
+
"show--left": showLeftView,
|
|
2862
|
+
"hide--left": !showLeftView,
|
|
2863
|
+
"show--right": showRightView,
|
|
2864
|
+
"hide--right": !showRightView,
|
|
2865
|
+
"is--scroll-y": overflowY,
|
|
2866
|
+
"is--scroll-x": overflowX
|
|
2867
|
+
}
|
|
2868
|
+
],
|
|
2869
|
+
style: wrapperStyle
|
|
2870
|
+
},
|
|
2871
|
+
renderLayout()
|
|
2872
|
+
);
|
|
2569
2873
|
};
|
|
2570
2874
|
const columnFlag = ref(0);
|
|
2571
|
-
watch(
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2875
|
+
watch(
|
|
2876
|
+
() => props.columns ? props.columns.length : -1,
|
|
2877
|
+
() => {
|
|
2878
|
+
columnFlag.value++;
|
|
2879
|
+
}
|
|
2880
|
+
);
|
|
2881
|
+
watch(
|
|
2882
|
+
() => props.columns,
|
|
2883
|
+
() => {
|
|
2884
|
+
columnFlag.value++;
|
|
2885
|
+
}
|
|
2886
|
+
);
|
|
2577
2887
|
watch(columnFlag, () => {
|
|
2578
2888
|
nextTick(() => $xeGantt.loadColumn(props.columns || []));
|
|
2579
2889
|
});
|
|
2580
|
-
watch(
|
|
2581
|
-
|
|
2582
|
-
|
|
2890
|
+
watch(
|
|
2891
|
+
() => props.toolbarConfig,
|
|
2892
|
+
() => {
|
|
2893
|
+
initToolbar();
|
|
2894
|
+
}
|
|
2895
|
+
);
|
|
2583
2896
|
watch(computeCustomCurrentPageFlag, () => {
|
|
2584
2897
|
initPages("currentPage");
|
|
2585
2898
|
});
|
|
@@ -2589,9 +2902,12 @@ var gantt_default = defineVxeComponent({
|
|
|
2589
2902
|
watch(computeCustomTotalFlag, () => {
|
|
2590
2903
|
initPages("total");
|
|
2591
2904
|
});
|
|
2592
|
-
watch(
|
|
2593
|
-
|
|
2594
|
-
|
|
2905
|
+
watch(
|
|
2906
|
+
() => props.proxyConfig,
|
|
2907
|
+
() => {
|
|
2908
|
+
initProxy();
|
|
2909
|
+
}
|
|
2910
|
+
);
|
|
2595
2911
|
const reViewFlag = ref(0);
|
|
2596
2912
|
watch(computeTaskViewScales, () => {
|
|
2597
2913
|
handleTaskScaleConfig();
|