vxe-table 3.4.7-beta.1 → 3.4.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/lib/edit/src/mixin.js +12 -4
- package/lib/edit/src/mixin.min.js +1 -1
- package/lib/export/src/mixin.js +4 -8
- package/lib/export/src/mixin.min.js +1 -1
- package/lib/index.umd.js +214 -130
- package/lib/index.umd.min.js +1 -1
- package/lib/table/src/body.js +23 -8
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +167 -103
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/util.js +11 -7
- package/lib/table/src/util.min.js +1 -1
- package/lib/validator/src/mixin.js +1 -1
- package/lib/validator/src/mixin.min.js +1 -1
- package/package.json +2 -3
- package/packages/edit/src/mixin.js +8 -4
- package/packages/export/src/mixin.js +5 -8
- package/packages/table/src/body.js +18 -8
- package/packages/table/src/methods.js +96 -48
- package/packages/table/src/util.js +9 -6
- package/packages/validator/src/mixin.js +1 -1
- package/types/table.d.ts +1 -0
package/lib/index.umd.js
CHANGED
|
@@ -10851,9 +10851,14 @@ function getColMinWidth(params) {
|
|
|
10851
10851
|
}
|
|
10852
10852
|
|
|
10853
10853
|
function countTreeExpand(prevRow, params) {
|
|
10854
|
+
var count = 1;
|
|
10855
|
+
|
|
10856
|
+
if (!prevRow) {
|
|
10857
|
+
return count;
|
|
10858
|
+
}
|
|
10859
|
+
|
|
10854
10860
|
var $table = params.$table;
|
|
10855
10861
|
var rowChildren = prevRow[$table.treeOpts.children];
|
|
10856
|
-
var count = 1;
|
|
10857
10862
|
|
|
10858
10863
|
if ($table.isTreeExpandByRow(prevRow)) {
|
|
10859
10864
|
for (var index = 0; index < rowChildren.length; index++) {
|
|
@@ -10867,16 +10872,15 @@ function countTreeExpand(prevRow, params) {
|
|
|
10867
10872
|
function getOffsetSize($xetable) {
|
|
10868
10873
|
return lineOffsetSizes[$xetable.vSize] || 0;
|
|
10869
10874
|
}
|
|
10870
|
-
function calcTreeLine(params, items) {
|
|
10871
|
-
var $table = params.$table
|
|
10872
|
-
$rowIndex = params.$rowIndex;
|
|
10875
|
+
function calcTreeLine(params, items, rIndex) {
|
|
10876
|
+
var $table = params.$table;
|
|
10873
10877
|
var expandSize = 1;
|
|
10874
10878
|
|
|
10875
|
-
if (
|
|
10876
|
-
expandSize = countTreeExpand(items[
|
|
10879
|
+
if (rIndex) {
|
|
10880
|
+
expandSize = countTreeExpand(items[rIndex - 1], params);
|
|
10877
10881
|
}
|
|
10878
10882
|
|
|
10879
|
-
return $table.rowHeight * expandSize - (
|
|
10883
|
+
return $table.rowHeight * expandSize - (rIndex ? 1 : 12 - getOffsetSize($table));
|
|
10880
10884
|
}
|
|
10881
10885
|
function mergeBodyMethod(mergeList, _rowIndex, _columnIndex) {
|
|
10882
10886
|
for (var mIndex = 0; mIndex < mergeList.length; mIndex++) {
|
|
@@ -10970,12 +10974,25 @@ function isOperateMouse($xetable) {
|
|
|
10970
10974
|
return $xetable._isResize || $xetable.lastScrollTime && Date.now() < $xetable.lastScrollTime + $xetable.delayHover;
|
|
10971
10975
|
}
|
|
10972
10976
|
|
|
10973
|
-
function renderLine(h, _vm, $xetable,
|
|
10974
|
-
var
|
|
10977
|
+
function renderLine(h, _vm, $xetable, params) {
|
|
10978
|
+
var row = params.row,
|
|
10979
|
+
column = params.column;
|
|
10975
10980
|
var treeOpts = $xetable.treeOpts,
|
|
10976
|
-
treeConfig = $xetable.treeConfig
|
|
10981
|
+
treeConfig = $xetable.treeConfig,
|
|
10982
|
+
fullAllDataRowIdData = $xetable.fullAllDataRowIdData;
|
|
10977
10983
|
var slots = column.slots,
|
|
10978
10984
|
treeNode = column.treeNode;
|
|
10985
|
+
var rowid = UtilTools.getRowid($xetable, row);
|
|
10986
|
+
var rest = fullAllDataRowIdData[rowid];
|
|
10987
|
+
var rLevel = 0;
|
|
10988
|
+
var rIndex = 0;
|
|
10989
|
+
var items = [];
|
|
10990
|
+
|
|
10991
|
+
if (rest) {
|
|
10992
|
+
rLevel = rest.level;
|
|
10993
|
+
rIndex = rest._index;
|
|
10994
|
+
items = rest.items;
|
|
10995
|
+
}
|
|
10979
10996
|
|
|
10980
10997
|
if (slots && slots.line) {
|
|
10981
10998
|
return $xetable.callSlot(slots.line, params, h);
|
|
@@ -10987,8 +11004,8 @@ function renderLine(h, _vm, $xetable, rowLevel, items, params) {
|
|
|
10987
11004
|
}, [h('div', {
|
|
10988
11005
|
class: 'vxe-tree--line',
|
|
10989
11006
|
style: {
|
|
10990
|
-
height: "".concat(calcTreeLine(params, items), "px"),
|
|
10991
|
-
left: "".concat(
|
|
11007
|
+
height: "".concat(calcTreeLine(params, items, rIndex), "px"),
|
|
11008
|
+
left: "".concat(rLevel * treeOpts.indent + (rLevel ? 2 - getOffsetSize($xetable) : 0) + 16, "px")
|
|
10992
11009
|
}
|
|
10993
11010
|
})])];
|
|
10994
11011
|
}
|
|
@@ -11223,7 +11240,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
|
|
|
11223
11240
|
}));
|
|
11224
11241
|
} else {
|
|
11225
11242
|
// 渲染单元格
|
|
11226
|
-
tdVNs.push.apply(tdVNs, _toConsumableArray(renderLine(h, _vm, $xetable,
|
|
11243
|
+
tdVNs.push.apply(tdVNs, _toConsumableArray(renderLine(h, _vm, $xetable, params)).concat([h('div', {
|
|
11227
11244
|
class: ['vxe-cell', {
|
|
11228
11245
|
'c--title': showTitle,
|
|
11229
11246
|
'c--tooltip': showTooltip,
|
|
@@ -11279,7 +11296,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
|
|
|
11279
11296
|
checkboxOpts = $xetable.checkboxOpts,
|
|
11280
11297
|
expandColumn = $xetable.expandColumn,
|
|
11281
11298
|
hasFixedColumn = $xetable.hasFixedColumn,
|
|
11282
|
-
|
|
11299
|
+
fullAllDataRowIdData = $xetable.fullAllDataRowIdData,
|
|
11283
11300
|
rowOpts = $xetable.rowOpts;
|
|
11284
11301
|
var rows = [];
|
|
11285
11302
|
tableData.forEach(function (row, $rowIndex) {
|
|
@@ -11313,7 +11330,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
|
|
|
11313
11330
|
}
|
|
11314
11331
|
|
|
11315
11332
|
var rowid = UtilTools.getRowid($xetable, row);
|
|
11316
|
-
var rest =
|
|
11333
|
+
var rest = fullAllDataRowIdData[rowid];
|
|
11317
11334
|
var rowLevel = rest ? rest.level : 0;
|
|
11318
11335
|
var seq = rest ? rest.seq : -1;
|
|
11319
11336
|
var params = {
|
|
@@ -13216,7 +13233,7 @@ var Methods = {
|
|
|
13216
13233
|
},
|
|
13217
13234
|
|
|
13218
13235
|
/**
|
|
13219
|
-
* 同步 data
|
|
13236
|
+
* 同步 data 数据(即将废弃)
|
|
13220
13237
|
* 如果用了该方法,那么组件将不再记录增删改的状态,只能自行实现对应逻辑
|
|
13221
13238
|
* 对于某些特殊的场景,比如深层树节点元素发生变动时可能会用到
|
|
13222
13239
|
*/
|
|
@@ -13241,31 +13258,17 @@ var Methods = {
|
|
|
13241
13258
|
handleTableData: function handleTableData(force) {
|
|
13242
13259
|
var _this2 = this;
|
|
13243
13260
|
|
|
13244
|
-
var
|
|
13245
|
-
scrollYLoad = this.scrollYLoad,
|
|
13261
|
+
var scrollYLoad = this.scrollYLoad,
|
|
13246
13262
|
scrollYStore = this.scrollYStore,
|
|
13247
13263
|
fullDataRowIdData = this.fullDataRowIdData,
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
var fullList = []; // 是否进行数据处理
|
|
13264
|
+
afterFullData = this.afterFullData;
|
|
13265
|
+
var fullList = afterFullData; // 是否进行数据处理
|
|
13251
13266
|
|
|
13252
13267
|
if (force) {
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
|
|
13268
|
+
// 更新数据,处理筛选和排序
|
|
13269
|
+
this.updateAfterFullData(); // 如果为虚拟树,将树结构拍平
|
|
13256
13270
|
|
|
13257
|
-
|
|
13258
|
-
var expandMaps = new Map();
|
|
13259
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(this.afterTreeFullData, function (row, index, items, path, parent) {
|
|
13260
|
-
if (!parent || expandMaps.has(parent) && treeExpandeds.indexOf(parent) > -1) {
|
|
13261
|
-
expandMaps.set(row, 1);
|
|
13262
|
-
fullList.push(row);
|
|
13263
|
-
}
|
|
13264
|
-
}, {
|
|
13265
|
-
children: treeOpts.mapChildren
|
|
13266
|
-
});
|
|
13267
|
-
} else {
|
|
13268
|
-
fullList = this.afterFullData;
|
|
13271
|
+
fullList = this.handleVirtualTreeToList();
|
|
13269
13272
|
}
|
|
13270
13273
|
|
|
13271
13274
|
var tableData = scrollYLoad ? fullList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullList.slice(0);
|
|
@@ -13609,7 +13612,9 @@ var Methods = {
|
|
|
13609
13612
|
fullDataRowMap = this.fullDataRowMap,
|
|
13610
13613
|
fullAllDataRowMap = this.fullAllDataRowMap,
|
|
13611
13614
|
fullAllDataRowIdData = this.fullAllDataRowIdData;
|
|
13612
|
-
var
|
|
13615
|
+
var transform = treeOpts.transform,
|
|
13616
|
+
children = treeOpts.children,
|
|
13617
|
+
mapChildren = treeOpts.mapChildren;
|
|
13613
13618
|
var rest = fullAllDataRowIdData[methods_getRowid(this, row)];
|
|
13614
13619
|
var parentLevel = rest ? rest.level : 0;
|
|
13615
13620
|
return this.createData(childRecords).then(function (rows) {
|
|
@@ -13643,6 +13648,11 @@ var Methods = {
|
|
|
13643
13648
|
fullAllDataRowMap.set(childRow, rest);
|
|
13644
13649
|
}, treeOpts);
|
|
13645
13650
|
row[children] = rows;
|
|
13651
|
+
|
|
13652
|
+
if (transform) {
|
|
13653
|
+
row[mapChildren] = rows;
|
|
13654
|
+
}
|
|
13655
|
+
|
|
13646
13656
|
return rows;
|
|
13647
13657
|
});
|
|
13648
13658
|
},
|
|
@@ -14237,6 +14247,36 @@ var Methods = {
|
|
|
14237
14247
|
return rowList;
|
|
14238
14248
|
},
|
|
14239
14249
|
|
|
14250
|
+
/**
|
|
14251
|
+
* 如果为虚拟树,将树结构拍平
|
|
14252
|
+
* @returns
|
|
14253
|
+
*/
|
|
14254
|
+
handleVirtualTreeToList: function handleVirtualTreeToList() {
|
|
14255
|
+
var treeOpts = this.treeOpts,
|
|
14256
|
+
treeConfig = this.treeConfig,
|
|
14257
|
+
treeExpandeds = this.treeExpandeds,
|
|
14258
|
+
afterTreeFullData = this.afterTreeFullData,
|
|
14259
|
+
afterFullData = this.afterFullData;
|
|
14260
|
+
|
|
14261
|
+
if (treeConfig && treeOpts.transform) {
|
|
14262
|
+
var fullData = [];
|
|
14263
|
+
var expandMaps = new Map();
|
|
14264
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(afterTreeFullData, function (row, index, items, path, parent) {
|
|
14265
|
+
if (!parent || expandMaps.has(parent) && treeExpandeds.indexOf(parent) > -1) {
|
|
14266
|
+
expandMaps.set(row, 1);
|
|
14267
|
+
fullData.push(row);
|
|
14268
|
+
}
|
|
14269
|
+
}, {
|
|
14270
|
+
children: treeOpts.mapChildren
|
|
14271
|
+
});
|
|
14272
|
+
this.afterFullData = fullData;
|
|
14273
|
+
this.updateScrollYStatus(fullData);
|
|
14274
|
+
return fullData;
|
|
14275
|
+
}
|
|
14276
|
+
|
|
14277
|
+
return afterFullData;
|
|
14278
|
+
},
|
|
14279
|
+
|
|
14240
14280
|
/**
|
|
14241
14281
|
* 获取处理后全量的表格数据
|
|
14242
14282
|
* 如果存在筛选条件,继续处理
|
|
@@ -14360,58 +14400,91 @@ var Methods = {
|
|
|
14360
14400
|
};
|
|
14361
14401
|
|
|
14362
14402
|
if (treeConfig && transform) {
|
|
14403
|
+
// 筛选虚拟树
|
|
14363
14404
|
tableTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.searchTree(tableFullTreeData, handleFilter, _objectSpread2(_objectSpread2({}, treeOpts), {}, {
|
|
14364
14405
|
original: true
|
|
14365
14406
|
}));
|
|
14407
|
+
tableData = tableTree;
|
|
14366
14408
|
} else {
|
|
14367
14409
|
tableData = treeConfig ? tableFullTreeData.filter(handleFilter) : tableFullData.filter(handleFilter);
|
|
14368
14410
|
tableTree = tableData;
|
|
14369
14411
|
}
|
|
14370
14412
|
} else {
|
|
14371
|
-
|
|
14372
|
-
|
|
14413
|
+
if (treeConfig && transform) {
|
|
14414
|
+
// 还原虚拟树
|
|
14415
|
+
tableTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.searchTree(tableFullTreeData, function () {
|
|
14416
|
+
return true;
|
|
14417
|
+
}, _objectSpread2(_objectSpread2({}, treeOpts), {}, {
|
|
14418
|
+
original: true
|
|
14419
|
+
}));
|
|
14420
|
+
tableData = tableTree;
|
|
14421
|
+
} else {
|
|
14422
|
+
tableData = treeConfig ? tableFullTreeData.slice(0) : tableFullData.slice(0);
|
|
14423
|
+
tableTree = tableData;
|
|
14424
|
+
}
|
|
14373
14425
|
}
|
|
14374
14426
|
|
|
14375
14427
|
var firstOrderColumn = orderColumns[0];
|
|
14376
14428
|
|
|
14377
14429
|
if (!allRemoteSort && firstOrderColumn) {
|
|
14378
|
-
if (
|
|
14379
|
-
|
|
14380
|
-
|
|
14381
|
-
|
|
14382
|
-
|
|
14383
|
-
|
|
14384
|
-
|
|
14385
|
-
|
|
14386
|
-
|
|
14387
|
-
|
|
14388
|
-
|
|
14389
|
-
// 兼容 v4
|
|
14390
|
-
if (sortMultiple) {
|
|
14391
|
-
tableData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.orderBy(tableData, orderColumns.map(function (_ref2) {
|
|
14430
|
+
if (treeConfig && transform) {
|
|
14431
|
+
// 虚拟树和列表一样,只能排序根级节点
|
|
14432
|
+
if (allSortMethod) {
|
|
14433
|
+
var sortRests = allSortMethod({
|
|
14434
|
+
data: tableTree,
|
|
14435
|
+
sortList: orderColumns,
|
|
14436
|
+
$table: this
|
|
14437
|
+
});
|
|
14438
|
+
tableTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(sortRests) ? sortRests : tableTree;
|
|
14439
|
+
} else {
|
|
14440
|
+
tableTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.orderBy(tableTree, orderColumns.map(function (_ref2) {
|
|
14392
14441
|
var column = _ref2.column,
|
|
14393
14442
|
order = _ref2.order;
|
|
14394
14443
|
return [getOrderField(_this16, column), order];
|
|
14395
14444
|
}));
|
|
14445
|
+
}
|
|
14446
|
+
|
|
14447
|
+
tableData = tableTree;
|
|
14448
|
+
} else {
|
|
14449
|
+
if (allSortMethod) {
|
|
14450
|
+
var _sortRests = allSortMethod({
|
|
14451
|
+
data: tableData,
|
|
14452
|
+
column: firstOrderColumn.column,
|
|
14453
|
+
property: firstOrderColumn.property,
|
|
14454
|
+
order: firstOrderColumn.order,
|
|
14455
|
+
sortList: orderColumns,
|
|
14456
|
+
$table: this
|
|
14457
|
+
});
|
|
14458
|
+
|
|
14459
|
+
tableData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(_sortRests) ? _sortRests : tableData;
|
|
14396
14460
|
} else {
|
|
14397
|
-
// 兼容
|
|
14398
|
-
|
|
14461
|
+
// 兼容 v4
|
|
14462
|
+
if (sortMultiple) {
|
|
14463
|
+
tableData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.orderBy(tableData, orderColumns.map(function (_ref3) {
|
|
14464
|
+
var column = _ref3.column,
|
|
14465
|
+
order = _ref3.order;
|
|
14466
|
+
return [getOrderField(_this16, column), order];
|
|
14467
|
+
}));
|
|
14468
|
+
} else {
|
|
14469
|
+
// 兼容 v2,在 v4 中废弃, sortBy 不能为数组
|
|
14470
|
+
var sortByConfs;
|
|
14399
14471
|
|
|
14400
|
-
|
|
14401
|
-
|
|
14402
|
-
|
|
14403
|
-
|
|
14404
|
-
|
|
14472
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(firstOrderColumn.sortBy)) {
|
|
14473
|
+
sortByConfs = firstOrderColumn.sortBy.map(function (item) {
|
|
14474
|
+
return [item, firstOrderColumn.order];
|
|
14475
|
+
});
|
|
14476
|
+
}
|
|
14405
14477
|
|
|
14406
|
-
|
|
14407
|
-
|
|
14408
|
-
|
|
14409
|
-
|
|
14410
|
-
|
|
14478
|
+
tableData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.orderBy(tableData, sortByConfs || [firstOrderColumn].map(function (_ref4) {
|
|
14479
|
+
var column = _ref4.column,
|
|
14480
|
+
order = _ref4.order;
|
|
14481
|
+
return [getOrderField(_this16, column), order];
|
|
14482
|
+
}));
|
|
14483
|
+
}
|
|
14411
14484
|
}
|
|
14412
|
-
}
|
|
14413
14485
|
|
|
14414
|
-
|
|
14486
|
+
tableTree = tableData;
|
|
14487
|
+
}
|
|
14415
14488
|
}
|
|
14416
14489
|
|
|
14417
14490
|
this.afterFullData = tableData;
|
|
@@ -14437,30 +14510,15 @@ var Methods = {
|
|
|
14437
14510
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(afterTreeFullData, function (row, index, items, path) {
|
|
14438
14511
|
var rowid = methods_getRowid(_this17, row);
|
|
14439
14512
|
var allrest = fullAllDataRowIdData[rowid];
|
|
14440
|
-
var fullrest = fullDataRowIdData[rowid];
|
|
14441
14513
|
var seq = path.map(function (num, i) {
|
|
14442
14514
|
return i % 2 === 0 ? Number(num) + 1 : '.';
|
|
14443
14515
|
}).join('');
|
|
14444
14516
|
|
|
14445
14517
|
if (allrest) {
|
|
14446
14518
|
allrest.seq = seq;
|
|
14447
|
-
|
|
14448
|
-
|
|
14449
|
-
if (fullrest) {
|
|
14450
|
-
fullrest.seq = seq;
|
|
14519
|
+
allrest._index = index;
|
|
14451
14520
|
} else {
|
|
14452
|
-
|
|
14453
|
-
row: row,
|
|
14454
|
-
rowid: rowid,
|
|
14455
|
-
seq: seq,
|
|
14456
|
-
index: -1,
|
|
14457
|
-
$index: -1,
|
|
14458
|
-
_index: index,
|
|
14459
|
-
items: [],
|
|
14460
|
-
parent: null,
|
|
14461
|
-
level: 0
|
|
14462
|
-
};
|
|
14463
|
-
fullDataRowIdData[rowid] = {
|
|
14521
|
+
var rest = {
|
|
14464
14522
|
row: row,
|
|
14465
14523
|
rowid: rowid,
|
|
14466
14524
|
seq: seq,
|
|
@@ -14471,35 +14529,23 @@ var Methods = {
|
|
|
14471
14529
|
parent: null,
|
|
14472
14530
|
level: 0
|
|
14473
14531
|
};
|
|
14532
|
+
fullAllDataRowIdData[rowid] = rest;
|
|
14533
|
+
fullDataRowIdData[rowid] = rest;
|
|
14474
14534
|
}
|
|
14475
|
-
},
|
|
14535
|
+
}, {
|
|
14536
|
+
children: treeOpts.mapChildren
|
|
14537
|
+
});
|
|
14476
14538
|
} else {
|
|
14477
14539
|
afterFullData.forEach(function (row, index) {
|
|
14478
14540
|
var rowid = methods_getRowid(_this17, row);
|
|
14479
14541
|
var allrest = fullAllDataRowIdData[rowid];
|
|
14480
|
-
var fullrest = fullDataRowIdData[rowid];
|
|
14481
14542
|
var seq = index + 1;
|
|
14482
14543
|
|
|
14483
14544
|
if (allrest) {
|
|
14484
14545
|
allrest.seq = seq;
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
if (fullrest) {
|
|
14488
|
-
fullrest.seq = seq;
|
|
14489
|
-
fullrest._index = index;
|
|
14546
|
+
allrest._index = index;
|
|
14490
14547
|
} else {
|
|
14491
|
-
|
|
14492
|
-
row: row,
|
|
14493
|
-
rowid: rowid,
|
|
14494
|
-
seq: seq,
|
|
14495
|
-
index: -1,
|
|
14496
|
-
$index: -1,
|
|
14497
|
-
_index: index,
|
|
14498
|
-
items: [],
|
|
14499
|
-
parent: null,
|
|
14500
|
-
level: 0
|
|
14501
|
-
};
|
|
14502
|
-
fullDataRowIdData[rowid] = {
|
|
14548
|
+
var rest = {
|
|
14503
14549
|
row: row,
|
|
14504
14550
|
rowid: rowid,
|
|
14505
14551
|
seq: seq,
|
|
@@ -14510,6 +14556,8 @@ var Methods = {
|
|
|
14510
14556
|
parent: null,
|
|
14511
14557
|
level: 0
|
|
14512
14558
|
};
|
|
14559
|
+
fullAllDataRowIdData[rowid] = rest;
|
|
14560
|
+
fullDataRowIdData[rowid] = rest;
|
|
14513
14561
|
}
|
|
14514
14562
|
});
|
|
14515
14563
|
}
|
|
@@ -14733,9 +14781,9 @@ var Methods = {
|
|
|
14733
14781
|
keyMap[colKey] = column;
|
|
14734
14782
|
}
|
|
14735
14783
|
});
|
|
14736
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.each(customMap, function (
|
|
14737
|
-
var visible =
|
|
14738
|
-
resizeWidth =
|
|
14784
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.each(customMap, function (_ref5, field) {
|
|
14785
|
+
var visible = _ref5.visible,
|
|
14786
|
+
resizeWidth = _ref5.resizeWidth;
|
|
14739
14787
|
var column = keyMap[field];
|
|
14740
14788
|
|
|
14741
14789
|
if (column) {
|
|
@@ -16346,10 +16394,10 @@ var Methods = {
|
|
|
16346
16394
|
* 多选,行选中事件
|
|
16347
16395
|
* value 选中true 不选false 半选-1
|
|
16348
16396
|
*/
|
|
16349
|
-
handleSelectRow: function handleSelectRow(
|
|
16397
|
+
handleSelectRow: function handleSelectRow(_ref6, value) {
|
|
16350
16398
|
var _this30 = this;
|
|
16351
16399
|
|
|
16352
|
-
var row =
|
|
16400
|
+
var row = _ref6.row;
|
|
16353
16401
|
var selection = this.selection,
|
|
16354
16402
|
afterFullData = this.afterFullData,
|
|
16355
16403
|
treeConfig = this.treeConfig,
|
|
@@ -17165,8 +17213,8 @@ var Methods = {
|
|
|
17165
17213
|
/**
|
|
17166
17214
|
* 行 hover 事件
|
|
17167
17215
|
*/
|
|
17168
|
-
triggerHoverEvent: function triggerHoverEvent(evnt,
|
|
17169
|
-
var row =
|
|
17216
|
+
triggerHoverEvent: function triggerHoverEvent(evnt, _ref7) {
|
|
17217
|
+
var row = _ref7.row;
|
|
17170
17218
|
this.setHoverRow(row);
|
|
17171
17219
|
},
|
|
17172
17220
|
setHoverRow: function setHoverRow(row) {
|
|
@@ -17930,7 +17978,8 @@ var Methods = {
|
|
|
17930
17978
|
var treeOpts = this.treeOpts,
|
|
17931
17979
|
treeExpandeds = this.treeExpandeds,
|
|
17932
17980
|
fullAllDataRowMap = this.fullAllDataRowMap;
|
|
17933
|
-
var
|
|
17981
|
+
var transform = treeOpts.transform,
|
|
17982
|
+
lazy = treeOpts.lazy;
|
|
17934
17983
|
var rest = fullAllDataRowMap.get(row);
|
|
17935
17984
|
|
|
17936
17985
|
if (lazy && rest) {
|
|
@@ -17940,6 +17989,11 @@ var Methods = {
|
|
|
17940
17989
|
});
|
|
17941
17990
|
}
|
|
17942
17991
|
|
|
17992
|
+
if (transform) {
|
|
17993
|
+
this.handleVirtualTreeToList();
|
|
17994
|
+
return this.handleTableData();
|
|
17995
|
+
}
|
|
17996
|
+
|
|
17943
17997
|
return this.$nextTick();
|
|
17944
17998
|
},
|
|
17945
17999
|
|
|
@@ -17961,6 +18015,8 @@ var Methods = {
|
|
|
17961
18015
|
return _this42.handleAsyncTreeExpandChilds(row);
|
|
17962
18016
|
}).then(function () {
|
|
17963
18017
|
if (transform) {
|
|
18018
|
+
_this42.handleVirtualTreeToList();
|
|
18019
|
+
|
|
17964
18020
|
return _this42.handleTableData();
|
|
17965
18021
|
}
|
|
17966
18022
|
}).then(function () {
|
|
@@ -18047,7 +18103,8 @@ var Methods = {
|
|
|
18047
18103
|
treeOpts = this.treeOpts,
|
|
18048
18104
|
treeLazyLoadeds = this.treeLazyLoadeds,
|
|
18049
18105
|
checkboxOpts = this.checkboxOpts;
|
|
18050
|
-
var
|
|
18106
|
+
var transform = treeOpts.transform,
|
|
18107
|
+
loadMethod = treeOpts.loadMethod;
|
|
18051
18108
|
var checkStrictly = checkboxOpts.checkStrictly;
|
|
18052
18109
|
var rest = fullAllDataRowMap.get(row);
|
|
18053
18110
|
return new Promise(function (resolve) {
|
|
@@ -18077,10 +18134,24 @@ var Methods = {
|
|
|
18077
18134
|
if (!checkStrictly && _this43.isCheckedByCheckboxRow(row)) {
|
|
18078
18135
|
_this43.setCheckboxRow(childRows, true);
|
|
18079
18136
|
}
|
|
18137
|
+
|
|
18138
|
+
_this43.$nextTick().then(function () {
|
|
18139
|
+
if (transform) {
|
|
18140
|
+
return _this43.handleTableData();
|
|
18141
|
+
}
|
|
18142
|
+
}).then(function () {
|
|
18143
|
+
return _this43.recalculate();
|
|
18144
|
+
}).then(function () {
|
|
18145
|
+
return resolve();
|
|
18146
|
+
});
|
|
18147
|
+
});
|
|
18148
|
+
} else {
|
|
18149
|
+
_this43.$nextTick().then(function () {
|
|
18150
|
+
return _this43.recalculate();
|
|
18151
|
+
}).then(function () {
|
|
18152
|
+
return resolve();
|
|
18080
18153
|
});
|
|
18081
18154
|
}
|
|
18082
|
-
|
|
18083
|
-
resolve(_this43.$nextTick().then(_this43.recalculate));
|
|
18084
18155
|
});
|
|
18085
18156
|
});
|
|
18086
18157
|
},
|
|
@@ -18193,6 +18264,8 @@ var Methods = {
|
|
|
18193
18264
|
var _this45 = this;
|
|
18194
18265
|
|
|
18195
18266
|
return this.handleBaseTreeExpand(rows, expanded).then(function () {
|
|
18267
|
+
_this45.handleVirtualTreeToList();
|
|
18268
|
+
|
|
18196
18269
|
return _this45.handleTableData();
|
|
18197
18270
|
}).then(function () {
|
|
18198
18271
|
return _this45.recalculate();
|
|
@@ -18245,7 +18318,8 @@ var Methods = {
|
|
|
18245
18318
|
var treeOpts = this.treeOpts,
|
|
18246
18319
|
treeExpandeds = this.treeExpandeds,
|
|
18247
18320
|
tableFullData = this.tableFullData;
|
|
18248
|
-
var
|
|
18321
|
+
var transform = treeOpts.transform,
|
|
18322
|
+
reserve = treeOpts.reserve;
|
|
18249
18323
|
var isExists = treeExpandeds.length;
|
|
18250
18324
|
this.treeExpandeds = [];
|
|
18251
18325
|
|
|
@@ -18256,6 +18330,12 @@ var Methods = {
|
|
|
18256
18330
|
}
|
|
18257
18331
|
|
|
18258
18332
|
return this.handleTableData().then(function () {
|
|
18333
|
+
if (transform) {
|
|
18334
|
+
_this46.handleVirtualTreeToList();
|
|
18335
|
+
|
|
18336
|
+
return _this46.handleTableData();
|
|
18337
|
+
}
|
|
18338
|
+
}).then(function () {
|
|
18259
18339
|
if (isExists) {
|
|
18260
18340
|
_this46.recalculate();
|
|
18261
18341
|
}
|
|
@@ -18727,8 +18807,8 @@ var Methods = {
|
|
|
18727
18807
|
}
|
|
18728
18808
|
|
|
18729
18809
|
_this50.clearValidate();
|
|
18730
|
-
}).catch(function (
|
|
18731
|
-
var rule =
|
|
18810
|
+
}).catch(function (_ref8) {
|
|
18811
|
+
var rule = _ref8.rule;
|
|
18732
18812
|
|
|
18733
18813
|
if (customVal) {
|
|
18734
18814
|
methods_setCellValue(row, column, cellValue);
|
|
@@ -21550,10 +21630,14 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21550
21630
|
|
|
21551
21631
|
(_editStore$insertList = editStore.insertList).unshift.apply(_editStore$insertList, _toConsumableArray(newRecords));
|
|
21552
21632
|
|
|
21553
|
-
this.handleTableData(treeConfig &&
|
|
21633
|
+
this.handleTableData(treeConfig && transform);
|
|
21634
|
+
|
|
21635
|
+
if (!(treeConfig && transform)) {
|
|
21636
|
+
this.updateAfterDataIndex();
|
|
21637
|
+
}
|
|
21638
|
+
|
|
21554
21639
|
this.updateFooter();
|
|
21555
21640
|
this.cacheRowMap();
|
|
21556
|
-
this.updateAfterDataIndex();
|
|
21557
21641
|
this.checkSelectionStatus();
|
|
21558
21642
|
|
|
21559
21643
|
if (this.scrollYLoad) {
|
|
@@ -21689,10 +21773,14 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21689
21773
|
insertList.splice(iIndex, 1);
|
|
21690
21774
|
}
|
|
21691
21775
|
});
|
|
21692
|
-
this.handleTableData(treeConfig &&
|
|
21776
|
+
this.handleTableData(treeConfig && transform);
|
|
21777
|
+
|
|
21778
|
+
if (!(treeConfig && transform)) {
|
|
21779
|
+
this.updateAfterDataIndex();
|
|
21780
|
+
}
|
|
21781
|
+
|
|
21693
21782
|
this.updateFooter();
|
|
21694
21783
|
this.cacheRowMap();
|
|
21695
|
-
this.updateAfterDataIndex();
|
|
21696
21784
|
this.checkSelectionStatus();
|
|
21697
21785
|
|
|
21698
21786
|
if (this.scrollYLoad) {
|
|
@@ -27876,7 +27964,7 @@ function hasTreeChildren($xetable, row) {
|
|
|
27876
27964
|
return row[treeOpts.children] && row[treeOpts.children].length > 0;
|
|
27877
27965
|
}
|
|
27878
27966
|
|
|
27879
|
-
function getSeq($xetable, row, rowIndex, column, columnIndex
|
|
27967
|
+
function getSeq($xetable, row, rowIndex, column, columnIndex) {
|
|
27880
27968
|
var seqOpts = $xetable.seqOpts;
|
|
27881
27969
|
var seqMethod = seqOpts.seqMethod || column.seqMethod;
|
|
27882
27970
|
|
|
@@ -27889,11 +27977,7 @@ function getSeq($xetable, row, rowIndex, column, columnIndex, path) {
|
|
|
27889
27977
|
});
|
|
27890
27978
|
}
|
|
27891
27979
|
|
|
27892
|
-
|
|
27893
|
-
return toTreePathSeq(path);
|
|
27894
|
-
}
|
|
27895
|
-
|
|
27896
|
-
return seqOpts.startIndex + rowIndex + 1;
|
|
27980
|
+
return $xetable.getRowSeq(row);
|
|
27897
27981
|
}
|
|
27898
27982
|
|
|
27899
27983
|
function defaultFilterExportColumn(column) {
|
|
@@ -27966,7 +28050,7 @@ function getLabelData($xetable, opts, columns, datas) {
|
|
|
27966
28050
|
} else {
|
|
27967
28051
|
switch (column.type) {
|
|
27968
28052
|
case 'seq':
|
|
27969
|
-
cellValue = getSeq($xetable, row, rowIndex, column, columnIndex
|
|
28053
|
+
cellValue = getSeq($xetable, row, rowIndex, column, columnIndex);
|
|
27970
28054
|
break;
|
|
27971
28055
|
|
|
27972
28056
|
case 'checkbox':
|
|
@@ -28042,7 +28126,7 @@ function getLabelData($xetable, opts, columns, datas) {
|
|
|
28042
28126
|
} else {
|
|
28043
28127
|
switch (column.type) {
|
|
28044
28128
|
case 'seq':
|
|
28045
|
-
cellValue = getSeq($xetable, row, rowIndex, column, columnIndex
|
|
28129
|
+
cellValue = getSeq($xetable, row, rowIndex, column, columnIndex);
|
|
28046
28130
|
break;
|
|
28047
28131
|
|
|
28048
28132
|
case 'checkbox':
|
|
@@ -30430,7 +30514,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
30430
30514
|
var ruleProps = Object.keys(validRest);
|
|
30431
30515
|
return _this2.$nextTick().then(function () {
|
|
30432
30516
|
if (ruleProps.length) {
|
|
30433
|
-
return validRest[ruleProps[0]][0];
|
|
30517
|
+
return Promise.reject(validRest[ruleProps[0]][0]);
|
|
30434
30518
|
}
|
|
30435
30519
|
|
|
30436
30520
|
if (cb) {
|