vxe-table 3.17.7 → 3.17.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/grid/src/grid.js +47 -29
- package/es/style.css +1 -1
- package/es/table/module/export/mixin.js +3 -1
- package/es/table/src/methods.js +134 -51
- package/es/table/src/props.js +1 -1
- package/es/table/src/table.js +4 -2
- package/es/table/src/util.js +6 -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/grid.js +49 -26
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +13587 -13452
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/export/mixin.js +5 -1
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/src/methods.js +149 -57
- package/lib/table/src/methods.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 +5 -3
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +6 -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/grid.ts +57 -38
- package/packages/table/module/export/mixin.ts +5 -3
- package/packages/table/src/methods.ts +145 -55
- package/packages/table/src/props.ts +1 -1
- package/packages/table/src/table.ts +4 -2
- package/packages/table/src/util.ts +7 -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.1754614978390.ttf → iconfont.1755066349013.ttf} +0 -0
- /package/es/{iconfont.1754614978390.woff → iconfont.1755066349013.woff} +0 -0
- /package/es/{iconfont.1754614978390.woff2 → iconfont.1755066349013.woff2} +0 -0
- /package/lib/{iconfont.1754614978390.ttf → iconfont.1755066349013.ttf} +0 -0
- /package/lib/{iconfont.1754614978390.woff → iconfont.1755066349013.woff} +0 -0
- /package/lib/{iconfont.1754614978390.woff2 → iconfont.1755066349013.woff2} +0 -0
package/lib/table/src/methods.js
CHANGED
|
@@ -458,6 +458,8 @@ function cacheColumnMap($xeTable) {
|
|
|
458
458
|
reactData.rowGroupColumn = rowGroupColumn;
|
|
459
459
|
reactData.treeNodeColumn = treeNodeColumn;
|
|
460
460
|
reactData.expandColumn = expandColumn;
|
|
461
|
+
reactData.checkboxColumn = checkboxColumn;
|
|
462
|
+
reactData.radioColumn = radioColumn;
|
|
461
463
|
reactData.isAllOverflow = isAllOverflow;
|
|
462
464
|
}
|
|
463
465
|
function updateScrollXStatus($xeTable, fullColumn) {
|
|
@@ -1240,56 +1242,72 @@ function updateStyle($xeTable) {
|
|
|
1240
1242
|
const {
|
|
1241
1243
|
visibleColumn,
|
|
1242
1244
|
tableHeight,
|
|
1243
|
-
headerHeight,
|
|
1244
|
-
footerHeight,
|
|
1245
1245
|
elemStore,
|
|
1246
1246
|
customHeight,
|
|
1247
1247
|
customMinHeight,
|
|
1248
|
-
customMaxHeight
|
|
1248
|
+
customMaxHeight,
|
|
1249
|
+
tHeaderHeight,
|
|
1250
|
+
tFooterHeight
|
|
1249
1251
|
} = internalData;
|
|
1252
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
1250
1253
|
const el = $xeTable.$refs.refElem;
|
|
1251
|
-
if (!el) {
|
|
1254
|
+
if (!el || !el.clientHeight) {
|
|
1252
1255
|
return;
|
|
1253
1256
|
}
|
|
1254
1257
|
const containerList = ['main', 'left', 'right'];
|
|
1255
|
-
|
|
1256
|
-
|
|
1258
|
+
let osbWidth = overflowY ? scrollbarWidth : 0;
|
|
1259
|
+
let osbHeight = overflowX ? scrollbarHeight : 0;
|
|
1257
1260
|
const emptyPlaceholderElem = $xeTable.$refs.refEmptyPlaceholder;
|
|
1261
|
+
const scrollbarOpts = $xeTable.computeScrollbarOpts;
|
|
1258
1262
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
1259
1263
|
const expandOpts = $xeTable.computeExpandOpts;
|
|
1260
1264
|
const bodyWrapperElem = (0, _util.getRefElem)(elemStore['main-body-wrapper']);
|
|
1261
1265
|
const bodyTableElem = (0, _util.getRefElem)(elemStore['main-body-table']);
|
|
1262
1266
|
if (emptyPlaceholderElem) {
|
|
1263
|
-
emptyPlaceholderElem.style.top = `${
|
|
1267
|
+
emptyPlaceholderElem.style.top = `${tHeaderHeight}px`;
|
|
1264
1268
|
emptyPlaceholderElem.style.height = bodyWrapperElem ? `${bodyWrapperElem.offsetHeight - osbHeight}px` : '';
|
|
1265
1269
|
}
|
|
1266
|
-
|
|
1270
|
+
const scrollbarXToTop = $xeTable.computeScrollbarXToTop;
|
|
1271
|
+
const scrollbarYToLeft = $xeTable.computeScrollbarYToLeft;
|
|
1272
|
+
let xScrollbarVisible = overflowX ? 'visible' : 'hidden';
|
|
1273
|
+
if ($xeGanttView) {
|
|
1274
|
+
osbHeight = scrollbarHeight;
|
|
1275
|
+
xScrollbarVisible = 'visible';
|
|
1276
|
+
} else if (scrollbarOpts.x && scrollbarOpts.x.visible === false) {
|
|
1277
|
+
osbHeight = 0;
|
|
1278
|
+
xScrollbarVisible = 'hidden';
|
|
1279
|
+
}
|
|
1280
|
+
let yScrollbarVisible = overflowY ? 'visible' : 'hidden';
|
|
1281
|
+
if (scrollbarOpts.y && scrollbarOpts.y.visible === false || $xeGanttView && !scrollbarYToLeft) {
|
|
1282
|
+
osbWidth = 0;
|
|
1283
|
+
yScrollbarVisible = 'hidden';
|
|
1284
|
+
}
|
|
1285
|
+
let tbHeight = 0;
|
|
1267
1286
|
let bodyMaxHeight = 0;
|
|
1268
|
-
const bodyMinHeight = customMinHeight -
|
|
1287
|
+
const bodyMinHeight = customMinHeight - tHeaderHeight - tFooterHeight - osbHeight;
|
|
1269
1288
|
if (customMaxHeight) {
|
|
1270
|
-
bodyMaxHeight = Math.max(bodyMinHeight, customMaxHeight -
|
|
1289
|
+
bodyMaxHeight = Math.max(bodyMinHeight, customMaxHeight - tHeaderHeight - tFooterHeight - osbHeight);
|
|
1271
1290
|
}
|
|
1272
1291
|
if (customHeight) {
|
|
1273
|
-
|
|
1292
|
+
tbHeight = customHeight - tHeaderHeight - tFooterHeight - osbHeight;
|
|
1274
1293
|
}
|
|
1275
|
-
if (!
|
|
1294
|
+
if (!tbHeight) {
|
|
1276
1295
|
if (bodyTableElem) {
|
|
1277
|
-
|
|
1296
|
+
tbHeight = bodyTableElem.clientHeight;
|
|
1278
1297
|
}
|
|
1279
1298
|
}
|
|
1280
|
-
if (
|
|
1299
|
+
if (tbHeight) {
|
|
1281
1300
|
if (bodyMaxHeight) {
|
|
1282
|
-
|
|
1301
|
+
tbHeight = Math.min(bodyMaxHeight, tbHeight);
|
|
1283
1302
|
}
|
|
1284
|
-
|
|
1303
|
+
tbHeight = Math.max(bodyMinHeight, tbHeight);
|
|
1285
1304
|
}
|
|
1286
|
-
const scrollbarXToTop = $xeTable.$refs.computeScrollbarXToTop;
|
|
1287
1305
|
const xLeftCornerEl = $xeTable.$refs.refScrollXLeftCornerElem;
|
|
1288
1306
|
const xRightCornerEl = $xeTable.$refs.refScrollXRightCornerElem;
|
|
1289
1307
|
const scrollXVirtualEl = $xeTable.$refs.refScrollXVirtualElem;
|
|
1290
1308
|
if (scrollXVirtualEl) {
|
|
1291
1309
|
scrollXVirtualEl.style.height = `${osbHeight}px`;
|
|
1292
|
-
scrollXVirtualEl.style.visibility =
|
|
1310
|
+
scrollXVirtualEl.style.visibility = xScrollbarVisible;
|
|
1293
1311
|
}
|
|
1294
1312
|
const xWrapperEl = $xeTable.$refs.refScrollXWrapperElem;
|
|
1295
1313
|
if (xWrapperEl) {
|
|
@@ -1307,30 +1325,31 @@ function updateStyle($xeTable) {
|
|
|
1307
1325
|
const scrollYVirtualEl = $xeTable.$refs.refScrollYVirtualElem;
|
|
1308
1326
|
if (scrollYVirtualEl) {
|
|
1309
1327
|
scrollYVirtualEl.style.width = `${osbWidth}px`;
|
|
1310
|
-
scrollYVirtualEl.style.height = `${
|
|
1311
|
-
scrollYVirtualEl.style.visibility =
|
|
1328
|
+
scrollYVirtualEl.style.height = `${tbHeight + tHeaderHeight + tFooterHeight}px`;
|
|
1329
|
+
scrollYVirtualEl.style.visibility = yScrollbarVisible;
|
|
1312
1330
|
}
|
|
1313
1331
|
const yTopCornerEl = $xeTable.$refs.refScrollYTopCornerElem;
|
|
1314
1332
|
if (yTopCornerEl) {
|
|
1315
|
-
yTopCornerEl.style.height = `${
|
|
1316
|
-
yTopCornerEl.style.display = overflowY &&
|
|
1333
|
+
yTopCornerEl.style.height = `${tHeaderHeight}px`;
|
|
1334
|
+
yTopCornerEl.style.display = overflowY && tHeaderHeight ? 'block' : '';
|
|
1317
1335
|
}
|
|
1318
1336
|
const yWrapperEl = $xeTable.$refs.refScrollYWrapperElem;
|
|
1319
1337
|
if (yWrapperEl) {
|
|
1320
|
-
yWrapperEl.style.height = `${
|
|
1321
|
-
yWrapperEl.style.top = `${
|
|
1338
|
+
yWrapperEl.style.height = `${tbHeight}px`;
|
|
1339
|
+
yWrapperEl.style.top = `${tHeaderHeight}px`;
|
|
1322
1340
|
}
|
|
1323
1341
|
const yBottomCornerEl = $xeTable.$refs.refScrollYBottomCornerElem;
|
|
1324
1342
|
if (yBottomCornerEl) {
|
|
1325
|
-
yBottomCornerEl.style.height = `${
|
|
1326
|
-
yBottomCornerEl.style.top = `${
|
|
1327
|
-
yBottomCornerEl.style.display = overflowY &&
|
|
1343
|
+
yBottomCornerEl.style.height = `${tFooterHeight}px`;
|
|
1344
|
+
yBottomCornerEl.style.top = `${tHeaderHeight + tbHeight}px`;
|
|
1345
|
+
yBottomCornerEl.style.display = overflowY && tFooterHeight ? 'block' : '';
|
|
1328
1346
|
}
|
|
1329
1347
|
const rowExpandEl = $xeTable.$refs.refRowExpandElem;
|
|
1330
1348
|
if (rowExpandEl) {
|
|
1331
|
-
rowExpandEl.style.height = `${
|
|
1332
|
-
rowExpandEl.style.top = `${
|
|
1349
|
+
rowExpandEl.style.height = `${tbHeight}px`;
|
|
1350
|
+
rowExpandEl.style.top = `${tHeaderHeight}px`;
|
|
1333
1351
|
}
|
|
1352
|
+
internalData.tBodyHeight = tbHeight;
|
|
1334
1353
|
containerList.forEach((name, index) => {
|
|
1335
1354
|
const fixedType = index > 0 ? name : '';
|
|
1336
1355
|
const layoutList = ['header', 'body', 'footer'];
|
|
@@ -1390,7 +1409,7 @@ function updateStyle($xeTable) {
|
|
|
1390
1409
|
}
|
|
1391
1410
|
}
|
|
1392
1411
|
if (currScrollElem) {
|
|
1393
|
-
currScrollElem.style.height = `${
|
|
1412
|
+
currScrollElem.style.height = `${tHeaderHeight}px`;
|
|
1394
1413
|
}
|
|
1395
1414
|
if (tableElem) {
|
|
1396
1415
|
tableElem.style.width = tWidth ? `${tWidth}px` : '';
|
|
@@ -1398,15 +1417,15 @@ function updateStyle($xeTable) {
|
|
|
1398
1417
|
} else if (layout === 'body') {
|
|
1399
1418
|
if (currScrollElem) {
|
|
1400
1419
|
currScrollElem.style.maxHeight = customMaxHeight ? `${bodyMaxHeight}px` : '';
|
|
1401
|
-
currScrollElem.style.height = customHeight ? `${
|
|
1420
|
+
currScrollElem.style.height = customHeight ? `${tbHeight}px` : '';
|
|
1402
1421
|
currScrollElem.style.minHeight = `${bodyMinHeight}px`;
|
|
1403
1422
|
}
|
|
1404
1423
|
// 如果是固定列
|
|
1405
1424
|
if (fixedWrapperElem) {
|
|
1406
1425
|
if (wrapperElem) {
|
|
1407
|
-
wrapperElem.style.top = `${
|
|
1426
|
+
wrapperElem.style.top = `${tHeaderHeight}px`;
|
|
1408
1427
|
}
|
|
1409
|
-
fixedWrapperElem.style.height = `${customHeight > 0 ? customHeight : tableHeight +
|
|
1428
|
+
fixedWrapperElem.style.height = `${customHeight > 0 ? customHeight : tableHeight + tHeaderHeight + tFooterHeight + osbHeight}px`;
|
|
1410
1429
|
fixedWrapperElem.style.width = `${fixedColumn.reduce((previous, column) => previous + column.renderWidth, 0)}px`;
|
|
1411
1430
|
}
|
|
1412
1431
|
let renderColumnList = tableColumn;
|
|
@@ -1478,11 +1497,11 @@ function updateStyle($xeTable) {
|
|
|
1478
1497
|
}
|
|
1479
1498
|
}
|
|
1480
1499
|
if (currScrollElem) {
|
|
1481
|
-
currScrollElem.style.height = `${
|
|
1500
|
+
currScrollElem.style.height = `${tFooterHeight}px`;
|
|
1482
1501
|
// 如果是固定列
|
|
1483
1502
|
if (fixedWrapperElem) {
|
|
1484
1503
|
if (wrapperElem) {
|
|
1485
|
-
wrapperElem.style.top = `${customHeight > 0 ? customHeight -
|
|
1504
|
+
wrapperElem.style.top = `${customHeight > 0 ? customHeight - tFooterHeight - osbHeight : tableHeight + tHeaderHeight}px`;
|
|
1486
1505
|
}
|
|
1487
1506
|
}
|
|
1488
1507
|
}
|
|
@@ -1498,6 +1517,9 @@ function updateStyle($xeTable) {
|
|
|
1498
1517
|
if (mouseConfig && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
1499
1518
|
$xeTable.addCellSelectedClass();
|
|
1500
1519
|
}
|
|
1520
|
+
if ($xeGanttView) {
|
|
1521
|
+
$xeGanttView.handleUpdateStyle();
|
|
1522
|
+
}
|
|
1501
1523
|
return $xeTable.$nextTick();
|
|
1502
1524
|
}
|
|
1503
1525
|
function checkValidate($xeTable, type) {
|
|
@@ -3213,12 +3235,13 @@ function calcScrollbar($xeTable) {
|
|
|
3213
3235
|
reactData.scrollbarHeight = scrollbarOpts.height || xHandleEl.offsetHeight - xHandleEl.clientHeight || 14;
|
|
3214
3236
|
}
|
|
3215
3237
|
reactData.overflowX = overflowX;
|
|
3216
|
-
const
|
|
3217
|
-
const
|
|
3238
|
+
const hHeight = headerTableElem ? headerTableElem.clientHeight : 0;
|
|
3239
|
+
const fHeight = footerTableElem ? footerTableElem.clientHeight : 0;
|
|
3218
3240
|
internalData.tableHeight = bodyWrapperElem.offsetHeight;
|
|
3219
|
-
internalData.
|
|
3220
|
-
internalData.
|
|
3221
|
-
reactData.
|
|
3241
|
+
internalData.tHeaderHeight = hHeight;
|
|
3242
|
+
internalData.tFooterHeight = fHeight;
|
|
3243
|
+
reactData.overflowX = overflowX;
|
|
3244
|
+
reactData.parentHeight = Math.max(hHeight + fHeight + 20, $xeTable.getParentHeight());
|
|
3222
3245
|
}
|
|
3223
3246
|
if (overflowX) {
|
|
3224
3247
|
$xeTable.checkScrolling();
|
|
@@ -3277,6 +3300,7 @@ function handleLazyRecalculate($xeTable, reFull, reWidth, reHeight) {
|
|
|
3277
3300
|
rceTimeout,
|
|
3278
3301
|
rceRunTime
|
|
3279
3302
|
} = internalData;
|
|
3303
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
3280
3304
|
const resizeOpts = $xeTable.computeResizeOpts;
|
|
3281
3305
|
const refreshDelay = resizeOpts.refreshDelay || 20;
|
|
3282
3306
|
const el = $xeTable.$refs.refElem;
|
|
@@ -3296,12 +3320,18 @@ function handleLazyRecalculate($xeTable, reFull, reWidth, reHeight) {
|
|
|
3296
3320
|
} else {
|
|
3297
3321
|
resolve(handleRecalculateStyle($xeTable, reFull, reWidth, reHeight));
|
|
3298
3322
|
}
|
|
3323
|
+
if ($xeGanttView) {
|
|
3324
|
+
$xeGanttView.handleLazyRecalculate();
|
|
3325
|
+
}
|
|
3299
3326
|
internalData.rceTimeout = setTimeout(() => {
|
|
3300
3327
|
internalData.rceTimeout = undefined;
|
|
3301
3328
|
handleRecalculateStyle($xeTable, reFull, reWidth, reHeight);
|
|
3302
3329
|
}, refreshDelay);
|
|
3303
3330
|
});
|
|
3304
3331
|
}
|
|
3332
|
+
function handleResizeEvent($xeTable) {
|
|
3333
|
+
handleLazyRecalculate($xeTable, true, true, true);
|
|
3334
|
+
}
|
|
3305
3335
|
function handleUpdateAggValues($xeTable) {
|
|
3306
3336
|
const reactData = $xeTable;
|
|
3307
3337
|
const internalData = $xeTable;
|
|
@@ -4104,11 +4134,6 @@ function lazyScrollYData($xeTable) {
|
|
|
4104
4134
|
function checkLastSyncScroll($xeTable, isRollX, isRollY) {
|
|
4105
4135
|
const reactData = $xeTable;
|
|
4106
4136
|
const internalData = $xeTable;
|
|
4107
|
-
const {
|
|
4108
|
-
scrollXLoad,
|
|
4109
|
-
scrollYLoad,
|
|
4110
|
-
isAllOverflow
|
|
4111
|
-
} = reactData;
|
|
4112
4137
|
const {
|
|
4113
4138
|
lcsTimeout
|
|
4114
4139
|
} = internalData;
|
|
@@ -4116,6 +4141,11 @@ function checkLastSyncScroll($xeTable, isRollX, isRollY) {
|
|
|
4116
4141
|
clearTimeout(lcsTimeout);
|
|
4117
4142
|
}
|
|
4118
4143
|
internalData.lcsTimeout = setTimeout(() => {
|
|
4144
|
+
const {
|
|
4145
|
+
scrollXLoad,
|
|
4146
|
+
scrollYLoad,
|
|
4147
|
+
isAllOverflow
|
|
4148
|
+
} = reactData;
|
|
4119
4149
|
internalData.lcsRunTime = Date.now();
|
|
4120
4150
|
internalData.lcsTimeout = undefined;
|
|
4121
4151
|
internalData.intoRunScroll = false;
|
|
@@ -4186,6 +4216,20 @@ const wheelScrollTopTo = (diffNum, cb) => {
|
|
|
4186
4216
|
};
|
|
4187
4217
|
requestAnimationFrame(step);
|
|
4188
4218
|
};
|
|
4219
|
+
const syncGanttScrollTop = ($xeTable, scrollTop) => {
|
|
4220
|
+
const internalData = $xeTable;
|
|
4221
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
4222
|
+
if ($xeGanttView) {
|
|
4223
|
+
const ganttInternalData = $xeGanttView.internalData;
|
|
4224
|
+
const {
|
|
4225
|
+
elemStore: ganttElemStore
|
|
4226
|
+
} = ganttInternalData;
|
|
4227
|
+
const ganttBodyScrollElem = (0, _util.getRefElem)(ganttElemStore['main-body-scroll']);
|
|
4228
|
+
if (ganttBodyScrollElem) {
|
|
4229
|
+
ganttBodyScrollElem.scrollTop = scrollTop;
|
|
4230
|
+
}
|
|
4231
|
+
}
|
|
4232
|
+
};
|
|
4189
4233
|
function updateHeight($xeTable) {
|
|
4190
4234
|
const reactData = $xeTable;
|
|
4191
4235
|
const internalData = $xeTable;
|
|
@@ -4532,6 +4576,7 @@ const Methods = {
|
|
|
4532
4576
|
scrollYStore,
|
|
4533
4577
|
fullDataRowIdData
|
|
4534
4578
|
} = internalData;
|
|
4579
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
4535
4580
|
let fullList = internalData.afterFullData;
|
|
4536
4581
|
// 是否进行数据处理
|
|
4537
4582
|
if (force) {
|
|
@@ -4552,6 +4597,9 @@ const Methods = {
|
|
|
4552
4597
|
});
|
|
4553
4598
|
reactData.tableData = tableData;
|
|
4554
4599
|
internalData.visibleDataRowIdData = visibleDataRowIdMaps;
|
|
4600
|
+
if ($xeGanttView) {
|
|
4601
|
+
$xeGanttView.updateViewData();
|
|
4602
|
+
}
|
|
4555
4603
|
return $xeTable.$nextTick();
|
|
4556
4604
|
},
|
|
4557
4605
|
/**
|
|
@@ -6915,6 +6963,10 @@ const Methods = {
|
|
|
6915
6963
|
}, 10);
|
|
6916
6964
|
});
|
|
6917
6965
|
},
|
|
6966
|
+
handleResizeEvent() {
|
|
6967
|
+
const $xeTable = this;
|
|
6968
|
+
handleResizeEvent($xeTable);
|
|
6969
|
+
},
|
|
6918
6970
|
/**
|
|
6919
6971
|
* 重新渲染布局
|
|
6920
6972
|
* 刷新布局
|
|
@@ -7598,7 +7650,7 @@ const Methods = {
|
|
|
7598
7650
|
const $xeTable = this;
|
|
7599
7651
|
$xeTable.closeMenu();
|
|
7600
7652
|
$xeTable.updateCellAreas();
|
|
7601
|
-
|
|
7653
|
+
handleResizeEvent($xeTable);
|
|
7602
7654
|
$xeTable.updateCellAreas();
|
|
7603
7655
|
},
|
|
7604
7656
|
/**
|
|
@@ -9026,13 +9078,19 @@ const Methods = {
|
|
|
9026
9078
|
const props = $xeTable;
|
|
9027
9079
|
const reactData = $xeTable;
|
|
9028
9080
|
const {
|
|
9081
|
+
treeConfig,
|
|
9029
9082
|
highlightCurrentRow,
|
|
9030
9083
|
highlightCurrentColumn,
|
|
9031
|
-
editConfig
|
|
9084
|
+
editConfig,
|
|
9085
|
+
aggregateConfig,
|
|
9086
|
+
rowGroupConfig
|
|
9032
9087
|
} = props;
|
|
9033
9088
|
const {
|
|
9034
9089
|
editStore,
|
|
9035
|
-
isDragResize
|
|
9090
|
+
isDragResize,
|
|
9091
|
+
expandColumn,
|
|
9092
|
+
checkboxColumn,
|
|
9093
|
+
radioColumn
|
|
9036
9094
|
} = reactData;
|
|
9037
9095
|
if (isDragResize) {
|
|
9038
9096
|
return;
|
|
@@ -9078,15 +9136,15 @@ const Methods = {
|
|
|
9078
9136
|
}, params);
|
|
9079
9137
|
if (!triggerCheckbox && !triggerRadio) {
|
|
9080
9138
|
// 如果是展开行
|
|
9081
|
-
if (!triggerExpandNode && (expandOpts.trigger === 'row' || isExpandType && expandOpts.trigger === 'cell')) {
|
|
9139
|
+
if (!triggerExpandNode && (expandColumn && expandOpts.trigger === 'row' || isExpandType && expandOpts.trigger === 'cell')) {
|
|
9082
9140
|
$xeTable.triggerRowExpandEvent(evnt, params);
|
|
9083
9141
|
}
|
|
9084
9142
|
// 如果是树形表格
|
|
9085
|
-
if (treeOpts.trigger === 'row' || treeNode && treeOpts.trigger === 'cell') {
|
|
9143
|
+
if (treeConfig && (treeOpts.trigger === 'row' || treeNode && treeOpts.trigger === 'cell')) {
|
|
9086
9144
|
$xeTable.triggerTreeExpandEvent(evnt, params);
|
|
9087
9145
|
}
|
|
9088
9146
|
// 如果是行分组
|
|
9089
|
-
if (aggregateOpts.trigger === 'row' || rowGroupNode && aggregateOpts.trigger === 'cell') {
|
|
9147
|
+
if ((aggregateConfig || rowGroupConfig) && (aggregateOpts.trigger === 'row' || rowGroupNode && aggregateOpts.trigger === 'cell')) {
|
|
9090
9148
|
$xeTable.triggerRowGroupExpandEvent(evnt, params);
|
|
9091
9149
|
}
|
|
9092
9150
|
}
|
|
@@ -9106,11 +9164,11 @@ const Methods = {
|
|
|
9106
9164
|
}
|
|
9107
9165
|
}
|
|
9108
9166
|
// 如果是单选框
|
|
9109
|
-
if (!triggerRadio && (radioOpts.trigger === 'row' || isRadioType && radioOpts.trigger === 'cell')) {
|
|
9167
|
+
if (!triggerRadio && (radioColumn && radioOpts.trigger === 'row' || isRadioType && radioOpts.trigger === 'cell')) {
|
|
9110
9168
|
$xeTable.triggerRadioRowEvent(evnt, params);
|
|
9111
9169
|
}
|
|
9112
9170
|
// 如果是复选框
|
|
9113
|
-
if (!triggerCheckbox && (checkboxOpts.trigger === 'row' || isCheckboxType && checkboxOpts.trigger === 'cell')) {
|
|
9171
|
+
if (!triggerCheckbox && (checkboxColumn && checkboxOpts.trigger === 'row' || isCheckboxType && checkboxOpts.trigger === 'cell')) {
|
|
9114
9172
|
$xeTable.handleToggleCheckRowEvent(evnt, params);
|
|
9115
9173
|
}
|
|
9116
9174
|
}
|
|
@@ -11686,6 +11744,7 @@ const Methods = {
|
|
|
11686
11744
|
}
|
|
11687
11745
|
(0, _dom.setScrollTop)(yHandleEl, scrollTop);
|
|
11688
11746
|
(0, _dom.setScrollTop)(rowExpandEl, scrollTop);
|
|
11747
|
+
syncGanttScrollTop($xeTable, scrollTop);
|
|
11689
11748
|
if (scrollYLoad) {
|
|
11690
11749
|
$xeTable.triggerScrollYEvent(evnt);
|
|
11691
11750
|
}
|
|
@@ -11914,6 +11973,7 @@ const Methods = {
|
|
|
11914
11973
|
(0, _dom.setScrollTop)(leftScrollElem, currTopNum);
|
|
11915
11974
|
(0, _dom.setScrollTop)(rightScrollElem, currTopNum);
|
|
11916
11975
|
(0, _dom.setScrollTop)(rowExpandEl, currTopNum);
|
|
11976
|
+
syncGanttScrollTop($xeTable, currTopNum);
|
|
11917
11977
|
if (scrollYLoad) {
|
|
11918
11978
|
$xeTable.triggerScrollYEvent(evnt);
|
|
11919
11979
|
}
|
|
@@ -11930,6 +11990,7 @@ const Methods = {
|
|
|
11930
11990
|
(0, _dom.setScrollTop)(leftScrollElem, currTopNum);
|
|
11931
11991
|
(0, _dom.setScrollTop)(rightScrollElem, currTopNum);
|
|
11932
11992
|
(0, _dom.setScrollTop)(rowExpandEl, currTopNum);
|
|
11993
|
+
syncGanttScrollTop($xeTable, currTopNum);
|
|
11933
11994
|
if (scrollYLoad) {
|
|
11934
11995
|
$xeTable.triggerScrollYEvent(evnt);
|
|
11935
11996
|
}
|
|
@@ -12031,6 +12092,7 @@ const Methods = {
|
|
|
12031
12092
|
(0, _dom.setScrollTop)(leftScrollElem, scrollTop);
|
|
12032
12093
|
(0, _dom.setScrollTop)(rightScrollElem, scrollTop);
|
|
12033
12094
|
(0, _dom.setScrollTop)(rowExpandEl, scrollTop);
|
|
12095
|
+
syncGanttScrollTop($xeTable, scrollTop);
|
|
12034
12096
|
if (scrollYLoad) {
|
|
12035
12097
|
$xeTable.triggerScrollYEvent(evnt);
|
|
12036
12098
|
}
|
|
@@ -12071,6 +12133,7 @@ const Methods = {
|
|
|
12071
12133
|
elemStore,
|
|
12072
12134
|
fullColumnIdData
|
|
12073
12135
|
} = internalData;
|
|
12136
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
12074
12137
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
12075
12138
|
const tableBody = $xeTable.$refs.refTableBody;
|
|
12076
12139
|
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
@@ -12131,10 +12194,13 @@ const Methods = {
|
|
|
12131
12194
|
if (scrollXSpaceEl) {
|
|
12132
12195
|
scrollXSpaceEl.style.width = `${ySpaceWidth}px`;
|
|
12133
12196
|
}
|
|
12197
|
+
calcScrollbar($xeTable);
|
|
12134
12198
|
if (isScrollXBig && mouseOpts.area) {
|
|
12135
12199
|
(0, _log.errLog)('vxe.error.notProp', ['mouse-config.area']);
|
|
12136
12200
|
}
|
|
12137
|
-
|
|
12201
|
+
if ($xeGanttView) {
|
|
12202
|
+
$xeGanttView.updateScrollXSpace();
|
|
12203
|
+
}
|
|
12138
12204
|
return $xeTable.$nextTick(() => {
|
|
12139
12205
|
updateStyle($xeTable);
|
|
12140
12206
|
});
|
|
@@ -12167,6 +12233,7 @@ const Methods = {
|
|
|
12167
12233
|
fullAllDataRowIdData,
|
|
12168
12234
|
rowExpandedMaps
|
|
12169
12235
|
} = internalData;
|
|
12236
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
12170
12237
|
const {
|
|
12171
12238
|
startIndex
|
|
12172
12239
|
} = scrollYStore;
|
|
@@ -12258,10 +12325,13 @@ const Methods = {
|
|
|
12258
12325
|
reactData.scrollYTop = scrollYTop;
|
|
12259
12326
|
reactData.scrollYHeight = scrollYHeight;
|
|
12260
12327
|
reactData.isScrollYBig = isScrollYBig;
|
|
12328
|
+
calcScrollbar($xeTable);
|
|
12261
12329
|
if (isScrollYBig && mouseOpts.area) {
|
|
12262
12330
|
(0, _log.errLog)('vxe.error.notProp', ['mouse-config.area']);
|
|
12263
12331
|
}
|
|
12264
|
-
|
|
12332
|
+
if ($xeGanttView) {
|
|
12333
|
+
$xeGanttView.updateScrollYSpace();
|
|
12334
|
+
}
|
|
12265
12335
|
return $xeTable.$nextTick().then(() => {
|
|
12266
12336
|
updateStyle($xeTable);
|
|
12267
12337
|
});
|
|
@@ -12659,12 +12729,23 @@ const Methods = {
|
|
|
12659
12729
|
this.isActivated = false;
|
|
12660
12730
|
return this.$nextTick();
|
|
12661
12731
|
},
|
|
12662
|
-
|
|
12732
|
+
/**
|
|
12733
|
+
* 已废弃,被 connectToolbar 替换
|
|
12734
|
+
* @deprecated
|
|
12735
|
+
*/
|
|
12663
12736
|
connect($toolbar) {
|
|
12737
|
+
return this.connectToolbar($toolbar);
|
|
12738
|
+
},
|
|
12739
|
+
/**
|
|
12740
|
+
* 连接工具栏
|
|
12741
|
+
* @param $toolbar
|
|
12742
|
+
*/
|
|
12743
|
+
connectToolbar($toolbar) {
|
|
12744
|
+
const $xeTable = this;
|
|
12664
12745
|
if ($toolbar && $toolbar.syncUpdate) {
|
|
12665
12746
|
$toolbar.syncUpdate({
|
|
12666
12747
|
collectColumn: this.collectColumn,
|
|
12667
|
-
$table:
|
|
12748
|
+
$table: $xeTable
|
|
12668
12749
|
});
|
|
12669
12750
|
this.$toolbar = $toolbar;
|
|
12670
12751
|
} else {
|
|
@@ -12672,6 +12753,17 @@ const Methods = {
|
|
|
12672
12753
|
}
|
|
12673
12754
|
return this.$nextTick();
|
|
12674
12755
|
},
|
|
12756
|
+
handleConnectGanttView($ganttView) {
|
|
12757
|
+
const $xeTable = this;
|
|
12758
|
+
const internalData = $xeTable;
|
|
12759
|
+
if ($ganttView && $ganttView.connectUpdate) {
|
|
12760
|
+
$ganttView.connectUpdate({
|
|
12761
|
+
$table: $xeTable
|
|
12762
|
+
});
|
|
12763
|
+
internalData.xeGanttView = $ganttView;
|
|
12764
|
+
}
|
|
12765
|
+
return $xeTable.$nextTick();
|
|
12766
|
+
},
|
|
12675
12767
|
/*************************
|
|
12676
12768
|
* Publish methods
|
|
12677
12769
|
*************************/
|