vxe-table 3.17.0-beta.11 → 3.17.0-beta.13
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 +51 -6
- package/es/style.css +1 -1
- package/es/table/module/edit/mixin.js +5 -5
- package/es/table/src/body.js +7 -6
- package/es/table/src/methods.js +8 -5
- package/es/table/src/table.js +6 -5
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +61 -6
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +89 -20
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/mixin.js +5 -0
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/src/body.js +7 -6
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +8 -1
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +6 -5
- package/lib/table/src/table.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/grid/src/grid.ts +58 -6
- package/packages/table/module/edit/mixin.ts +5 -5
- package/packages/table/src/body.ts +7 -6
- package/packages/table/src/methods.ts +8 -5
- package/packages/table/src/props.ts +1 -1
- package/packages/table/src/table.ts +6 -5
- /package/es/{iconfont.1753525681135.ttf → iconfont.1753775808744.ttf} +0 -0
- /package/es/{iconfont.1753525681135.woff → iconfont.1753775808744.woff} +0 -0
- /package/es/{iconfont.1753525681135.woff2 → iconfont.1753775808744.woff2} +0 -0
- /package/lib/{iconfont.1753525681135.ttf → iconfont.1753775808744.ttf} +0 -0
- /package/lib/{iconfont.1753525681135.woff → iconfont.1753775808744.woff} +0 -0
- /package/lib/{iconfont.1753525681135.woff2 → iconfont.1753775808744.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2002,7 +2002,7 @@ function getClass(property, params) {
|
|
|
2002
2002
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2003
2003
|
|
|
2004
2004
|
|
|
2005
|
-
const version = "3.17.0-beta.
|
|
2005
|
+
const version = "3.17.0-beta.13";
|
|
2006
2006
|
core_.VxeUI.version = version;
|
|
2007
2007
|
core_.VxeUI.tableVersion = version;
|
|
2008
2008
|
core_.VxeUI.setConfig({
|
|
@@ -2668,7 +2668,7 @@ function isNodeElement(elem) {
|
|
|
2668
2668
|
const {
|
|
2669
2669
|
log: log_log
|
|
2670
2670
|
} = core_.VxeUI;
|
|
2671
|
-
const log_version = `table v${"3.17.0-beta.
|
|
2671
|
+
const log_version = `table v${"3.17.0-beta.13"}`;
|
|
2672
2672
|
const warnLog = log_log.create('warn', log_version);
|
|
2673
2673
|
const errLog = log_log.create('error', log_version);
|
|
2674
2674
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -5888,6 +5888,7 @@ function updateAfterListIndex($xeTable) {
|
|
|
5888
5888
|
$index: -1,
|
|
5889
5889
|
_index: index,
|
|
5890
5890
|
treeIndex: -1,
|
|
5891
|
+
_tIndex: -1,
|
|
5891
5892
|
items: [],
|
|
5892
5893
|
parent: null,
|
|
5893
5894
|
level: 0,
|
|
@@ -5926,6 +5927,7 @@ function updateAfterDataIndex($xeTable) {
|
|
|
5926
5927
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
5927
5928
|
const fullMaps = {};
|
|
5928
5929
|
if (treeConfig) {
|
|
5930
|
+
let _treeIndex = 0;
|
|
5929
5931
|
const {
|
|
5930
5932
|
handleGetRowId
|
|
5931
5933
|
} = createHandleGetRowId($xeTable);
|
|
@@ -5936,6 +5938,7 @@ function updateAfterDataIndex($xeTable) {
|
|
|
5936
5938
|
if (rowRest) {
|
|
5937
5939
|
rowRest.seq = seq;
|
|
5938
5940
|
rowRest.treeIndex = index;
|
|
5941
|
+
rowRest._tIndex = _treeIndex;
|
|
5939
5942
|
} else {
|
|
5940
5943
|
const rest = {
|
|
5941
5944
|
row,
|
|
@@ -5945,6 +5948,7 @@ function updateAfterDataIndex($xeTable) {
|
|
|
5945
5948
|
$index: -1,
|
|
5946
5949
|
_index: -1,
|
|
5947
5950
|
treeIndex: -1,
|
|
5951
|
+
_tIndex: _treeIndex,
|
|
5948
5952
|
items: [],
|
|
5949
5953
|
parent: null,
|
|
5950
5954
|
level: 0,
|
|
@@ -5956,6 +5960,7 @@ function updateAfterDataIndex($xeTable) {
|
|
|
5956
5960
|
fullAllDataRowIdData[rowid] = rest;
|
|
5957
5961
|
fullDataRowIdData[rowid] = rest;
|
|
5958
5962
|
}
|
|
5963
|
+
_treeIndex++;
|
|
5959
5964
|
fullMaps[rowid] = row;
|
|
5960
5965
|
}, {
|
|
5961
5966
|
children: transform ? treeOpts.mapChildrenField : childrenField
|
|
@@ -7918,7 +7923,7 @@ const calcCellHeight = $xeTable => {
|
|
|
7918
7923
|
} = internalData;
|
|
7919
7924
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
7920
7925
|
const el = $xeTable.$refs.refElem;
|
|
7921
|
-
if (!isAllOverflow && scrollYLoad && el) {
|
|
7926
|
+
if (!isAllOverflow && (scrollYLoad || scrollXLoad) && el) {
|
|
7922
7927
|
const {
|
|
7923
7928
|
handleGetRowId
|
|
7924
7929
|
} = createHandleGetRowId($xeTable);
|
|
@@ -9855,6 +9860,7 @@ const Methods = {
|
|
|
9855
9860
|
_index: -1,
|
|
9856
9861
|
$index: -1,
|
|
9857
9862
|
treeIndex: index,
|
|
9863
|
+
_tIndex: -1,
|
|
9858
9864
|
items,
|
|
9859
9865
|
parent: parentRow,
|
|
9860
9866
|
level,
|
|
@@ -9998,6 +10004,7 @@ const Methods = {
|
|
|
9998
10004
|
_index: -1,
|
|
9999
10005
|
$index: -1,
|
|
10000
10006
|
treeIndex: -1,
|
|
10007
|
+
_tIndex: -1,
|
|
10001
10008
|
items,
|
|
10002
10009
|
parent: parentRow,
|
|
10003
10010
|
level: parentLevel + nodes.length,
|
|
@@ -18076,7 +18083,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
|
|
|
18076
18083
|
if (!fixedHiddenColumn && editConfig && (editRender || cellRender) && (editOpts.showStatus || editOpts.showUpdateStatus)) {
|
|
18077
18084
|
isDirty = $xeTable.isUpdateByRow(row, column.field);
|
|
18078
18085
|
}
|
|
18079
|
-
const isVNAutoHeight =
|
|
18086
|
+
const isVNAutoHeight = !hasEllipsis && (scrollYLoad || scrollXLoad);
|
|
18080
18087
|
let cellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
18081
18088
|
const isLastColumn = $columnIndex === columns.length - 1;
|
|
18082
18089
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
@@ -18112,7 +18119,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
|
|
|
18112
18119
|
}
|
|
18113
18120
|
tcStyle.width = `${column.renderWidth + mergeColWidth - cellOffsetWidth}px`;
|
|
18114
18121
|
}
|
|
18115
|
-
if (scrollYLoad || hasEllipsis || isCsHeight || isRsHeight) {
|
|
18122
|
+
if (scrollYLoad || scrollXLoad || hasEllipsis || isCsHeight || isRsHeight) {
|
|
18116
18123
|
tcStyle.height = `${cellHeight}px`;
|
|
18117
18124
|
} else {
|
|
18118
18125
|
tcStyle.minHeight = `${cellHeight}px`;
|
|
@@ -18304,14 +18311,15 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
|
|
|
18304
18311
|
};
|
|
18305
18312
|
}
|
|
18306
18313
|
if (rowRest) {
|
|
18314
|
+
rowIndex = rowRest.index;
|
|
18315
|
+
_rowIndex = rowRest._index;
|
|
18307
18316
|
rowLevel = rowRest.level;
|
|
18317
|
+
seq = rowRest.seq;
|
|
18308
18318
|
if (hasRowGroupAggregate || treeConfig && transform && seqMode === 'increasing') {
|
|
18309
18319
|
seq = rowRest._index + 1;
|
|
18310
|
-
} else {
|
|
18311
|
-
seq = rowRest.
|
|
18320
|
+
} else if (treeConfig && seqMode === 'fixed') {
|
|
18321
|
+
seq = rowRest._tIndex + 1;
|
|
18312
18322
|
}
|
|
18313
|
-
rowIndex = rowRest.index;
|
|
18314
|
-
_rowIndex = rowRest._index;
|
|
18315
18323
|
}
|
|
18316
18324
|
const params = {
|
|
18317
18325
|
$table: $xeTable,
|
|
@@ -23228,6 +23236,7 @@ function insertTreeRow($xeTable, newRecords, isAppend) {
|
|
|
23228
23236
|
_index: -1,
|
|
23229
23237
|
$index: -1,
|
|
23230
23238
|
treeIndex: -1,
|
|
23239
|
+
_tIndex: -1,
|
|
23231
23240
|
items: parentChilds,
|
|
23232
23241
|
parent: parentRow,
|
|
23233
23242
|
level: parentLevel + 1,
|
|
@@ -23252,6 +23261,7 @@ function insertTreeRow($xeTable, newRecords, isAppend) {
|
|
|
23252
23261
|
_index: -1,
|
|
23253
23262
|
$index: -1,
|
|
23254
23263
|
treeIndex: -1,
|
|
23264
|
+
_tIndex: -1,
|
|
23255
23265
|
items: tableFullTreeData,
|
|
23256
23266
|
parent: null,
|
|
23257
23267
|
level: 0,
|
|
@@ -23322,6 +23332,7 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
23322
23332
|
_index: -1,
|
|
23323
23333
|
$index: -1,
|
|
23324
23334
|
treeIndex: -1,
|
|
23335
|
+
_tIndex: -1,
|
|
23325
23336
|
items: afterFullData,
|
|
23326
23337
|
parent: null,
|
|
23327
23338
|
level: 0,
|
|
@@ -23368,6 +23379,7 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
23368
23379
|
_index: -1,
|
|
23369
23380
|
$index: -1,
|
|
23370
23381
|
treeIndex: -1,
|
|
23382
|
+
_tIndex: -1,
|
|
23371
23383
|
items: afterFullData,
|
|
23372
23384
|
parent: null,
|
|
23373
23385
|
level: 0,
|
|
@@ -23418,6 +23430,7 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
23418
23430
|
_index: -1,
|
|
23419
23431
|
$index: -1,
|
|
23420
23432
|
treeIndex: -1,
|
|
23433
|
+
_tIndex: -1,
|
|
23421
23434
|
items: parentMapChilds,
|
|
23422
23435
|
parent: parentRow,
|
|
23423
23436
|
level: parentLevel + 1,
|
|
@@ -28207,15 +28220,16 @@ function renderRowExpandedVNs(h, $xeTable) {
|
|
|
28207
28220
|
let rowIndex = -1;
|
|
28208
28221
|
let $rowIndex = -1;
|
|
28209
28222
|
if (rowRest) {
|
|
28223
|
+
rowIndex = rowRest.index;
|
|
28224
|
+
$rowIndex = rowRest.$index;
|
|
28225
|
+
_rowIndex = rowRest._index;
|
|
28210
28226
|
rowLevel = rowRest.level;
|
|
28227
|
+
seq = rowRest.seq;
|
|
28211
28228
|
if (isRowGroupStatus || treeConfig && transform && seqMode === 'increasing') {
|
|
28212
28229
|
seq = rowRest._index + 1;
|
|
28213
|
-
} else {
|
|
28214
|
-
seq = rowRest.
|
|
28230
|
+
} else if (treeConfig && seqMode === 'fixed') {
|
|
28231
|
+
seq = rowRest._tIndex + 1;
|
|
28215
28232
|
}
|
|
28216
|
-
rowIndex = rowRest.index;
|
|
28217
|
-
$rowIndex = rowRest.$index;
|
|
28218
|
-
_rowIndex = rowRest._index;
|
|
28219
28233
|
}
|
|
28220
28234
|
if (expandHeight) {
|
|
28221
28235
|
cellStyle.height = `${expandHeight}px`;
|
|
@@ -31374,6 +31388,14 @@ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default(
|
|
|
31374
31388
|
const pagerOpts = $xeGrid.computePagerOpts;
|
|
31375
31389
|
return pagerOpts.total;
|
|
31376
31390
|
},
|
|
31391
|
+
computePageCount() {
|
|
31392
|
+
const $xeGrid = this;
|
|
31393
|
+
const reactData = $xeGrid.reactData;
|
|
31394
|
+
const {
|
|
31395
|
+
tablePage
|
|
31396
|
+
} = reactData;
|
|
31397
|
+
return Math.max(Math.ceil(tablePage.total / tablePage.pageSize), 1);
|
|
31398
|
+
},
|
|
31377
31399
|
computeIsLoading() {
|
|
31378
31400
|
const $xeGrid = this;
|
|
31379
31401
|
const props = $xeGrid;
|
|
@@ -31463,7 +31485,7 @@ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default(
|
|
|
31463
31485
|
tablePage.pageSize = pageSize;
|
|
31464
31486
|
}
|
|
31465
31487
|
if (total) {
|
|
31466
|
-
tablePage.
|
|
31488
|
+
tablePage.total = total;
|
|
31467
31489
|
}
|
|
31468
31490
|
}
|
|
31469
31491
|
}
|
|
@@ -32204,29 +32226,71 @@ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default(
|
|
|
32204
32226
|
return $xeGrid.$nextTick();
|
|
32205
32227
|
},
|
|
32206
32228
|
homePage() {
|
|
32229
|
+
const $xeGrid = this;
|
|
32230
|
+
const reactData = $xeGrid.reactData;
|
|
32231
|
+
const {
|
|
32232
|
+
tablePage
|
|
32233
|
+
} = reactData;
|
|
32234
|
+
tablePage.currentPage = 1;
|
|
32235
|
+
return $xeGrid.$nextTick();
|
|
32236
|
+
},
|
|
32237
|
+
homePageByEvent(evnt) {
|
|
32207
32238
|
const $xeGrid = this;
|
|
32208
32239
|
const $pager = $xeGrid.$refs.refPager;
|
|
32209
32240
|
if ($pager) {
|
|
32210
|
-
|
|
32241
|
+
$pager.homePageByEvent(evnt);
|
|
32211
32242
|
}
|
|
32212
|
-
return $xeGrid.$nextTick();
|
|
32213
32243
|
},
|
|
32214
32244
|
endPage() {
|
|
32245
|
+
const $xeGrid = this;
|
|
32246
|
+
const reactData = $xeGrid.reactData;
|
|
32247
|
+
const {
|
|
32248
|
+
tablePage
|
|
32249
|
+
} = reactData;
|
|
32250
|
+
const pageCount = $xeGrid.computePageCount;
|
|
32251
|
+
tablePage.currentPage = pageCount;
|
|
32252
|
+
return $xeGrid.$nextTick();
|
|
32253
|
+
},
|
|
32254
|
+
endPageByEvent(evnt) {
|
|
32215
32255
|
const $xeGrid = this;
|
|
32216
32256
|
const $pager = $xeGrid.$refs.refPager;
|
|
32217
32257
|
if ($pager) {
|
|
32218
|
-
|
|
32258
|
+
$pager.endPageByEvent(evnt);
|
|
32219
32259
|
}
|
|
32260
|
+
},
|
|
32261
|
+
setCurrentPage(currentPage) {
|
|
32262
|
+
const $xeGrid = this;
|
|
32263
|
+
const reactData = $xeGrid.reactData;
|
|
32264
|
+
const {
|
|
32265
|
+
tablePage
|
|
32266
|
+
} = reactData;
|
|
32267
|
+
const pageCount = $xeGrid.computePageCount;
|
|
32268
|
+
tablePage.currentPage = Math.min(pageCount, Math.max(1, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(currentPage)));
|
|
32220
32269
|
return $xeGrid.$nextTick();
|
|
32221
32270
|
},
|
|
32222
|
-
|
|
32271
|
+
setCurrentPageByEvent(evnt, currentPage) {
|
|
32223
32272
|
const $xeGrid = this;
|
|
32224
32273
|
const $pager = $xeGrid.$refs.refPager;
|
|
32225
32274
|
if ($pager) {
|
|
32226
|
-
|
|
32275
|
+
$pager.setCurrentPageByEvent(evnt, currentPage);
|
|
32227
32276
|
}
|
|
32277
|
+
},
|
|
32278
|
+
setPageSize(pageSize) {
|
|
32279
|
+
const $xeGrid = this;
|
|
32280
|
+
const reactData = $xeGrid.reactData;
|
|
32281
|
+
const {
|
|
32282
|
+
tablePage
|
|
32283
|
+
} = reactData;
|
|
32284
|
+
tablePage.pageSize = Math.max(1, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(pageSize));
|
|
32228
32285
|
return $xeGrid.$nextTick();
|
|
32229
32286
|
},
|
|
32287
|
+
setPageSizeByEvent(evnt, pageSize) {
|
|
32288
|
+
const $xeGrid = this;
|
|
32289
|
+
const $pager = $xeGrid.$refs.refPager;
|
|
32290
|
+
if ($pager) {
|
|
32291
|
+
$pager.setPageSizeByEvent(evnt, pageSize);
|
|
32292
|
+
}
|
|
32293
|
+
},
|
|
32230
32294
|
triggerToolbarCommitEvent(params, evnt) {
|
|
32231
32295
|
const $xeGrid = this;
|
|
32232
32296
|
const {
|
|
@@ -32407,6 +32471,11 @@ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default(
|
|
|
32407
32471
|
type: reactData.isZMax ? 'max' : 'revert'
|
|
32408
32472
|
}, evnt);
|
|
32409
32473
|
},
|
|
32474
|
+
getParams() {
|
|
32475
|
+
const $xeGrid = this;
|
|
32476
|
+
const props = $xeGrid;
|
|
32477
|
+
return props.params;
|
|
32478
|
+
},
|
|
32410
32479
|
zoom() {
|
|
32411
32480
|
const $xeGrid = this;
|
|
32412
32481
|
const reactData = $xeGrid.reactData;
|