vxe-table 3.13.0-beta.9 → 3.13.0
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/style.css +1 -1
- package/es/table/src/methods.js +26 -7
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +32 -9
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/methods.js +30 -7
- package/lib/table/src/methods.min.js +1 -1
- package/lib/ui/index.js +1 -1
- 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 +2 -2
- package/packages/table/src/methods.ts +28 -7
- /package/es/{iconfont.1739785830473.ttf → iconfont.1739842422207.ttf} +0 -0
- /package/es/{iconfont.1739785830473.woff → iconfont.1739842422207.woff} +0 -0
- /package/es/{iconfont.1739785830473.woff2 → iconfont.1739842422207.woff2} +0 -0
- /package/lib/{iconfont.1739785830473.ttf → iconfont.1739842422207.ttf} +0 -0
- /package/lib/{iconfont.1739785830473.woff → iconfont.1739842422207.woff} +0 -0
- /package/lib/{iconfont.1739785830473.woff2 → iconfont.1739842422207.woff2} +0 -0
package/lib/table/src/methods.js
CHANGED
|
@@ -364,7 +364,11 @@ const updateScrollYStatus = ($xeTable, fullData) => {
|
|
|
364
364
|
return scrollYLoad;
|
|
365
365
|
};
|
|
366
366
|
function updateAfterListIndex($xeTable) {
|
|
367
|
+
const props = $xeTable;
|
|
367
368
|
const internalData = $xeTable;
|
|
369
|
+
const {
|
|
370
|
+
treeConfig
|
|
371
|
+
} = props;
|
|
368
372
|
const {
|
|
369
373
|
afterFullData,
|
|
370
374
|
fullDataRowIdData,
|
|
@@ -376,7 +380,9 @@ function updateAfterListIndex($xeTable) {
|
|
|
376
380
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
377
381
|
const seq = index + 1;
|
|
378
382
|
if (rowRest) {
|
|
379
|
-
|
|
383
|
+
if (!treeConfig) {
|
|
384
|
+
rowRest.seq = seq;
|
|
385
|
+
}
|
|
380
386
|
rowRest._index = index;
|
|
381
387
|
} else {
|
|
382
388
|
const rest = {
|
|
@@ -2243,6 +2249,17 @@ function updateRowExpandStyle($xeTable) {
|
|
|
2243
2249
|
}
|
|
2244
2250
|
}
|
|
2245
2251
|
}
|
|
2252
|
+
function handleRowExpandScroll($xeTable) {
|
|
2253
|
+
const internalData = $xeTable;
|
|
2254
|
+
const {
|
|
2255
|
+
elemStore
|
|
2256
|
+
} = internalData;
|
|
2257
|
+
const rowExpandEl = $xeTable.$refs.refRowExpandElem;
|
|
2258
|
+
const bodyScrollElem = (0, _util.getRefElem)(elemStore['main-body-scroll']);
|
|
2259
|
+
if (rowExpandEl && bodyScrollElem) {
|
|
2260
|
+
rowExpandEl.scrollTop = bodyScrollElem.scrollTop;
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2246
2263
|
const Methods = {
|
|
2247
2264
|
callSlot(slotFunc, params, h, vNodes) {
|
|
2248
2265
|
if (slotFunc) {
|
|
@@ -6325,7 +6342,7 @@ const Methods = {
|
|
|
6325
6342
|
const isSelected = sLen >= vLen;
|
|
6326
6343
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
|
|
6327
6344
|
if (checkField) {
|
|
6328
|
-
_xeUtils.default.
|
|
6345
|
+
_xeUtils.default.set(row, checkField, isSelected);
|
|
6329
6346
|
}
|
|
6330
6347
|
if (isSelected) {
|
|
6331
6348
|
if (!checkField) {
|
|
@@ -8561,7 +8578,7 @@ const Methods = {
|
|
|
8561
8578
|
fullAllDataRowIdData,
|
|
8562
8579
|
rowExpandLazyLoadedMaps,
|
|
8563
8580
|
expandOpts,
|
|
8564
|
-
expandColumn
|
|
8581
|
+
expandColumn
|
|
8565
8582
|
} = this;
|
|
8566
8583
|
let rExpandedMaps = Object.assign({}, rowExpandedMaps);
|
|
8567
8584
|
const {
|
|
@@ -8571,8 +8588,8 @@ const Methods = {
|
|
|
8571
8588
|
toggleMethod
|
|
8572
8589
|
} = expandOpts;
|
|
8573
8590
|
const lazyRests = [];
|
|
8574
|
-
const columnIndex =
|
|
8575
|
-
const $columnIndex =
|
|
8591
|
+
const columnIndex = $xeTable.getColumnIndex(expandColumn);
|
|
8592
|
+
const $columnIndex = $xeTable.getVMColumnIndex(expandColumn);
|
|
8576
8593
|
if (rows) {
|
|
8577
8594
|
if (!_xeUtils.default.isArray(rows)) {
|
|
8578
8595
|
rows = [rows];
|
|
@@ -8584,7 +8601,7 @@ const Methods = {
|
|
|
8584
8601
|
}
|
|
8585
8602
|
const validRows = toggleMethod ? rows.filter(row => toggleMethod({
|
|
8586
8603
|
expanded,
|
|
8587
|
-
column,
|
|
8604
|
+
column: expandColumn,
|
|
8588
8605
|
columnIndex,
|
|
8589
8606
|
$columnIndex,
|
|
8590
8607
|
row,
|
|
@@ -8617,7 +8634,13 @@ const Methods = {
|
|
|
8617
8634
|
}
|
|
8618
8635
|
}
|
|
8619
8636
|
this.rowExpandedMaps = rExpandedMaps;
|
|
8620
|
-
return Promise.all(lazyRests).then(() => $xeTable.recalculate()).then(() =>
|
|
8637
|
+
return Promise.all(lazyRests).then(() => $xeTable.recalculate()).then(() => {
|
|
8638
|
+
if (expandColumn) {
|
|
8639
|
+
updateRowExpandStyle($xeTable);
|
|
8640
|
+
handleRowExpandScroll($xeTable);
|
|
8641
|
+
}
|
|
8642
|
+
return $xeTable.updateCellAreas();
|
|
8643
|
+
});
|
|
8621
8644
|
},
|
|
8622
8645
|
/**
|
|
8623
8646
|
* 判断行是否为展开状态
|