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
@@ -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 = ["clearAll", "syncData", "updateData", "loadData", "reloadData", "reloadRow", "loadColumn", "reloadColumn", "getRowNode", "getColumnNode", "getRowIndex", "getVTRowIndex", "getVMRowIndex", "getColumnIndex", "getVTColumnIndex", "getVMColumnIndex", "setRow", "createData", "createRow", "revertData", "clearData", "isRemoveByRow", "isInsertByRow", "isUpdateByRow", "getColumns", "getColumnById", "getColumnByField", "getTableColumn", "getFullColumns", "getData", "getCheckboxRecords", "getParentRow", "getTreeRowChildren", "getTreeRowLevel", "getTreeParentRow", "getRowSeq", "getRowById", "getRowid", "getTableData", "getFullData", "setColumnFixed", "clearColumnFixed", "setColumnWidth", "getColumnWidth", "recalcRowHeight", "setRowHeightConf", "getRowHeightConf", "setRowHeight", "getRowHeight", "hideColumn", "showColumn", "resetColumn", "refreshColumn", "refreshScroll", "recalculate", "closeTooltip", "isAllCheckboxChecked", "isAllCheckboxIndeterminate", "getCheckboxIndeterminateRecords", "setCheckboxRow", "setCheckboxRowKey", "isCheckedByCheckboxRow", "isCheckedByCheckboxRowKey", "isIndeterminateByCheckboxRow", "isIndeterminateByCheckboxRowKey", "toggleCheckboxRow", "setAllCheckboxRow", "getRadioReserveRecord", "clearRadioReserve", "getCheckboxReserveRecords", "clearCheckboxReserve", "toggleAllCheckboxRow", "clearCheckboxRow", "setCurrentRow", "isCheckedByRadioRow", "isCheckedByRadioRowKey", "setRadioRow", "setRadioRowKey", "clearCurrentRow", "clearRadioRow", "getCurrentRecord", "getRadioRecord", "getCurrentColumn", "setCurrentColumn", "clearCurrentColumn", "setPendingRow", "togglePendingRow", "hasPendingByRow", "isPendingByRow", "getPendingRecords", "clearPendingRow", "setFilterByEvent", "sort", "setSort", "setSortByEvent", "clearSort", "clearSortByEvent", "isSort", "getSortColumns", "closeFilter", "isFilter", "clearFilterByEvent", "isActiveFilterByColumn", "isRowExpandLoaded", "clearRowExpandLoaded", "reloadRowExpand", "reloadRowExpand", "toggleRowExpand", "setAllRowExpand", "setRowExpand", "isExpandByRow", "isRowExpandByRow", "clearRowExpand", "clearRowExpandReserve", "getRowExpandRecords", "getTreeExpandRecords", "isTreeExpandLoaded", "clearTreeExpandLoaded", "reloadTreeExpand", "reloadTreeChilds", "toggleTreeExpand", "setAllTreeExpand", "setTreeExpand", "isTreeExpandByRow", "clearTreeExpand", "clearTreeExpandReserve", "getScroll", "scrollTo", "scrollToStartRow", "scrollToEndRow", "scrollToRow", "scrollToStartColumn", "scrollToEndColumn", "scrollToColumn", "clearScroll", "updateFooter", "updateStatus", "setMergeCells", "removeInsertRow", "removeMergeCells", "getMergeCells", "clearMergeCells", "setMergeFooterItems", "removeMergeFooterItems", "getMergeFooterItems", "clearMergeFooterItems", "getCustomStoreData", "setRowGroupExpand", "setRowGroupExpandByField", "setAllRowGroupExpand", "clearRowGroupExpand", "isRowGroupExpandByRow", "isRowGroupRecord", "isAggregateRecord", "isAggregateExpandByRow", "getAggregateContentByRow", "getAggregateRowChildren", "setRowGroups", "clearRowGroups", "openTooltip", "moveColumnTo", "moveRowTo", "getCellLabel", "undo", "redo", "getCellElement", "focus", "blur", "connect"];
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(formConfig && isEnableConf(formOpts) && items ? items : [], (item) => {
1600
- itemList.push(item);
1601
- }, { children: "children" });
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(evnt, Object.assign({
1956
- $table: $xeTable,
1957
- rowIndex: $xeTable.getRowIndex(row),
1958
- $rowIndex: $xeTable.getVMRowIndex(row)
1959
- }, params));
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(VxeUIFormComponent, {
2157
- ref: refForm,
2158
- ...Object.assign({}, formOpts, {
2159
- data: proxyConfig && isEnableConf(proxyOpts) && proxyOpts.form ? formData : formOpts.data
2160
- }),
2161
- onSubmit: submitFormEvent,
2162
- onReset: resetFormEvent,
2163
- onSubmitInvalid: submitInvalidEvent,
2164
- onCollapse: collapseEvent
2165
- }, formSlots)
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("div", {
2171
- ref: refFormWrapper,
2172
- key: "form",
2173
- class: "vxe-gantt--form-wrapper"
2174
- }, slotVNs);
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(VxeToolbarComponent, {
2217
- ref: refToolbar,
2218
- ...toolbarOpts,
2219
- slots: void 0
2220
- }, toolbarSlots)
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("div", {
2224
- ref: refToolbarWrapper,
2225
- key: "toolbar",
2226
- class: "vxe-gantt--toolbar-wrapper"
2227
- }, slotVNs);
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("div", {
2235
- ref: refTopWrapper,
2236
- key: "top",
2237
- class: "vxe-gantt--top-wrapper"
2238
- }, topSlot({ $grid: null, $gantt: $xeGantt }));
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("div", {
2246
- class: "vxe-gantt--left-wrapper"
2247
- }, leftSlot({ $grid: null, $gantt: $xeGantt }));
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("div", {
2255
- class: "vxe-gantt--right-wrapper"
2256
- }, rightSlot({ $grid: null, $gantt: $xeGantt }));
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("div", {
2305
- ref: refTableWrapper,
2306
- class: "vxe-gantt--table-wrapper"
2307
- }, [
2308
- h(VxeTableComponent2, {
2309
- ref: refTable,
2310
- ...tableProps2,
2311
- ...tableOns
2312
- }, slotObj)
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("div", {
2318
- ref: refBottomWrapper,
2319
- key: "bottom",
2320
- class: "vxe-gantt--bottom-wrapper"
2321
- }, slots.bottom({ $grid: null, $gantt: $xeGantt }));
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("div", {
2332
- ref: refPagerWrapper,
2333
- key: "pager",
2334
- class: "vxe-gantt--pager-wrapper"
2335
- }, pagerSlot ? pagerSlot({ $grid: null, $gantt: $xeGantt }) : [
2336
- VxeUIPagerComponent ? h(VxeUIPagerComponent, {
2337
- ref: refPager,
2338
- ...pagerOpts,
2339
- ...proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {},
2340
- onPageChange: pageChangeEvent
2341
- }, getConfigSlot(pagerOpts.slots)) : renderEmptyElement($xeGantt)
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("div", {
2348
- ref: refGanttWrapper,
2349
- class: "vxe-gantt--view-wrapper"
2350
- }, [
2351
- h(GanttViewComponent, {
2352
- ref: refGanttView
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("div", {
2369
- class: ["vxe-gantt--view-split-bar", {
2370
- "is--resize": isResize
2371
- }]
2372
- }, [
2373
- h("div", {
2374
- class: "vxe-gantt--view-split-bar-handle",
2375
- ...ons
2376
- }),
2377
- showCollapseTableButton || showCollapseTaskButton ? h("div", {
2378
- class: "vxe-gantt--view-split-bar-btn-wrapper"
2379
- }, [
2380
- showCollapseTableButton && showRightView ? h("div", {
2381
- class: ["vxe-gantt--view-split-bar-action-btn", showLeftView ? "is--prev" : "is--next"],
2382
- onClick: handleSplitLeftViewEvent
2383
- }, [
2384
- h("i", {
2385
- class: showLeftView ? getIcon().GANTT_VIEW_LEFT_OPEN : getIcon().GANTT_VIEW_LEFT_CLOSE
2386
- })
2387
- ]) : renderEmptyElement($xeGantt),
2388
- showCollapseTaskButton && showLeftView ? h("div", {
2389
- class: ["vxe-gantt--view-split-bar-action-btn", showRightView ? "is--next" : "is--prev"],
2390
- onClick: handleSplitRightViewEvent
2391
- }, [
2392
- h("i", {
2393
- class: showRightView ? getIcon().GANTT_VIEW_RIGHT_OPEN : getIcon().GANTT_VIEW_RIGHT_CLOSE
2394
- })
2395
- ]) : renderEmptyElement($xeGantt)
2396
- ]) : renderEmptyElement($xeGantt)
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("div", {
2423
- ref: refGanttContainerElem,
2424
- key: "tv",
2425
- class: ["vxe-gantt--gantt-container", `sx-pos--${scrollbarXToTop ? "top" : "bottom"}`, `sy-pos--${scrollbarYToLeft ? "left" : "right"}`, {
2426
- "is--virtual-scrollbar": isVScrollbar,
2427
- "ov-x--auto-hide": isVScrollbar && scrollXAutoHide,
2428
- "ov-y--auto-hide": isVScrollbar && scrollYAutoHide,
2429
- "show--left": showLeftView,
2430
- "hide--left": !showLeftView,
2431
- "show--right": showRightView,
2432
- "hide--right": !showRightView,
2433
- "is--ah-split-btn": autoHideCollapseButton
2434
- }]
2435
- }, [
2436
- renderTableLeft(),
2437
- renderTable(),
2438
- renderSplitBar(),
2439
- renderTaskView(),
2440
- renderTableRight(),
2441
- h("div", {
2442
- ref: refClassifyWrapperElem
2443
- }),
2444
- h("div", {
2445
- ref: refResizableSplitTip,
2446
- class: "vxe-gantt--resizable-split-tip"
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
- class: "vxe-gantt--resizable-split-tip-number"
2450
- }, [
2451
- h("div", {
2452
- class: "vxe-gantt--resizable-split-number-left"
2453
- }),
2454
- h("div", {
2455
- class: "vxe-gantt--resizable-split-number-right"
2456
- })
2457
- ])
2458
- ]),
2459
- h("div", {
2460
- class: "vxe-gantt--border-line"
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("div", {
2488
- class: "vxe-gantt--layout-header-wrapper"
2489
- }, renderChildLayout(headKeys)),
2490
- h("div", {
2491
- class: "vxe-gantt--layout-body-wrapper"
2492
- }, [
2493
- asideLeftSlot ? h("div", {
2494
- class: "vxe-gantt--layout-aside-left-wrapper"
2495
- }, asideLeftSlot({})) : renderEmptyElement($xeGantt),
2496
- h("div", {
2497
- class: "vxe-gantt--layout-body-content-wrapper"
2498
- }, renderChildLayout(bodyKeys)),
2499
- asideRightSlot ? h("div", {
2500
- class: "vxe-gantt--layout-aside-right-wrapper"
2501
- }, asideRightSlot({})) : renderEmptyElement($xeGantt)
2502
- ]),
2503
- h("div", {
2504
- class: "vxe-gantt--layout-footer-wrapper"
2505
- }, renderChildLayout(footKeys)),
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(VxeUITooltipComponent, {
2514
- key: "gtp",
2515
- ref: refTooltip,
2516
- theme: taskBarTooltipOpts.theme,
2517
- enterable: taskBarTooltipOpts.enterable,
2518
- enterDelay: taskBarTooltipOpts.enterDelay,
2519
- leaveDelay: taskBarTooltipOpts.leaveDelay,
2520
- useHtml: XEUtils.isBoolean(taskBarTooltipOpts.useHtml) ? taskBarTooltipOpts.useHtml : taskBarTooltipOpts.useHTML,
2521
- width: taskBarTooltipOpts.width,
2522
- height: taskBarTooltipOpts.height,
2523
- minWidth: taskBarTooltipOpts.minWidth,
2524
- minHeight: taskBarTooltipOpts.minHeight,
2525
- maxWidth: taskBarTooltipOpts.maxWidth,
2526
- maxHeight: taskBarTooltipOpts.maxHeight,
2527
- isArrow: false
2528
- }, taskBarTooltipSlot ? {
2529
- content: () => {
2530
- const { row, content: tooltipContent } = barTipStore;
2531
- if (row) {
2532
- return h("div", {}, taskBarTooltipSlot(Object.assign({ tooltipContent, $gantt: $xeGantt }, barTipStore.params)));
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
- return renderEmptyElement($xeGantt);
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("div", {
2551
- ref: refElem,
2552
- class: ["vxe-gantt", `border--${tableBorder}`, `sx-pos--${scrollbarXToTop ? "top" : "bottom"}`, `sy-pos--${scrollbarYToLeft ? "left" : "right"}`, {
2553
- [`size--${vSize}`]: vSize,
2554
- "is--virtual-scrollbar": isVScrollbar,
2555
- "is--round": props.round,
2556
- "show--animat": taskSplitOpts.animation,
2557
- "is--maximize": reactData.isZMax,
2558
- "is--loading": isLoading,
2559
- "is--animat": showSplitAnimat,
2560
- "show--left": showLeftView,
2561
- "hide--left": !showLeftView,
2562
- "show--right": showRightView,
2563
- "hide--right": !showRightView,
2564
- "is--scroll-y": overflowY,
2565
- "is--scroll-x": overflowX
2566
- }],
2567
- style: wrapperStyle
2568
- }, renderLayout());
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(() => props.columns ? props.columns.length : -1, () => {
2572
- columnFlag.value++;
2573
- });
2574
- watch(() => props.columns, () => {
2575
- columnFlag.value++;
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(() => props.toolbarConfig, () => {
2581
- initToolbar();
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(() => props.proxyConfig, () => {
2593
- initProxy();
2594
- });
2905
+ watch(
2906
+ () => props.proxyConfig,
2907
+ () => {
2908
+ initProxy();
2909
+ }
2910
+ );
2595
2911
  const reViewFlag = ref(0);
2596
2912
  watch(computeTaskViewScales, () => {
2597
2913
  handleTaskScaleConfig();