vxe-table 4.15.5 → 4.15.6
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/README.md +6 -4
- package/es/grid/src/emits.js +16 -0
- package/es/grid/src/grid.js +77 -62
- package/es/grid/src/props.js +7 -0
- package/es/style.css +1 -1
- package/es/table/index.js +0 -8
- package/es/table/module/custom/hook.js +3 -0
- package/es/table/module/edit/hook.js +3 -0
- package/es/table/module/export/hook.js +6 -1
- package/es/table/module/filter/hook.js +3 -0
- package/es/table/module/menu/hook.js +3 -0
- package/es/table/module/validator/hook.js +3 -0
- package/es/table/src/emits.js +1 -1
- package/es/table/src/props.js +1 -1
- package/es/table/src/table.js +119 -43
- package/es/table/src/util.js +0 -4
- package/es/toolbar/src/toolbar.js +2 -2
- package/es/ui/index.js +13 -4
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/emits.js +8 -0
- package/lib/grid/src/emits.min.js +1 -0
- package/lib/grid/src/grid.js +78 -54
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/src/props.js +24 -0
- package/lib/grid/src/props.min.js +1 -0
- package/lib/index.umd.js +12069 -11995
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/index.js +0 -8
- package/lib/table/index.min.js +1 -1
- package/lib/table/module/custom/hook.js +3 -0
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/edit/hook.js +3 -0
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +8 -1
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/filter/hook.js +3 -0
- package/lib/table/module/filter/hook.min.js +1 -1
- package/lib/table/module/menu/hook.js +3 -0
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/module/validator/hook.js +3 -0
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/src/emits.js +2 -2
- package/lib/table/src/emits.min.js +1 -1
- package/lib/table/src/props.js +2 -2
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +29 -22
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +0 -4
- package/lib/table/src/util.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +2 -0
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +12 -3
- 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 +1 -1
- package/packages/grid/src/emits.ts +19 -0
- package/packages/grid/src/grid.ts +89 -85
- package/packages/grid/src/props.ts +23 -0
- package/packages/table/index.ts +0 -8
- package/packages/table/module/custom/hook.ts +3 -0
- package/packages/table/module/edit/hook.ts +3 -0
- package/packages/table/module/export/hook.ts +8 -3
- package/packages/table/module/filter/hook.ts +3 -0
- package/packages/table/module/menu/hook.ts +3 -0
- package/packages/table/module/validator/hook.ts +3 -0
- package/packages/table/src/emits.ts +2 -2
- package/packages/table/src/props.ts +1 -1
- package/packages/table/src/table.ts +125 -45
- package/packages/table/src/util.ts +0 -4
- package/packages/toolbar/src/toolbar.ts +2 -2
- package/packages/ui/index.ts +12 -2
- package/packages/ui/src/dom.ts +1 -1
- /package/es/{iconfont.1754615009926.ttf → iconfont.1754905357789.ttf} +0 -0
- /package/es/{iconfont.1754615009926.woff → iconfont.1754905357789.woff} +0 -0
- /package/es/{iconfont.1754615009926.woff2 → iconfont.1754905357789.woff2} +0 -0
- /package/lib/{iconfont.1754615009926.ttf → iconfont.1754905357789.ttf} +0 -0
- /package/lib/{iconfont.1754615009926.woff → iconfont.1754905357789.woff} +0 -0
- /package/lib/{iconfont.1754615009926.woff2 → iconfont.1754905357789.woff2} +0 -0
|
@@ -256,6 +256,7 @@ hooks.add('tableExportModule', {
|
|
|
256
256
|
const { props, reactData, internalData } = $xeTable;
|
|
257
257
|
const { computeTreeOpts, computePrintOpts, computeExportOpts, computeImportOpts, computeCustomOpts, computeSeqOpts, computeRadioOpts, computeCheckboxOpts, computeColumnOpts } = $xeTable.getComputeMaps();
|
|
258
258
|
const $xeGrid = inject('$xeGrid', null);
|
|
259
|
+
const $xeGantt = inject('$xeGantt', null);
|
|
259
260
|
const hasTreeChildren = (row) => {
|
|
260
261
|
const treeOpts = computeTreeOpts.value;
|
|
261
262
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
@@ -1297,6 +1298,7 @@ hooks.add('tableExportModule', {
|
|
|
1297
1298
|
const params = {
|
|
1298
1299
|
$table: $xeTable,
|
|
1299
1300
|
$grid: $xeGrid,
|
|
1301
|
+
$gantt: $xeGantt,
|
|
1300
1302
|
sort: sortData.length ? sortData[0] : {},
|
|
1301
1303
|
sorts: sortData,
|
|
1302
1304
|
filters: gridReactData.filterData,
|
|
@@ -1306,7 +1308,7 @@ hooks.add('tableExportModule', {
|
|
|
1306
1308
|
return Promise.resolve((beforeQueryAll || ajaxMethods)(params))
|
|
1307
1309
|
.then(rest => {
|
|
1308
1310
|
const listProp = resConfigs.list;
|
|
1309
|
-
handleOptions.data = (listProp ? (XEUtils.isFunction(listProp) ? listProp({ data: rest, $grid: $xeGrid }) : XEUtils.get(rest, listProp)) : rest) || [];
|
|
1311
|
+
handleOptions.data = (listProp ? (XEUtils.isFunction(listProp) ? listProp({ data: rest, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }) : XEUtils.get(rest, listProp)) : rest) || [];
|
|
1310
1312
|
if (afterQueryAll) {
|
|
1311
1313
|
afterQueryAll(params);
|
|
1312
1314
|
}
|
|
@@ -1550,5 +1552,8 @@ hooks.add('tableExportModule', {
|
|
|
1550
1552
|
},
|
|
1551
1553
|
setupGrid($xeGrid) {
|
|
1552
1554
|
return $xeGrid.extendTableMethods(tableExportMethodKeys);
|
|
1555
|
+
},
|
|
1556
|
+
setupGantt($xeGantt) {
|
|
1557
|
+
return $xeGantt.extendTableMethods(tableExportMethodKeys);
|
|
1553
1558
|
}
|
|
1554
1559
|
});
|
package/es/table/src/emits.js
CHANGED
package/es/table/src/props.js
CHANGED
package/es/table/src/table.js
CHANGED
|
@@ -12,13 +12,21 @@ import Cell from './cell';
|
|
|
12
12
|
import TableBodyComponent from './body';
|
|
13
13
|
import TableHeaderComponent from './header';
|
|
14
14
|
import TableFooterComponent from './footer';
|
|
15
|
-
import tableProps from './props';
|
|
16
|
-
import tableEmits from './emits';
|
|
15
|
+
import { tableProps } from './props';
|
|
16
|
+
import { tableEmits } from './emits';
|
|
17
17
|
import TableCustomPanelComponent from '../module/custom/panel';
|
|
18
18
|
import TableFilterPanelComponent from '../module/filter/panel';
|
|
19
19
|
import TableImportPanelComponent from '../module/export/import-panel';
|
|
20
20
|
import TableExportPanelComponent from '../module/export/export-panel';
|
|
21
21
|
import TableMenuPanelComponent from '../module/menu/panel';
|
|
22
|
+
import '../module/filter/hook';
|
|
23
|
+
import '../module/menu/hook';
|
|
24
|
+
import '../module/edit/hook';
|
|
25
|
+
import '../module/export/hook';
|
|
26
|
+
import '../module/keyboard/hook';
|
|
27
|
+
import '../module/validator/hook';
|
|
28
|
+
import '../module/custom/hook';
|
|
29
|
+
import '../render';
|
|
22
30
|
const { getConfig, getIcon, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, useFns, renderEmptyElement } = VxeUI;
|
|
23
31
|
const supportMaxRow = 5e6;
|
|
24
32
|
const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
@@ -62,6 +70,12 @@ export default defineVxeComponent({
|
|
|
62
70
|
lastScrollTime: 0,
|
|
63
71
|
// 行高
|
|
64
72
|
rowHeight: 0,
|
|
73
|
+
// 表头高度
|
|
74
|
+
tHeaderHeight: 0,
|
|
75
|
+
// 表体高度
|
|
76
|
+
tBodyHeight: 0,
|
|
77
|
+
// 表尾高度
|
|
78
|
+
tFooterHeight: 0,
|
|
65
79
|
// 表格父容器的高度
|
|
66
80
|
parentHeight: 0,
|
|
67
81
|
// 是否使用分组表头
|
|
@@ -319,6 +333,7 @@ export default defineVxeComponent({
|
|
|
319
333
|
const refScrollXSpaceElem = ref();
|
|
320
334
|
const refScrollYSpaceElem = ref();
|
|
321
335
|
const $xeGrid = inject('$xeGrid', null);
|
|
336
|
+
const $xeGantt = inject('$xeGantt', null);
|
|
322
337
|
let $xeToolbar;
|
|
323
338
|
const computeTableId = computed(() => {
|
|
324
339
|
const { id } = props;
|
|
@@ -797,6 +812,8 @@ export default defineVxeComponent({
|
|
|
797
812
|
getRefMaps: () => refMaps,
|
|
798
813
|
getComputeMaps: () => computeMaps,
|
|
799
814
|
xeGrid: $xeGrid,
|
|
815
|
+
xeGantt: $xeGantt,
|
|
816
|
+
// 已废弃
|
|
800
817
|
xegrid: $xeGrid
|
|
801
818
|
};
|
|
802
819
|
const eqCellValue = (row1, row2, field) => {
|
|
@@ -2140,14 +2157,15 @@ export default defineVxeComponent({
|
|
|
2140
2157
|
};
|
|
2141
2158
|
const updateStyle = () => {
|
|
2142
2159
|
const { showHeaderOverflow: allColumnHeaderOverflow, showFooterOverflow: allColumnFooterOverflow, mouseConfig, spanMethod, footerSpanMethod } = props;
|
|
2143
|
-
const { isGroup, currentRow, tableColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isAllOverflow, expandColumn, isColLoading } = reactData;
|
|
2144
|
-
const { visibleColumn, tableHeight,
|
|
2160
|
+
const { isGroup, currentRow, tableColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, overflowY, scrollbarHeight, scrollXWidth, columnStore, editStore, isAllOverflow, expandColumn, isColLoading, tHeaderHeight, tFooterHeight } = reactData;
|
|
2161
|
+
const { visibleColumn, tableHeight, elemStore, customHeight, customMinHeight, customMaxHeight } = internalData;
|
|
2162
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
2145
2163
|
const el = refElem.value;
|
|
2146
|
-
if (!el) {
|
|
2164
|
+
if (!el || !el.clientHeight) {
|
|
2147
2165
|
return;
|
|
2148
2166
|
}
|
|
2149
2167
|
const containerList = ['main', 'left', 'right'];
|
|
2150
|
-
|
|
2168
|
+
let osbWidth = overflowY ? scrollbarWidth : 0;
|
|
2151
2169
|
const osbHeight = overflowX ? scrollbarHeight : 0;
|
|
2152
2170
|
const emptyPlaceholderElem = refEmptyPlaceholder.value;
|
|
2153
2171
|
const mouseOpts = computeMouseOpts.value;
|
|
@@ -2155,36 +2173,45 @@ export default defineVxeComponent({
|
|
|
2155
2173
|
const bodyWrapperElem = getRefElem(elemStore['main-body-wrapper']);
|
|
2156
2174
|
const bodyTableElem = getRefElem(elemStore['main-body-table']);
|
|
2157
2175
|
if (emptyPlaceholderElem) {
|
|
2158
|
-
emptyPlaceholderElem.style.top = `${
|
|
2176
|
+
emptyPlaceholderElem.style.top = `${tHeaderHeight}px`;
|
|
2159
2177
|
emptyPlaceholderElem.style.height = bodyWrapperElem ? `${bodyWrapperElem.offsetHeight - osbHeight}px` : '';
|
|
2160
2178
|
}
|
|
2161
|
-
|
|
2179
|
+
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
2180
|
+
const scrollbarYToLeft = computeScrollbarYToLeft.value;
|
|
2181
|
+
const xScrollbarVisible = overflowX ? 'visible' : 'hidden';
|
|
2182
|
+
let yScrollbarVisible = overflowY ? 'visible' : 'hidden';
|
|
2183
|
+
if ($xeGanttView) {
|
|
2184
|
+
if (!scrollbarYToLeft) {
|
|
2185
|
+
osbWidth = 0;
|
|
2186
|
+
yScrollbarVisible = 'hidden';
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
let tbHeight = 0;
|
|
2162
2190
|
let bodyMaxHeight = 0;
|
|
2163
|
-
const bodyMinHeight = customMinHeight -
|
|
2191
|
+
const bodyMinHeight = customMinHeight - tHeaderHeight - tFooterHeight - osbHeight;
|
|
2164
2192
|
if (customMaxHeight) {
|
|
2165
|
-
bodyMaxHeight = Math.max(bodyMinHeight, customMaxHeight -
|
|
2193
|
+
bodyMaxHeight = Math.max(bodyMinHeight, customMaxHeight - tHeaderHeight - tFooterHeight - osbHeight);
|
|
2166
2194
|
}
|
|
2167
2195
|
if (customHeight) {
|
|
2168
|
-
|
|
2196
|
+
tbHeight = customHeight - tHeaderHeight - tFooterHeight - osbHeight;
|
|
2169
2197
|
}
|
|
2170
|
-
if (!
|
|
2198
|
+
if (!tbHeight) {
|
|
2171
2199
|
if (bodyTableElem) {
|
|
2172
|
-
|
|
2200
|
+
tbHeight = bodyTableElem.clientHeight;
|
|
2173
2201
|
}
|
|
2174
2202
|
}
|
|
2175
|
-
if (
|
|
2203
|
+
if (tbHeight) {
|
|
2176
2204
|
if (bodyMaxHeight) {
|
|
2177
|
-
|
|
2205
|
+
tbHeight = Math.min(bodyMaxHeight, tbHeight);
|
|
2178
2206
|
}
|
|
2179
|
-
|
|
2207
|
+
tbHeight = Math.max(bodyMinHeight, tbHeight);
|
|
2180
2208
|
}
|
|
2181
|
-
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
2182
2209
|
const xLeftCornerEl = refScrollXLeftCornerElem.value;
|
|
2183
2210
|
const xRightCornerEl = refScrollXRightCornerElem.value;
|
|
2184
2211
|
const scrollXVirtualEl = refScrollXVirtualElem.value;
|
|
2185
2212
|
if (scrollXVirtualEl) {
|
|
2186
2213
|
scrollXVirtualEl.style.height = `${osbHeight}px`;
|
|
2187
|
-
scrollXVirtualEl.style.visibility =
|
|
2214
|
+
scrollXVirtualEl.style.visibility = xScrollbarVisible;
|
|
2188
2215
|
}
|
|
2189
2216
|
const xWrapperEl = refScrollXWrapperElem.value;
|
|
2190
2217
|
if (xWrapperEl) {
|
|
@@ -2202,30 +2229,31 @@ export default defineVxeComponent({
|
|
|
2202
2229
|
const scrollYVirtualEl = refScrollYVirtualElem.value;
|
|
2203
2230
|
if (scrollYVirtualEl) {
|
|
2204
2231
|
scrollYVirtualEl.style.width = `${osbWidth}px`;
|
|
2205
|
-
scrollYVirtualEl.style.height = `${
|
|
2206
|
-
scrollYVirtualEl.style.visibility =
|
|
2232
|
+
scrollYVirtualEl.style.height = `${tbHeight + tHeaderHeight + tFooterHeight}px`;
|
|
2233
|
+
scrollYVirtualEl.style.visibility = yScrollbarVisible;
|
|
2207
2234
|
}
|
|
2208
2235
|
const yTopCornerEl = refScrollYTopCornerElem.value;
|
|
2209
2236
|
if (yTopCornerEl) {
|
|
2210
|
-
yTopCornerEl.style.height = `${
|
|
2211
|
-
yTopCornerEl.style.display = overflowY &&
|
|
2237
|
+
yTopCornerEl.style.height = `${tHeaderHeight}px`;
|
|
2238
|
+
yTopCornerEl.style.display = overflowY && tHeaderHeight ? 'block' : '';
|
|
2212
2239
|
}
|
|
2213
2240
|
const yWrapperEl = refScrollYWrapperElem.value;
|
|
2214
2241
|
if (yWrapperEl) {
|
|
2215
|
-
yWrapperEl.style.height = `${
|
|
2216
|
-
yWrapperEl.style.top = `${
|
|
2242
|
+
yWrapperEl.style.height = `${tbHeight}px`;
|
|
2243
|
+
yWrapperEl.style.top = `${tHeaderHeight}px`;
|
|
2217
2244
|
}
|
|
2218
2245
|
const yBottomCornerEl = refScrollYBottomCornerElem.value;
|
|
2219
2246
|
if (yBottomCornerEl) {
|
|
2220
|
-
yBottomCornerEl.style.height = `${
|
|
2221
|
-
yBottomCornerEl.style.top = `${
|
|
2222
|
-
yBottomCornerEl.style.display = overflowY &&
|
|
2247
|
+
yBottomCornerEl.style.height = `${tFooterHeight}px`;
|
|
2248
|
+
yBottomCornerEl.style.top = `${tHeaderHeight + tbHeight}px`;
|
|
2249
|
+
yBottomCornerEl.style.display = overflowY && tFooterHeight ? 'block' : '';
|
|
2223
2250
|
}
|
|
2224
2251
|
const rowExpandEl = refRowExpandElem.value;
|
|
2225
2252
|
if (rowExpandEl) {
|
|
2226
|
-
rowExpandEl.style.height = `${
|
|
2227
|
-
rowExpandEl.style.top = `${
|
|
2253
|
+
rowExpandEl.style.height = `${tbHeight}px`;
|
|
2254
|
+
rowExpandEl.style.top = `${tHeaderHeight}px`;
|
|
2228
2255
|
}
|
|
2256
|
+
reactData.tBodyHeight = tbHeight;
|
|
2229
2257
|
containerList.forEach((name, index) => {
|
|
2230
2258
|
const fixedType = index > 0 ? name : '';
|
|
2231
2259
|
const layoutList = ['header', 'body', 'footer'];
|
|
@@ -2289,7 +2317,7 @@ export default defineVxeComponent({
|
|
|
2289
2317
|
}
|
|
2290
2318
|
}
|
|
2291
2319
|
if (currScrollElem) {
|
|
2292
|
-
currScrollElem.style.height = `${
|
|
2320
|
+
currScrollElem.style.height = `${tHeaderHeight}px`;
|
|
2293
2321
|
}
|
|
2294
2322
|
if (tableElem) {
|
|
2295
2323
|
tableElem.style.width = tWidth ? `${tWidth}px` : '';
|
|
@@ -2298,15 +2326,15 @@ export default defineVxeComponent({
|
|
|
2298
2326
|
else if (layout === 'body') {
|
|
2299
2327
|
if (currScrollElem) {
|
|
2300
2328
|
currScrollElem.style.maxHeight = customMaxHeight ? `${bodyMaxHeight}px` : '';
|
|
2301
|
-
currScrollElem.style.height = customHeight ? `${
|
|
2329
|
+
currScrollElem.style.height = customHeight ? `${tbHeight}px` : '';
|
|
2302
2330
|
currScrollElem.style.minHeight = `${bodyMinHeight}px`;
|
|
2303
2331
|
}
|
|
2304
2332
|
// 如果是固定列
|
|
2305
2333
|
if (fixedWrapperElem) {
|
|
2306
2334
|
if (wrapperElem) {
|
|
2307
|
-
wrapperElem.style.top = `${
|
|
2335
|
+
wrapperElem.style.top = `${tHeaderHeight}px`;
|
|
2308
2336
|
}
|
|
2309
|
-
fixedWrapperElem.style.height = `${customHeight > 0 ? customHeight : (tableHeight +
|
|
2337
|
+
fixedWrapperElem.style.height = `${customHeight > 0 ? customHeight : (tableHeight + tHeaderHeight + tFooterHeight + osbHeight)}px`;
|
|
2310
2338
|
fixedWrapperElem.style.width = `${fixedColumn.reduce((previous, column) => previous + column.renderWidth, 0)}px`;
|
|
2311
2339
|
}
|
|
2312
2340
|
let renderColumnList = tableColumn;
|
|
@@ -2383,11 +2411,11 @@ export default defineVxeComponent({
|
|
|
2383
2411
|
}
|
|
2384
2412
|
}
|
|
2385
2413
|
if (currScrollElem) {
|
|
2386
|
-
currScrollElem.style.height = `${
|
|
2414
|
+
currScrollElem.style.height = `${tFooterHeight}px`;
|
|
2387
2415
|
// 如果是固定列
|
|
2388
2416
|
if (fixedWrapperElem) {
|
|
2389
2417
|
if (wrapperElem) {
|
|
2390
|
-
wrapperElem.style.top = `${customHeight > 0 ? customHeight -
|
|
2418
|
+
wrapperElem.style.top = `${customHeight > 0 ? customHeight - tFooterHeight - osbHeight : tableHeight + tHeaderHeight}px`;
|
|
2391
2419
|
}
|
|
2392
2420
|
}
|
|
2393
2421
|
}
|
|
@@ -2403,6 +2431,9 @@ export default defineVxeComponent({
|
|
|
2403
2431
|
if (mouseConfig && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
2404
2432
|
$xeTable.addCellSelectedClass();
|
|
2405
2433
|
}
|
|
2434
|
+
if ($xeGanttView) {
|
|
2435
|
+
$xeGanttView.handleUpdateStyle();
|
|
2436
|
+
}
|
|
2406
2437
|
return nextTick();
|
|
2407
2438
|
};
|
|
2408
2439
|
const checkValidate = (type) => {
|
|
@@ -2978,13 +3009,13 @@ export default defineVxeComponent({
|
|
|
2978
3009
|
if (xHandleEl) {
|
|
2979
3010
|
reactData.scrollbarHeight = scrollbarOpts.height || (xHandleEl.offsetHeight - xHandleEl.clientHeight) || 14;
|
|
2980
3011
|
}
|
|
2981
|
-
const
|
|
2982
|
-
const
|
|
3012
|
+
const hHeight = headerTableElem ? headerTableElem.clientHeight : 0;
|
|
3013
|
+
const fHeight = footerTableElem ? footerTableElem.clientHeight : 0;
|
|
2983
3014
|
internalData.tableHeight = bodyWrapperElem.offsetHeight;
|
|
2984
|
-
|
|
2985
|
-
|
|
3015
|
+
reactData.tHeaderHeight = hHeight;
|
|
3016
|
+
reactData.tFooterHeight = fHeight;
|
|
2986
3017
|
reactData.overflowX = overflowX;
|
|
2987
|
-
reactData.parentHeight = Math.max(
|
|
3018
|
+
reactData.parentHeight = Math.max(hHeight + fHeight + 20, $xeTable.getParentHeight());
|
|
2988
3019
|
}
|
|
2989
3020
|
if (overflowX) {
|
|
2990
3021
|
$xeTable.checkScrolling();
|
|
@@ -3037,6 +3068,7 @@ export default defineVxeComponent({
|
|
|
3037
3068
|
};
|
|
3038
3069
|
const handleLazyRecalculate = (reFull, reWidth, reHeight) => {
|
|
3039
3070
|
return new Promise(resolve => {
|
|
3071
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
3040
3072
|
const { rceTimeout, rceRunTime } = internalData;
|
|
3041
3073
|
const resizeOpts = computeResizeOpts.value;
|
|
3042
3074
|
const refreshDelay = resizeOpts.refreshDelay || 20;
|
|
@@ -3059,6 +3091,9 @@ export default defineVxeComponent({
|
|
|
3059
3091
|
else {
|
|
3060
3092
|
resolve(handleRecalculateStyle(reFull, reWidth, reHeight));
|
|
3061
3093
|
}
|
|
3094
|
+
if ($xeGanttView) {
|
|
3095
|
+
$xeGanttView.handleLazyRecalculate();
|
|
3096
|
+
}
|
|
3062
3097
|
internalData.rceTimeout = setTimeout(() => {
|
|
3063
3098
|
internalData.rceTimeout = undefined;
|
|
3064
3099
|
handleRecalculateStyle(reFull, reWidth, reHeight);
|
|
@@ -4015,6 +4050,17 @@ export default defineVxeComponent({
|
|
|
4015
4050
|
};
|
|
4016
4051
|
requestAnimationFrame(step);
|
|
4017
4052
|
};
|
|
4053
|
+
const syncGanttScrollTop = (scrollTop) => {
|
|
4054
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
4055
|
+
if ($xeGanttView) {
|
|
4056
|
+
const ganttInternalData = $xeGanttView.internalData;
|
|
4057
|
+
const { elemStore: ganttElemStore } = ganttInternalData;
|
|
4058
|
+
const ganttBodyScrollElem = getRefElem(ganttElemStore['main-body-scroll']);
|
|
4059
|
+
if (ganttBodyScrollElem) {
|
|
4060
|
+
ganttBodyScrollElem.scrollTop = scrollTop;
|
|
4061
|
+
}
|
|
4062
|
+
}
|
|
4063
|
+
};
|
|
4018
4064
|
const dispatchEvent = (type, params, evnt) => {
|
|
4019
4065
|
emit(type, createEvent(evnt, { $table: $xeTable, $grid: $xeGrid }, params));
|
|
4020
4066
|
};
|
|
@@ -6907,11 +6953,18 @@ export default defineVxeComponent({
|
|
|
6907
6953
|
internalData.isActivated = false;
|
|
6908
6954
|
return nextTick();
|
|
6909
6955
|
},
|
|
6956
|
+
/**
|
|
6957
|
+
* 已废弃,被 connectToolbar 替换
|
|
6958
|
+
* @deprecated
|
|
6959
|
+
*/
|
|
6960
|
+
connect($toolbar) {
|
|
6961
|
+
return $xeTable.connectToolbar($toolbar);
|
|
6962
|
+
},
|
|
6910
6963
|
/**
|
|
6911
6964
|
* 连接工具栏
|
|
6912
6965
|
* @param $toolbar
|
|
6913
6966
|
*/
|
|
6914
|
-
|
|
6967
|
+
connectToolbar($toolbar) {
|
|
6915
6968
|
if ($toolbar) {
|
|
6916
6969
|
$xeToolbar = $toolbar;
|
|
6917
6970
|
$xeToolbar.syncUpdate({ collectColumn: internalData.collectColumn, $table: $xeTable });
|
|
@@ -7843,6 +7896,7 @@ export default defineVxeComponent({
|
|
|
7843
7896
|
handleTableData(force) {
|
|
7844
7897
|
const { scrollYLoad } = reactData;
|
|
7845
7898
|
const { scrollYStore, fullDataRowIdData } = internalData;
|
|
7899
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
7846
7900
|
let fullList = internalData.afterFullData;
|
|
7847
7901
|
// 是否进行数据处理
|
|
7848
7902
|
if (force) {
|
|
@@ -7863,6 +7917,9 @@ export default defineVxeComponent({
|
|
|
7863
7917
|
});
|
|
7864
7918
|
reactData.tableData = tableData;
|
|
7865
7919
|
internalData.visibleDataRowIdData = visibleDataRowIdMaps;
|
|
7920
|
+
if ($xeGanttView) {
|
|
7921
|
+
$xeGanttView.updateViewData();
|
|
7922
|
+
}
|
|
7866
7923
|
return nextTick();
|
|
7867
7924
|
},
|
|
7868
7925
|
/**
|
|
@@ -10379,6 +10436,7 @@ export default defineVxeComponent({
|
|
|
10379
10436
|
}
|
|
10380
10437
|
setScrollTop(yHandleEl, scrollTop);
|
|
10381
10438
|
setScrollTop(rowExpandEl, scrollTop);
|
|
10439
|
+
syncGanttScrollTop(scrollTop);
|
|
10382
10440
|
if (scrollYLoad) {
|
|
10383
10441
|
$xeTable.triggerScrollYEvent(evnt);
|
|
10384
10442
|
}
|
|
@@ -10567,6 +10625,7 @@ export default defineVxeComponent({
|
|
|
10567
10625
|
setScrollTop(leftScrollElem, currTopNum);
|
|
10568
10626
|
setScrollTop(rightScrollElem, currTopNum);
|
|
10569
10627
|
setScrollTop(rowExpandEl, currTopNum);
|
|
10628
|
+
syncGanttScrollTop(currTopNum);
|
|
10570
10629
|
if (scrollYLoad) {
|
|
10571
10630
|
$xeTable.triggerScrollYEvent(evnt);
|
|
10572
10631
|
}
|
|
@@ -10584,6 +10643,7 @@ export default defineVxeComponent({
|
|
|
10584
10643
|
setScrollTop(leftScrollElem, currTopNum);
|
|
10585
10644
|
setScrollTop(rightScrollElem, currTopNum);
|
|
10586
10645
|
setScrollTop(rowExpandEl, currTopNum);
|
|
10646
|
+
syncGanttScrollTop(currTopNum);
|
|
10587
10647
|
if (scrollYLoad) {
|
|
10588
10648
|
$xeTable.triggerScrollYEvent(evnt);
|
|
10589
10649
|
}
|
|
@@ -10657,6 +10717,7 @@ export default defineVxeComponent({
|
|
|
10657
10717
|
setScrollTop(leftScrollElem, scrollTop);
|
|
10658
10718
|
setScrollTop(rightScrollElem, scrollTop);
|
|
10659
10719
|
setScrollTop(rowExpandEl, scrollTop);
|
|
10720
|
+
syncGanttScrollTop(scrollTop);
|
|
10660
10721
|
if (scrollYLoad) {
|
|
10661
10722
|
$xeTable.triggerScrollYEvent(evnt);
|
|
10662
10723
|
}
|
|
@@ -10696,6 +10757,7 @@ export default defineVxeComponent({
|
|
|
10696
10757
|
updateScrollXSpace() {
|
|
10697
10758
|
const { scrollXLoad, overflowX, scrollXWidth } = reactData;
|
|
10698
10759
|
const { visibleColumn, scrollXStore, elemStore, fullColumnIdData } = internalData;
|
|
10760
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
10699
10761
|
const mouseOpts = computeMouseOpts.value;
|
|
10700
10762
|
const tableBody = refTableBody.value;
|
|
10701
10763
|
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
@@ -10757,10 +10819,13 @@ export default defineVxeComponent({
|
|
|
10757
10819
|
if (scrollXSpaceEl) {
|
|
10758
10820
|
scrollXSpaceEl.style.width = `${ySpaceWidth}px`;
|
|
10759
10821
|
}
|
|
10822
|
+
calcScrollbar();
|
|
10760
10823
|
if (isScrollXBig && mouseOpts.area) {
|
|
10761
10824
|
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
10762
10825
|
}
|
|
10763
|
-
|
|
10826
|
+
if ($xeGanttView) {
|
|
10827
|
+
$xeGanttView.updateScrollXSpace();
|
|
10828
|
+
}
|
|
10764
10829
|
return nextTick().then(() => {
|
|
10765
10830
|
updateStyle();
|
|
10766
10831
|
});
|
|
@@ -10770,6 +10835,7 @@ export default defineVxeComponent({
|
|
|
10770
10835
|
updateScrollYSpace() {
|
|
10771
10836
|
const { isAllOverflow, overflowY, scrollYLoad, expandColumn } = reactData;
|
|
10772
10837
|
const { scrollYStore, elemStore, isResizeCellHeight, afterFullData, fullAllDataRowIdData, rowExpandedMaps } = internalData;
|
|
10838
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
10773
10839
|
const { startIndex } = scrollYStore;
|
|
10774
10840
|
const mouseOpts = computeMouseOpts.value;
|
|
10775
10841
|
const expandOpts = computeExpandOpts.value;
|
|
@@ -10865,10 +10931,13 @@ export default defineVxeComponent({
|
|
|
10865
10931
|
reactData.scrollYTop = scrollYTop;
|
|
10866
10932
|
reactData.scrollYHeight = scrollYHeight;
|
|
10867
10933
|
reactData.isScrollYBig = isScrollYBig;
|
|
10934
|
+
calcScrollbar();
|
|
10868
10935
|
if (isScrollYBig && mouseOpts.area) {
|
|
10869
10936
|
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
10870
10937
|
}
|
|
10871
|
-
|
|
10938
|
+
if ($xeGanttView) {
|
|
10939
|
+
$xeGanttView.updateScrollYSpace();
|
|
10940
|
+
}
|
|
10872
10941
|
return nextTick().then(() => {
|
|
10873
10942
|
updateStyle();
|
|
10874
10943
|
});
|
|
@@ -10974,6 +11043,13 @@ export default defineVxeComponent({
|
|
|
10974
11043
|
return getRowid($xeTable, row1) === getRowid($xeTable, row2);
|
|
10975
11044
|
}
|
|
10976
11045
|
return false;
|
|
11046
|
+
},
|
|
11047
|
+
handleConnectGanttView($ganttView) {
|
|
11048
|
+
if ($ganttView && $ganttView.connectUpdate) {
|
|
11049
|
+
$ganttView.connectUpdate({ $table: $xeTable });
|
|
11050
|
+
internalData.xeGanttView = $ganttView;
|
|
11051
|
+
}
|
|
11052
|
+
return nextTick();
|
|
10977
11053
|
}
|
|
10978
11054
|
};
|
|
10979
11055
|
// 检测对应模块是否安装
|
package/es/table/src/util.js
CHANGED
|
@@ -276,7 +276,7 @@ export default defineVxeComponent({
|
|
|
276
276
|
}
|
|
277
277
|
else {
|
|
278
278
|
const gCommandOpts = commands.get(code);
|
|
279
|
-
const params = { code, button: item, $table: $table, $grid: $xeGrid, $event };
|
|
279
|
+
const params = { code, button: item, $table: $table, $grid: $xeGrid, $gantt: null, $event };
|
|
280
280
|
if (gCommandOpts) {
|
|
281
281
|
const tCommandMethod = gCommandOpts.tableCommandMethod || gCommandOpts.commandMethod;
|
|
282
282
|
if (tCommandMethod) {
|
|
@@ -303,7 +303,7 @@ export default defineVxeComponent({
|
|
|
303
303
|
}
|
|
304
304
|
else {
|
|
305
305
|
const gCommandOpts = commands.get(code);
|
|
306
|
-
const params = { code, button: null, tool: item, $table: $table, $grid: $xeGrid, $event };
|
|
306
|
+
const params = { code, button: null, tool: item, $table: $table, $grid: $xeGrid, $gantt: null, $event };
|
|
307
307
|
if (gCommandOpts) {
|
|
308
308
|
const tCommandMethod = gCommandOpts.tableCommandMethod || gCommandOpts.commandMethod;
|
|
309
309
|
if (tCommandMethod) {
|
package/es/ui/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
import { getFuncText } from './src/utils';
|
|
3
|
-
export const version = "4.15.
|
|
3
|
+
export const version = "4.15.6";
|
|
4
4
|
VxeUI.version = version;
|
|
5
5
|
VxeUI.tableVersion = version;
|
|
6
6
|
VxeUI.setConfig({
|
|
@@ -231,8 +231,16 @@ VxeUI.setConfig({
|
|
|
231
231
|
oSize: 0
|
|
232
232
|
},
|
|
233
233
|
scrollbarConfig: {
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
// width: 14,
|
|
235
|
+
// height: 14,
|
|
236
|
+
x: {
|
|
237
|
+
// position: 'bottom',
|
|
238
|
+
visible: true
|
|
239
|
+
},
|
|
240
|
+
y: {
|
|
241
|
+
// position: 'right',
|
|
242
|
+
visible: true
|
|
243
|
+
}
|
|
236
244
|
}
|
|
237
245
|
},
|
|
238
246
|
// export: {
|
|
@@ -285,7 +293,8 @@ VxeUI.setConfig({
|
|
|
285
293
|
// types: ['csv', 'html', 'xml', 'txt']
|
|
286
294
|
// },
|
|
287
295
|
// buttons: []
|
|
288
|
-
}
|
|
296
|
+
},
|
|
297
|
+
gantt: {}
|
|
289
298
|
});
|
|
290
299
|
const iconPrefix = 'vxe-table-icon-';
|
|
291
300
|
VxeUI.setIcon({
|
package/es/ui/src/log.js
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.gridEmits = void 0;
|
|
7
|
+
var _emits = require("../../table/src/emits");
|
|
8
|
+
const gridEmits = exports.gridEmits = [..._emits.tableEmits, 'page-change', 'form-submit', 'form-submit-invalid', 'form-reset', 'form-collapse', 'form-toggle-collapse', 'proxy-query', 'proxy-delete', 'proxy-save', 'toolbar-button-click', 'toolbar-tool-click', 'zoom'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.gridEmits=void 0;var _emits=require("../../table/src/emits");let gridEmits=exports.gridEmits=[..._emits.tableEmits,"page-change","form-submit","form-submit-invalid","form-reset","form-collapse","form-toggle-collapse","proxy-query","proxy-delete","proxy-save","toolbar-button-click","toolbar-tool-click","zoom"];
|