vxe-table 3.13.0-beta.8 → 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/render/index.js +10 -0
- 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 +42 -9
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/render/index.js +10 -0
- package/lib/table/render/index.min.js +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/render/index.ts +10 -0
- package/packages/table/src/methods.ts +28 -7
- /package/es/{iconfont.1739778386006.ttf → iconfont.1739842422207.ttf} +0 -0
- /package/es/{iconfont.1739778386006.woff → iconfont.1739842422207.woff} +0 -0
- /package/es/{iconfont.1739778386006.woff2 → iconfont.1739842422207.woff2} +0 -0
- /package/lib/{iconfont.1739778386006.ttf → iconfont.1739842422207.ttf} +0 -0
- /package/lib/{iconfont.1739778386006.woff → iconfont.1739842422207.woff} +0 -0
- /package/lib/{iconfont.1739778386006.woff2 → iconfont.1739842422207.woff2} +0 -0
package/es/table/src/methods.js
CHANGED
|
@@ -295,7 +295,9 @@ const updateScrollYStatus = ($xeTable, fullData) => {
|
|
|
295
295
|
return scrollYLoad;
|
|
296
296
|
};
|
|
297
297
|
function updateAfterListIndex($xeTable) {
|
|
298
|
+
const props = $xeTable;
|
|
298
299
|
const internalData = $xeTable;
|
|
300
|
+
const { treeConfig } = props;
|
|
299
301
|
const { afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData;
|
|
300
302
|
const fullMaps = {};
|
|
301
303
|
afterFullData.forEach((row, index) => {
|
|
@@ -303,7 +305,9 @@ function updateAfterListIndex($xeTable) {
|
|
|
303
305
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
304
306
|
const seq = index + 1;
|
|
305
307
|
if (rowRest) {
|
|
306
|
-
|
|
308
|
+
if (!treeConfig) {
|
|
309
|
+
rowRest.seq = seq;
|
|
310
|
+
}
|
|
307
311
|
rowRest._index = index;
|
|
308
312
|
}
|
|
309
313
|
else {
|
|
@@ -1928,6 +1932,15 @@ function updateRowExpandStyle($xeTable) {
|
|
|
1928
1932
|
}
|
|
1929
1933
|
}
|
|
1930
1934
|
}
|
|
1935
|
+
function handleRowExpandScroll($xeTable) {
|
|
1936
|
+
const internalData = $xeTable;
|
|
1937
|
+
const { elemStore } = internalData;
|
|
1938
|
+
const rowExpandEl = $xeTable.$refs.refRowExpandElem;
|
|
1939
|
+
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
1940
|
+
if (rowExpandEl && bodyScrollElem) {
|
|
1941
|
+
rowExpandEl.scrollTop = bodyScrollElem.scrollTop;
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1931
1944
|
const Methods = {
|
|
1932
1945
|
callSlot(slotFunc, params, h, vNodes) {
|
|
1933
1946
|
if (slotFunc) {
|
|
@@ -5439,7 +5452,7 @@ const Methods = {
|
|
|
5439
5452
|
const isSelected = sLen >= vLen;
|
|
5440
5453
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
|
|
5441
5454
|
if (checkField) {
|
|
5442
|
-
XEUtils.
|
|
5455
|
+
XEUtils.set(row, checkField, isSelected);
|
|
5443
5456
|
}
|
|
5444
5457
|
if (isSelected) {
|
|
5445
5458
|
if (!checkField) {
|
|
@@ -7293,12 +7306,12 @@ const Methods = {
|
|
|
7293
7306
|
*/
|
|
7294
7307
|
setRowExpand(rows, expanded) {
|
|
7295
7308
|
const $xeTable = this;
|
|
7296
|
-
const { rowExpandedMaps, fullAllDataRowIdData, rowExpandLazyLoadedMaps, expandOpts, expandColumn
|
|
7309
|
+
const { rowExpandedMaps, fullAllDataRowIdData, rowExpandLazyLoadedMaps, expandOpts, expandColumn } = this;
|
|
7297
7310
|
let rExpandedMaps = Object.assign({}, rowExpandedMaps);
|
|
7298
7311
|
const { reserve, lazy, accordion, toggleMethod } = expandOpts;
|
|
7299
7312
|
const lazyRests = [];
|
|
7300
|
-
const columnIndex =
|
|
7301
|
-
const $columnIndex =
|
|
7313
|
+
const columnIndex = $xeTable.getColumnIndex(expandColumn);
|
|
7314
|
+
const $columnIndex = $xeTable.getVMColumnIndex(expandColumn);
|
|
7302
7315
|
if (rows) {
|
|
7303
7316
|
if (!XEUtils.isArray(rows)) {
|
|
7304
7317
|
rows = [rows];
|
|
@@ -7308,7 +7321,7 @@ const Methods = {
|
|
|
7308
7321
|
rExpandedMaps = {};
|
|
7309
7322
|
rows = rows.slice(rows.length - 1, rows.length);
|
|
7310
7323
|
}
|
|
7311
|
-
const validRows = toggleMethod ? rows.filter((row) => toggleMethod({ expanded, column, columnIndex, $columnIndex, row, rowIndex: this.getRowIndex(row), $rowIndex: this.getVMRowIndex(row) })) : rows;
|
|
7324
|
+
const validRows = toggleMethod ? rows.filter((row) => toggleMethod({ expanded, column: expandColumn, columnIndex, $columnIndex, row, rowIndex: this.getRowIndex(row), $rowIndex: this.getVMRowIndex(row) })) : rows;
|
|
7312
7325
|
if (expanded) {
|
|
7313
7326
|
validRows.forEach((row) => {
|
|
7314
7327
|
const rowid = getRowid(this, row);
|
|
@@ -7339,7 +7352,13 @@ const Methods = {
|
|
|
7339
7352
|
this.rowExpandedMaps = rExpandedMaps;
|
|
7340
7353
|
return Promise.all(lazyRests)
|
|
7341
7354
|
.then(() => $xeTable.recalculate())
|
|
7342
|
-
.then(() =>
|
|
7355
|
+
.then(() => {
|
|
7356
|
+
if (expandColumn) {
|
|
7357
|
+
updateRowExpandStyle($xeTable);
|
|
7358
|
+
handleRowExpandScroll($xeTable);
|
|
7359
|
+
}
|
|
7360
|
+
return $xeTable.updateCellAreas();
|
|
7361
|
+
});
|
|
7343
7362
|
},
|
|
7344
7363
|
/**
|
|
7345
7364
|
* 判断行是否为展开状态
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.13.0
|
|
2223
|
+
const version = "3.13.0";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2843,7 +2843,7 @@ function isNodeElement(elem) {
|
|
|
2843
2843
|
const {
|
|
2844
2844
|
log: log_log
|
|
2845
2845
|
} = core_.VxeUI;
|
|
2846
|
-
const log_version = `table v${"3.13.0
|
|
2846
|
+
const log_version = `table v${"3.13.0"}`;
|
|
2847
2847
|
const warnLog = log_log.create('warn', log_version);
|
|
2848
2848
|
const errLog = log_log.create('error', log_version);
|
|
2849
2849
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -5425,7 +5425,11 @@ const updateScrollYStatus = ($xeTable, fullData) => {
|
|
|
5425
5425
|
return scrollYLoad;
|
|
5426
5426
|
};
|
|
5427
5427
|
function updateAfterListIndex($xeTable) {
|
|
5428
|
+
const props = $xeTable;
|
|
5428
5429
|
const internalData = $xeTable;
|
|
5430
|
+
const {
|
|
5431
|
+
treeConfig
|
|
5432
|
+
} = props;
|
|
5429
5433
|
const {
|
|
5430
5434
|
afterFullData,
|
|
5431
5435
|
fullDataRowIdData,
|
|
@@ -5437,7 +5441,9 @@ function updateAfterListIndex($xeTable) {
|
|
|
5437
5441
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
5438
5442
|
const seq = index + 1;
|
|
5439
5443
|
if (rowRest) {
|
|
5440
|
-
|
|
5444
|
+
if (!treeConfig) {
|
|
5445
|
+
rowRest.seq = seq;
|
|
5446
|
+
}
|
|
5441
5447
|
rowRest._index = index;
|
|
5442
5448
|
} else {
|
|
5443
5449
|
const rest = {
|
|
@@ -7304,6 +7310,17 @@ function updateRowExpandStyle($xeTable) {
|
|
|
7304
7310
|
}
|
|
7305
7311
|
}
|
|
7306
7312
|
}
|
|
7313
|
+
function handleRowExpandScroll($xeTable) {
|
|
7314
|
+
const internalData = $xeTable;
|
|
7315
|
+
const {
|
|
7316
|
+
elemStore
|
|
7317
|
+
} = internalData;
|
|
7318
|
+
const rowExpandEl = $xeTable.$refs.refRowExpandElem;
|
|
7319
|
+
const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
|
|
7320
|
+
if (rowExpandEl && bodyScrollElem) {
|
|
7321
|
+
rowExpandEl.scrollTop = bodyScrollElem.scrollTop;
|
|
7322
|
+
}
|
|
7323
|
+
}
|
|
7307
7324
|
const Methods = {
|
|
7308
7325
|
callSlot(slotFunc, params, h, vNodes) {
|
|
7309
7326
|
if (slotFunc) {
|
|
@@ -11393,7 +11410,7 @@ const Methods = {
|
|
|
11393
11410
|
const isSelected = sLen >= vLen;
|
|
11394
11411
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
|
|
11395
11412
|
if (checkField) {
|
|
11396
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().
|
|
11413
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, checkField, isSelected);
|
|
11397
11414
|
}
|
|
11398
11415
|
if (isSelected) {
|
|
11399
11416
|
if (!checkField) {
|
|
@@ -13637,7 +13654,7 @@ const Methods = {
|
|
|
13637
13654
|
fullAllDataRowIdData,
|
|
13638
13655
|
rowExpandLazyLoadedMaps,
|
|
13639
13656
|
expandOpts,
|
|
13640
|
-
expandColumn
|
|
13657
|
+
expandColumn
|
|
13641
13658
|
} = this;
|
|
13642
13659
|
let rExpandedMaps = {
|
|
13643
13660
|
...rowExpandedMaps
|
|
@@ -13649,8 +13666,8 @@ const Methods = {
|
|
|
13649
13666
|
toggleMethod
|
|
13650
13667
|
} = expandOpts;
|
|
13651
13668
|
const lazyRests = [];
|
|
13652
|
-
const columnIndex =
|
|
13653
|
-
const $columnIndex =
|
|
13669
|
+
const columnIndex = $xeTable.getColumnIndex(expandColumn);
|
|
13670
|
+
const $columnIndex = $xeTable.getVMColumnIndex(expandColumn);
|
|
13654
13671
|
if (rows) {
|
|
13655
13672
|
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)) {
|
|
13656
13673
|
rows = [rows];
|
|
@@ -13662,7 +13679,7 @@ const Methods = {
|
|
|
13662
13679
|
}
|
|
13663
13680
|
const validRows = toggleMethod ? rows.filter(row => toggleMethod({
|
|
13664
13681
|
expanded,
|
|
13665
|
-
column,
|
|
13682
|
+
column: expandColumn,
|
|
13666
13683
|
columnIndex,
|
|
13667
13684
|
$columnIndex,
|
|
13668
13685
|
row,
|
|
@@ -13695,7 +13712,13 @@ const Methods = {
|
|
|
13695
13712
|
}
|
|
13696
13713
|
}
|
|
13697
13714
|
this.rowExpandedMaps = rExpandedMaps;
|
|
13698
|
-
return Promise.all(lazyRests).then(() => $xeTable.recalculate()).then(() =>
|
|
13715
|
+
return Promise.all(lazyRests).then(() => $xeTable.recalculate()).then(() => {
|
|
13716
|
+
if (expandColumn) {
|
|
13717
|
+
updateRowExpandStyle($xeTable);
|
|
13718
|
+
handleRowExpandScroll($xeTable);
|
|
13719
|
+
}
|
|
13720
|
+
return $xeTable.updateCellAreas();
|
|
13721
|
+
});
|
|
13699
13722
|
},
|
|
13700
13723
|
/**
|
|
13701
13724
|
* 判断行是否为展开状态
|
|
@@ -30294,6 +30317,11 @@ render_renderer.mixin({
|
|
|
30294
30317
|
tableFilterDefaultMethod: handleFilterMethod,
|
|
30295
30318
|
tableExportMethod: handleExportSelectMethod
|
|
30296
30319
|
},
|
|
30320
|
+
formatOption: {
|
|
30321
|
+
renderTableDefault(h, renderOpts, params) {
|
|
30322
|
+
return getCellLabelVNs(h, renderOpts, params, getSelectCellValue(renderOpts, params));
|
|
30323
|
+
}
|
|
30324
|
+
},
|
|
30297
30325
|
VxeTreeSelect: {
|
|
30298
30326
|
tableAutoFocus: 'input',
|
|
30299
30327
|
renderTableEdit: defaultTableOrTreeSelectEditRender,
|
|
@@ -30310,6 +30338,11 @@ render_renderer.mixin({
|
|
|
30310
30338
|
},
|
|
30311
30339
|
tableExportMethod: handleExportTreeSelectMethod
|
|
30312
30340
|
},
|
|
30341
|
+
formatTree: {
|
|
30342
|
+
renderTableDefault(h, renderOpts, params) {
|
|
30343
|
+
return getCellLabelVNs(h, renderOpts, params, getTreeSelectCellValue(renderOpts, params));
|
|
30344
|
+
}
|
|
30345
|
+
},
|
|
30313
30346
|
VxeColorPicker: {
|
|
30314
30347
|
tableAutoFocus: 'input',
|
|
30315
30348
|
renderTableEdit(h, renderOpts, params) {
|