vxe-table 3.4.5 → 3.4.7-beta.2
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/README.en.md +1 -1
- package/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/lib/button/src/button.js +15 -14
- package/lib/button/src/button.min.js +1 -1
- package/lib/edit/src/mixin.js +19 -25
- package/lib/edit/src/mixin.min.js +1 -1
- package/lib/export/src/mixin.js +25 -10
- package/lib/export/src/mixin.min.js +1 -1
- package/lib/filter/src/mixin.js +25 -1
- package/lib/filter/src/mixin.min.js +1 -1
- package/lib/grid/src/grid.js +6 -3
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +713 -423
- package/lib/index.umd.min.js +1 -1
- package/lib/select/src/select.js +1 -1
- package/lib/select/src/select.min.js +1 -1
- package/lib/table/src/body.js +9 -17
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +16 -17
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +503 -317
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +6 -6
- package/lib/table/src/util.js +7 -0
- package/lib/table/src/util.min.js +1 -1
- package/lib/tools/src/dom.js +2 -9
- package/lib/tools/src/dom.min.js +1 -1
- package/lib/tools/src/utils.js +1 -1
- package/lib/tools/src/utils.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +5 -1
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/package.json +3 -3
- package/packages/button/src/button.js +14 -14
- package/packages/edit/src/mixin.js +18 -21
- package/packages/export/src/mixin.js +17 -6
- package/packages/filter/src/mixin.js +20 -1
- package/packages/grid/src/grid.js +6 -2
- package/packages/select/src/select.js +1 -1
- package/packages/table/src/body.js +12 -16
- package/packages/table/src/cell.js +15 -15
- package/packages/table/src/methods.js +149 -47
- package/packages/table/src/table.js +6 -6
- package/packages/table/src/util.js +4 -0
- package/packages/tools/src/dom.js +2 -7
- package/packages/tools/src/utils.js +1 -1
- package/packages/v-x-e-table/src/conf.js +5 -1
package/lib/index.umd.js
CHANGED
|
@@ -8452,7 +8452,7 @@ var iconPrefix = 'vxe-icon--';
|
|
|
8452
8452
|
// storage: false,
|
|
8453
8453
|
// checkMethod () {}
|
|
8454
8454
|
// },
|
|
8455
|
-
// rowId: '
|
|
8455
|
+
// rowId: '_X_ID', // 行数据的唯一主键字段名
|
|
8456
8456
|
sortConfig: {
|
|
8457
8457
|
// remote: false,
|
|
8458
8458
|
// trigger: 'default',
|
|
@@ -8470,6 +8470,7 @@ var iconPrefix = 'vxe-icon--';
|
|
|
8470
8470
|
parentField: 'parentId',
|
|
8471
8471
|
children: 'children',
|
|
8472
8472
|
hasChild: 'hasChild',
|
|
8473
|
+
mapChildren: '_X_CHILD',
|
|
8473
8474
|
indent: 20,
|
|
8474
8475
|
showIcon: true
|
|
8475
8476
|
},
|
|
@@ -8494,6 +8495,9 @@ var iconPrefix = 'vxe-icon--';
|
|
|
8494
8495
|
mouseConfig: {
|
|
8495
8496
|
extension: true
|
|
8496
8497
|
},
|
|
8498
|
+
keyboardConfig: {
|
|
8499
|
+
isEsc: true
|
|
8500
|
+
},
|
|
8497
8501
|
areaConfig: {
|
|
8498
8502
|
selectCellByHeader: true
|
|
8499
8503
|
},
|
|
@@ -8754,6 +8758,9 @@ var es_object_to_string = __webpack_require__("d3b7");
|
|
|
8754
8758
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.iterator.js
|
|
8755
8759
|
var es_symbol_iterator = __webpack_require__("d28b");
|
|
8756
8760
|
|
|
8761
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
|
|
8762
|
+
var es_array_iterator = __webpack_require__("e260");
|
|
8763
|
+
|
|
8757
8764
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
|
|
8758
8765
|
var es_string_iterator = __webpack_require__("3ca3");
|
|
8759
8766
|
|
|
@@ -8771,6 +8778,7 @@ var es_array_from = __webpack_require__("a630");
|
|
|
8771
8778
|
|
|
8772
8779
|
|
|
8773
8780
|
|
|
8781
|
+
|
|
8774
8782
|
function _iterableToArray(iter) {
|
|
8775
8783
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
8776
8784
|
}
|
|
@@ -8807,6 +8815,9 @@ function _nonIterableSpread() {
|
|
|
8807
8815
|
function _toConsumableArray(arr) {
|
|
8808
8816
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
8809
8817
|
}
|
|
8818
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
|
|
8819
|
+
var es_object_assign = __webpack_require__("cca6");
|
|
8820
|
+
|
|
8810
8821
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.fixed.js
|
|
8811
8822
|
var es_string_fixed = __webpack_require__("c7cd");
|
|
8812
8823
|
|
|
@@ -8821,6 +8832,7 @@ var es_array_splice = __webpack_require__("a434");
|
|
|
8821
8832
|
|
|
8822
8833
|
|
|
8823
8834
|
|
|
8835
|
+
|
|
8824
8836
|
/**
|
|
8825
8837
|
* 创建数据仓库
|
|
8826
8838
|
*/
|
|
@@ -8866,6 +8878,7 @@ var store_Store = /*#__PURE__*/function () {
|
|
|
8866
8878
|
/* harmony default export */ var store = (store_Store);
|
|
8867
8879
|
// CONCATENATED MODULE: ./packages/v-x-e-table/src/formats.js
|
|
8868
8880
|
|
|
8881
|
+
|
|
8869
8882
|
var formats = new store();
|
|
8870
8883
|
|
|
8871
8884
|
if (false) {}
|
|
@@ -8882,6 +8895,7 @@ if (false) {}
|
|
|
8882
8895
|
|
|
8883
8896
|
|
|
8884
8897
|
|
|
8898
|
+
|
|
8885
8899
|
var zindexIndex = 0;
|
|
8886
8900
|
var lastZindex = 1;
|
|
8887
8901
|
|
|
@@ -9045,7 +9059,7 @@ var UtilTools = {
|
|
|
9045
9059
|
},
|
|
9046
9060
|
// 行主键 key
|
|
9047
9061
|
getRowkey: function getRowkey($xetable) {
|
|
9048
|
-
return $xetable.rowId || '
|
|
9062
|
+
return $xetable.rowId || '_X_ID';
|
|
9049
9063
|
},
|
|
9050
9064
|
// 行主键 value
|
|
9051
9065
|
getRowid: function getRowid($xetable, row) {
|
|
@@ -9162,6 +9176,9 @@ var es_string_match = __webpack_require__("466d");
|
|
|
9162
9176
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
|
|
9163
9177
|
var es_array_concat = __webpack_require__("99af");
|
|
9164
9178
|
|
|
9179
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
|
|
9180
|
+
var es_promise = __webpack_require__("e6cf");
|
|
9181
|
+
|
|
9165
9182
|
// CONCATENATED MODULE: ./packages/tools/src/dom.js
|
|
9166
9183
|
|
|
9167
9184
|
|
|
@@ -9172,6 +9189,7 @@ var es_array_concat = __webpack_require__("99af");
|
|
|
9172
9189
|
|
|
9173
9190
|
|
|
9174
9191
|
|
|
9192
|
+
|
|
9175
9193
|
var dom_getRowid = utils.getRowid;
|
|
9176
9194
|
var browse = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.browse();
|
|
9177
9195
|
var reClsMap = {};
|
|
@@ -9413,16 +9431,9 @@ var DomTools = {
|
|
|
9413
9431
|
}
|
|
9414
9432
|
},
|
|
9415
9433
|
triggerEvent: function triggerEvent(targetElem, type) {
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
if (typeof Event === 'function') {
|
|
9419
|
-
evnt = new Event(type);
|
|
9420
|
-
} else {
|
|
9421
|
-
evnt = document.createEvent('Event');
|
|
9422
|
-
evnt.initEvent(type, true, true);
|
|
9434
|
+
if (targetElem) {
|
|
9435
|
+
targetElem.dispatchEvent(new Event(type));
|
|
9423
9436
|
}
|
|
9424
|
-
|
|
9425
|
-
targetElem.dispatchEvent(evnt);
|
|
9426
9437
|
},
|
|
9427
9438
|
calcHeight: function calcHeight($xetable, key) {
|
|
9428
9439
|
var val = $xetable[key];
|
|
@@ -9758,6 +9769,7 @@ var es_number_to_fixed = __webpack_require__("b680");
|
|
|
9758
9769
|
|
|
9759
9770
|
|
|
9760
9771
|
|
|
9772
|
+
|
|
9761
9773
|
var defaultCompProps = {
|
|
9762
9774
|
transfer: true
|
|
9763
9775
|
};
|
|
@@ -10547,11 +10559,13 @@ var renderer = {
|
|
|
10547
10559
|
};
|
|
10548
10560
|
// CONCATENATED MODULE: ./packages/v-x-e-table/src/commands.js
|
|
10549
10561
|
|
|
10562
|
+
|
|
10550
10563
|
var commands = new store();
|
|
10551
10564
|
|
|
10552
10565
|
if (false) {}
|
|
10553
10566
|
// CONCATENATED MODULE: ./packages/v-x-e-table/src/menus.js
|
|
10554
10567
|
|
|
10568
|
+
|
|
10555
10569
|
var menus = new store();
|
|
10556
10570
|
|
|
10557
10571
|
if (false) {}
|
|
@@ -10711,6 +10725,9 @@ var es_string_includes = __webpack_require__("2532");
|
|
|
10711
10725
|
|
|
10712
10726
|
|
|
10713
10727
|
|
|
10728
|
+
|
|
10729
|
+
|
|
10730
|
+
|
|
10714
10731
|
var lineOffsetSizes = {
|
|
10715
10732
|
mini: 3,
|
|
10716
10733
|
small: 2,
|
|
@@ -10727,6 +10744,11 @@ function restoreScrollLocation(_vm, scrollLeft, scrollTop) {
|
|
|
10727
10744
|
}
|
|
10728
10745
|
});
|
|
10729
10746
|
}
|
|
10747
|
+
function toTreePathSeq(path) {
|
|
10748
|
+
return path.map(function (num, i) {
|
|
10749
|
+
return i % 2 === 0 ? Number(num) + 1 : '.';
|
|
10750
|
+
}).join('');
|
|
10751
|
+
}
|
|
10730
10752
|
function removeScrollListener(scrollElem) {
|
|
10731
10753
|
if (scrollElem && scrollElem._onscroll) {
|
|
10732
10754
|
scrollElem.onscroll = null;
|
|
@@ -10941,6 +10963,7 @@ function clearTableAllStatus(_vm) {
|
|
|
10941
10963
|
|
|
10942
10964
|
|
|
10943
10965
|
|
|
10966
|
+
|
|
10944
10967
|
var renderType = 'body'; // 滚动、拖动过程中不需要触发
|
|
10945
10968
|
|
|
10946
10969
|
function isOperateMouse($xetable) {
|
|
@@ -10977,7 +11000,7 @@ function renderLine(h, _vm, $xetable, rowLevel, items, params) {
|
|
|
10977
11000
|
*/
|
|
10978
11001
|
|
|
10979
11002
|
|
|
10980
|
-
function renderColumn(h, _vm, $xetable,
|
|
11003
|
+
function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) {
|
|
10981
11004
|
var _ref2;
|
|
10982
11005
|
|
|
10983
11006
|
var tableListeners = $xetable.$listeners,
|
|
@@ -11047,7 +11070,6 @@ function renderColumn(h, _vm, $xetable, $seq, seq, rowid, fixedType, rowLevel, r
|
|
|
11047
11070
|
var triggerDblclick = editRender && editConfig && editOpts.trigger === 'dblclick';
|
|
11048
11071
|
var params = {
|
|
11049
11072
|
$table: $xetable,
|
|
11050
|
-
$seq: $seq,
|
|
11051
11073
|
seq: seq,
|
|
11052
11074
|
rowid: rowid,
|
|
11053
11075
|
row: row,
|
|
@@ -11238,7 +11260,7 @@ function renderColumn(h, _vm, $xetable, $seq, seq, rowid, fixedType, rowLevel, r
|
|
|
11238
11260
|
}, tdVNs);
|
|
11239
11261
|
}
|
|
11240
11262
|
|
|
11241
|
-
function renderRows(h, _vm, $xetable,
|
|
11263
|
+
function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
|
|
11242
11264
|
var stripe = $xetable.stripe,
|
|
11243
11265
|
rowKey = $xetable.rowKey,
|
|
11244
11266
|
highlightHoverRow = $xetable.highlightHoverRow,
|
|
@@ -11251,24 +11273,18 @@ function renderRows(h, _vm, $xetable, $seq, fixedType, tableData, tableColumn) {
|
|
|
11251
11273
|
editOpts = $xetable.editOpts,
|
|
11252
11274
|
treeExpandeds = $xetable.treeExpandeds,
|
|
11253
11275
|
scrollYLoad = $xetable.scrollYLoad,
|
|
11254
|
-
scrollYStore = $xetable.scrollYStore,
|
|
11255
11276
|
editStore = $xetable.editStore,
|
|
11256
11277
|
rowExpandeds = $xetable.rowExpandeds,
|
|
11257
11278
|
radioOpts = $xetable.radioOpts,
|
|
11258
11279
|
checkboxOpts = $xetable.checkboxOpts,
|
|
11259
11280
|
expandColumn = $xetable.expandColumn,
|
|
11260
11281
|
hasFixedColumn = $xetable.hasFixedColumn,
|
|
11261
|
-
|
|
11282
|
+
fullDataRowIdData = $xetable.fullDataRowIdData,
|
|
11262
11283
|
rowOpts = $xetable.rowOpts;
|
|
11263
11284
|
var rows = [];
|
|
11264
11285
|
tableData.forEach(function (row, $rowIndex) {
|
|
11265
11286
|
var trOn = {};
|
|
11266
11287
|
var rowIndex = $rowIndex;
|
|
11267
|
-
var seq = rowIndex + 1;
|
|
11268
|
-
|
|
11269
|
-
if (scrollYLoad) {
|
|
11270
|
-
seq += scrollYStore.startIndex;
|
|
11271
|
-
}
|
|
11272
11288
|
|
|
11273
11289
|
var _rowIndex = $xetable.getVTRowIndex(row); // 确保任何情况下 rowIndex 都精准指向真实 data 索引
|
|
11274
11290
|
|
|
@@ -11297,11 +11313,11 @@ function renderRows(h, _vm, $xetable, $seq, fixedType, tableData, tableColumn) {
|
|
|
11297
11313
|
}
|
|
11298
11314
|
|
|
11299
11315
|
var rowid = UtilTools.getRowid($xetable, row);
|
|
11300
|
-
var rest =
|
|
11316
|
+
var rest = fullDataRowIdData[rowid];
|
|
11301
11317
|
var rowLevel = rest ? rest.level : 0;
|
|
11318
|
+
var seq = rest ? rest.seq : -1;
|
|
11302
11319
|
var params = {
|
|
11303
11320
|
$table: $xetable,
|
|
11304
|
-
$seq: $seq,
|
|
11305
11321
|
seq: seq,
|
|
11306
11322
|
rowid: rowid,
|
|
11307
11323
|
fixed: fixedType,
|
|
@@ -11332,7 +11348,7 @@ function renderRows(h, _vm, $xetable, $seq, fixedType, tableData, tableColumn) {
|
|
|
11332
11348
|
key: rowKey || treeConfig ? rowid : $rowIndex,
|
|
11333
11349
|
on: trOn
|
|
11334
11350
|
}, tableColumn.map(function (column, $columnIndex) {
|
|
11335
|
-
return renderColumn(h, _vm, $xetable,
|
|
11351
|
+
return renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
|
|
11336
11352
|
}))); // 如果行被展开了
|
|
11337
11353
|
|
|
11338
11354
|
if (expandColumn && rowExpandeds.length && rowExpandeds.indexOf(row) > -1) {
|
|
@@ -11348,7 +11364,6 @@ function renderRows(h, _vm, $xetable, $seq, fixedType, tableData, tableColumn) {
|
|
|
11348
11364
|
var hasEllipsis = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showOverflow) ? allColumnOverflow : showOverflow;
|
|
11349
11365
|
var expandParams = {
|
|
11350
11366
|
$table: $xetable,
|
|
11351
|
-
$seq: $seq,
|
|
11352
11367
|
seq: seq,
|
|
11353
11368
|
column: expandColumn,
|
|
11354
11369
|
fixed: fixedType,
|
|
@@ -11378,11 +11393,11 @@ function renderRows(h, _vm, $xetable, $seq, fixedType, tableData, tableColumn) {
|
|
|
11378
11393
|
} // 如果是树形表格
|
|
11379
11394
|
|
|
11380
11395
|
|
|
11381
|
-
if (treeConfig && !scrollYLoad && treeExpandeds.length) {
|
|
11396
|
+
if (treeConfig && !scrollYLoad && !treeOpts.transform && treeExpandeds.length) {
|
|
11382
11397
|
var rowChildren = row[treeOpts.children];
|
|
11383
11398
|
|
|
11384
11399
|
if (rowChildren && rowChildren.length && treeExpandeds.indexOf(row) > -1) {
|
|
11385
|
-
rows.push.apply(rows, _toConsumableArray(renderRows(h, _vm, $xetable,
|
|
11400
|
+
rows.push.apply(rows, _toConsumableArray(renderRows(h, _vm, $xetable, fixedType, rowChildren, tableColumn)));
|
|
11386
11401
|
}
|
|
11387
11402
|
}
|
|
11388
11403
|
});
|
|
@@ -11557,7 +11572,7 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
|
|
|
11557
11572
|
*/
|
|
11558
11573
|
h('tbody', {
|
|
11559
11574
|
ref: 'tbody'
|
|
11560
|
-
}, renderRows(h, this, $xetable,
|
|
11575
|
+
}, renderRows(h, this, $xetable, fixedType, tableData, tableColumn))]), h('div', {
|
|
11561
11576
|
class: 'vxe-table--checkbox-range'
|
|
11562
11577
|
}), mouseConfig && mouseOpts.area ? h('div', {
|
|
11563
11578
|
class: 'vxe-table--cell-area'
|
|
@@ -11869,21 +11884,12 @@ function _objectSpread2(target) {
|
|
|
11869
11884
|
|
|
11870
11885
|
return target;
|
|
11871
11886
|
}
|
|
11872
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
|
|
11873
|
-
var es_promise = __webpack_require__("e6cf");
|
|
11874
|
-
|
|
11875
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
|
|
11876
|
-
var es_object_assign = __webpack_require__("cca6");
|
|
11877
|
-
|
|
11878
11887
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js
|
|
11879
11888
|
var es_string_trim = __webpack_require__("498a");
|
|
11880
11889
|
|
|
11881
11890
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.sort.js
|
|
11882
11891
|
var es_array_sort = __webpack_require__("4e82");
|
|
11883
11892
|
|
|
11884
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
|
|
11885
|
-
var es_array_iterator = __webpack_require__("e260");
|
|
11886
|
-
|
|
11887
11893
|
// CONCATENATED MODULE: ./packages/table/src/cell.js
|
|
11888
11894
|
|
|
11889
11895
|
|
|
@@ -11894,6 +11900,7 @@ var es_array_iterator = __webpack_require__("e260");
|
|
|
11894
11900
|
|
|
11895
11901
|
|
|
11896
11902
|
|
|
11903
|
+
|
|
11897
11904
|
function renderHelpIcon(h, params) {
|
|
11898
11905
|
var $table = params.$table,
|
|
11899
11906
|
column = params.column;
|
|
@@ -12013,8 +12020,8 @@ var Cell = {
|
|
|
12013
12020
|
|
|
12014
12021
|
switch (type) {
|
|
12015
12022
|
case 'seq':
|
|
12016
|
-
renMaps.renderHeader = this.
|
|
12017
|
-
renMaps.renderCell = treeNode ? this.renderTreeIndexCell : this.
|
|
12023
|
+
renMaps.renderHeader = this.renderSeqHeader;
|
|
12024
|
+
renMaps.renderCell = treeNode ? this.renderTreeIndexCell : this.renderSeqCell;
|
|
12018
12025
|
break;
|
|
12019
12026
|
|
|
12020
12027
|
case 'radio':
|
|
@@ -12023,8 +12030,8 @@ var Cell = {
|
|
|
12023
12030
|
break;
|
|
12024
12031
|
|
|
12025
12032
|
case 'checkbox':
|
|
12026
|
-
renMaps.renderHeader = this.
|
|
12027
|
-
renMaps.renderCell = checkboxOpts.checkField ? treeNode ? this.renderTreeSelectionCellByProp : this.
|
|
12033
|
+
renMaps.renderHeader = this.renderCheckboxHeader;
|
|
12034
|
+
renMaps.renderCell = checkboxOpts.checkField ? treeNode ? this.renderTreeSelectionCellByProp : this.renderCheckboxCellByProp : treeNode ? this.renderTreeSelectionCell : this.renderCheckboxCell;
|
|
12028
12035
|
break;
|
|
12029
12036
|
|
|
12030
12037
|
case 'expand':
|
|
@@ -12199,30 +12206,29 @@ var Cell = {
|
|
|
12199
12206
|
/**
|
|
12200
12207
|
* 索引
|
|
12201
12208
|
*/
|
|
12202
|
-
|
|
12209
|
+
renderSeqHeader: function renderSeqHeader(h, params) {
|
|
12203
12210
|
var $table = params.$table,
|
|
12204
12211
|
column = params.column;
|
|
12205
12212
|
var slots = column.slots;
|
|
12206
12213
|
return renderTitleContent(h, params, slots && slots.header ? $table.callSlot(slots.header, params, h) : UtilTools.formatText(column.getTitle(), 1));
|
|
12207
12214
|
},
|
|
12208
|
-
|
|
12215
|
+
renderSeqCell: function renderSeqCell(h, params) {
|
|
12209
12216
|
var $table = params.$table,
|
|
12210
12217
|
column = params.column;
|
|
12211
|
-
var
|
|
12218
|
+
var treeConfig = $table.treeConfig,
|
|
12219
|
+
seqOpts = $table.seqOpts;
|
|
12212
12220
|
var slots = column.slots;
|
|
12213
12221
|
|
|
12214
12222
|
if (slots && slots.default) {
|
|
12215
12223
|
return $table.callSlot(slots.default, params, h);
|
|
12216
12224
|
}
|
|
12217
12225
|
|
|
12218
|
-
var
|
|
12219
|
-
seq = params.seq,
|
|
12220
|
-
level = params.level;
|
|
12226
|
+
var seq = params.seq;
|
|
12221
12227
|
var seqMethod = seqOpts.seqMethod;
|
|
12222
|
-
return [UtilTools.formatText(seqMethod ? seqMethod(params) :
|
|
12228
|
+
return [UtilTools.formatText(seqMethod ? seqMethod(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)];
|
|
12223
12229
|
},
|
|
12224
12230
|
renderTreeIndexCell: function renderTreeIndexCell(h, params) {
|
|
12225
|
-
return Cell.renderTreeIcon(h, params, Cell.
|
|
12231
|
+
return Cell.renderTreeIcon(h, params, Cell.renderSeqCell(h, params));
|
|
12226
12232
|
},
|
|
12227
12233
|
|
|
12228
12234
|
/**
|
|
@@ -12315,7 +12321,7 @@ var Cell = {
|
|
|
12315
12321
|
/**
|
|
12316
12322
|
* 多选
|
|
12317
12323
|
*/
|
|
12318
|
-
|
|
12324
|
+
renderCheckboxHeader: function renderCheckboxHeader(h, params) {
|
|
12319
12325
|
var $table = params.$table,
|
|
12320
12326
|
column = params.column,
|
|
12321
12327
|
isHidden = params.isHidden;
|
|
@@ -12376,7 +12382,7 @@ var Cell = {
|
|
|
12376
12382
|
class: 'vxe-checkbox--label'
|
|
12377
12383
|
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : headerTitle)] : []))]);
|
|
12378
12384
|
},
|
|
12379
|
-
|
|
12385
|
+
renderCheckboxCell: function renderCheckboxCell(h, params) {
|
|
12380
12386
|
var $table = params.$table,
|
|
12381
12387
|
row = params.row,
|
|
12382
12388
|
column = params.column,
|
|
@@ -12458,9 +12464,9 @@ var Cell = {
|
|
|
12458
12464
|
}, checkVNs)];
|
|
12459
12465
|
},
|
|
12460
12466
|
renderTreeSelectionCell: function renderTreeSelectionCell(h, params) {
|
|
12461
|
-
return Cell.renderTreeIcon(h, params, Cell.
|
|
12467
|
+
return Cell.renderTreeIcon(h, params, Cell.renderCheckboxCell(h, params));
|
|
12462
12468
|
},
|
|
12463
|
-
|
|
12469
|
+
renderCheckboxCellByProp: function renderCheckboxCellByProp(h, params) {
|
|
12464
12470
|
var $table = params.$table,
|
|
12465
12471
|
row = params.row,
|
|
12466
12472
|
column = params.column,
|
|
@@ -12544,7 +12550,7 @@ var Cell = {
|
|
|
12544
12550
|
}, checkVNs)];
|
|
12545
12551
|
},
|
|
12546
12552
|
renderTreeSelectionCellByProp: function renderTreeSelectionCellByProp(h, params) {
|
|
12547
|
-
return Cell.renderTreeIcon(h, params, Cell.
|
|
12553
|
+
return Cell.renderTreeIcon(h, params, Cell.renderCheckboxCellByProp(h, params));
|
|
12548
12554
|
},
|
|
12549
12555
|
|
|
12550
12556
|
/**
|
|
@@ -12840,6 +12846,7 @@ var Cell = {
|
|
|
12840
12846
|
|
|
12841
12847
|
|
|
12842
12848
|
|
|
12849
|
+
|
|
12843
12850
|
|
|
12844
12851
|
|
|
12845
12852
|
var methods_getRowid = UtilTools.getRowid,
|
|
@@ -13232,10 +13239,45 @@ var Methods = {
|
|
|
13232
13239
|
return this.handleTableData(true).then(this.updateFooter).then(this.recalculate);
|
|
13233
13240
|
},
|
|
13234
13241
|
handleTableData: function handleTableData(force) {
|
|
13235
|
-
var
|
|
13236
|
-
|
|
13237
|
-
var
|
|
13238
|
-
|
|
13242
|
+
var _this2 = this;
|
|
13243
|
+
|
|
13244
|
+
var treeConfig = this.treeConfig,
|
|
13245
|
+
scrollYLoad = this.scrollYLoad,
|
|
13246
|
+
scrollYStore = this.scrollYStore,
|
|
13247
|
+
fullDataRowIdData = this.fullDataRowIdData,
|
|
13248
|
+
treeExpandeds = this.treeExpandeds,
|
|
13249
|
+
treeOpts = this.treeOpts;
|
|
13250
|
+
var fullList = []; // 是否进行数据处理
|
|
13251
|
+
|
|
13252
|
+
if (force) {
|
|
13253
|
+
this.updateAfterFullData();
|
|
13254
|
+
} // 如果为虚拟树,将树结构拍平
|
|
13255
|
+
|
|
13256
|
+
|
|
13257
|
+
if (treeConfig && treeOpts.transform) {
|
|
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;
|
|
13269
|
+
}
|
|
13270
|
+
|
|
13271
|
+
var tableData = scrollYLoad ? fullList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullList.slice(0);
|
|
13272
|
+
tableData.forEach(function (row, $index) {
|
|
13273
|
+
var rowid = methods_getRowid(_this2, row);
|
|
13274
|
+
var rest = fullDataRowIdData[rowid];
|
|
13275
|
+
|
|
13276
|
+
if (rest) {
|
|
13277
|
+
rest.$index = $index;
|
|
13278
|
+
}
|
|
13279
|
+
});
|
|
13280
|
+
this.tableData = tableData;
|
|
13239
13281
|
return this.$nextTick();
|
|
13240
13282
|
},
|
|
13241
13283
|
updateScrollYStatus: function updateScrollYStatus(fullData) {
|
|
@@ -13253,7 +13295,7 @@ var Methods = {
|
|
|
13253
13295
|
* @param {Array} datas 数据
|
|
13254
13296
|
*/
|
|
13255
13297
|
loadTableData: function loadTableData(datas) {
|
|
13256
|
-
var
|
|
13298
|
+
var _this3 = this;
|
|
13257
13299
|
|
|
13258
13300
|
var keepSource = this.keepSource,
|
|
13259
13301
|
treeConfig = this.treeConfig,
|
|
@@ -13275,7 +13317,8 @@ var Methods = {
|
|
|
13275
13317
|
treeData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toArrayTree(fullData, {
|
|
13276
13318
|
key: treeOpts.rowField,
|
|
13277
13319
|
parentKey: treeOpts.parentField,
|
|
13278
|
-
children: treeOpts.children
|
|
13320
|
+
children: treeOpts.children,
|
|
13321
|
+
mapChildren: treeOpts.mapChildren
|
|
13279
13322
|
});
|
|
13280
13323
|
fullData = treeData.slice(0);
|
|
13281
13324
|
} else {
|
|
@@ -13293,7 +13336,7 @@ var Methods = {
|
|
|
13293
13336
|
this.scrollYLoad = sYLoad; // 全量数据
|
|
13294
13337
|
|
|
13295
13338
|
this.tableFullData = fullData;
|
|
13296
|
-
this.
|
|
13339
|
+
this.tableFullTreeData = treeData; // 缓存数据
|
|
13297
13340
|
|
|
13298
13341
|
this.cacheRowMap(true); // 原始数据
|
|
13299
13342
|
|
|
@@ -13315,31 +13358,31 @@ var Methods = {
|
|
|
13315
13358
|
this.handleTableData(true);
|
|
13316
13359
|
this.updateFooter();
|
|
13317
13360
|
return this.$nextTick().then(function () {
|
|
13318
|
-
|
|
13361
|
+
_this3.updateHeight();
|
|
13319
13362
|
|
|
13320
|
-
|
|
13363
|
+
_this3.updateStyle();
|
|
13321
13364
|
}).then(function () {
|
|
13322
|
-
|
|
13365
|
+
_this3.computeScrollLoad();
|
|
13323
13366
|
}).then(function () {
|
|
13324
13367
|
// 是否启用了虚拟滚动
|
|
13325
13368
|
if (sYLoad) {
|
|
13326
13369
|
scrollYStore.endIndex = scrollYStore.visibleSize;
|
|
13327
13370
|
}
|
|
13328
13371
|
|
|
13329
|
-
|
|
13372
|
+
_this3.handleReserveStatus();
|
|
13330
13373
|
|
|
13331
|
-
|
|
13374
|
+
_this3.checkSelectionStatus();
|
|
13332
13375
|
|
|
13333
13376
|
return new Promise(function (resolve) {
|
|
13334
|
-
|
|
13335
|
-
return
|
|
13377
|
+
_this3.$nextTick().then(function () {
|
|
13378
|
+
return _this3.recalculate();
|
|
13336
13379
|
}).then(function () {
|
|
13337
13380
|
// 是否变更虚拟滚动
|
|
13338
13381
|
if (oldScrollYLoad === sYLoad) {
|
|
13339
|
-
restoreScrollLocation(
|
|
13382
|
+
restoreScrollLocation(_this3, lastScrollLeft, lastScrollTop).then(resolve);
|
|
13340
13383
|
} else {
|
|
13341
13384
|
setTimeout(function () {
|
|
13342
|
-
return restoreScrollLocation(
|
|
13385
|
+
return restoreScrollLocation(_this3, lastScrollLeft, lastScrollTop).then(resolve);
|
|
13343
13386
|
});
|
|
13344
13387
|
}
|
|
13345
13388
|
});
|
|
@@ -13352,23 +13395,23 @@ var Methods = {
|
|
|
13352
13395
|
* @param {Array} datas 数据
|
|
13353
13396
|
*/
|
|
13354
13397
|
loadData: function loadData(datas) {
|
|
13355
|
-
var
|
|
13398
|
+
var _this4 = this;
|
|
13356
13399
|
|
|
13357
13400
|
var inited = this.inited,
|
|
13358
13401
|
initStatus = this.initStatus;
|
|
13359
13402
|
return this.loadTableData(datas).then(function () {
|
|
13360
|
-
|
|
13361
|
-
|
|
13403
|
+
_this4.inited = true;
|
|
13404
|
+
_this4.initStatus = true;
|
|
13362
13405
|
|
|
13363
13406
|
if (!initStatus) {
|
|
13364
|
-
|
|
13407
|
+
_this4.handleLoadDefaults();
|
|
13365
13408
|
}
|
|
13366
13409
|
|
|
13367
13410
|
if (!inited) {
|
|
13368
|
-
|
|
13411
|
+
_this4.handleInitDefaults();
|
|
13369
13412
|
}
|
|
13370
13413
|
|
|
13371
|
-
return
|
|
13414
|
+
return _this4.recalculate();
|
|
13372
13415
|
});
|
|
13373
13416
|
},
|
|
13374
13417
|
|
|
@@ -13377,21 +13420,21 @@ var Methods = {
|
|
|
13377
13420
|
* @param {Array} datas 数据
|
|
13378
13421
|
*/
|
|
13379
13422
|
reloadData: function reloadData(datas) {
|
|
13380
|
-
var
|
|
13423
|
+
var _this5 = this;
|
|
13381
13424
|
|
|
13382
13425
|
var inited = this.inited;
|
|
13383
13426
|
return this.clearAll().then(function () {
|
|
13384
|
-
|
|
13385
|
-
|
|
13386
|
-
return
|
|
13427
|
+
_this5.inited = true;
|
|
13428
|
+
_this5.initStatus = true;
|
|
13429
|
+
return _this5.loadTableData(datas);
|
|
13387
13430
|
}).then(function () {
|
|
13388
|
-
|
|
13431
|
+
_this5.handleLoadDefaults();
|
|
13389
13432
|
|
|
13390
13433
|
if (!inited) {
|
|
13391
|
-
|
|
13434
|
+
_this5.handleInitDefaults();
|
|
13392
13435
|
}
|
|
13393
13436
|
|
|
13394
|
-
return
|
|
13437
|
+
return _this5.recalculate();
|
|
13395
13438
|
});
|
|
13396
13439
|
},
|
|
13397
13440
|
|
|
@@ -13436,10 +13479,10 @@ var Methods = {
|
|
|
13436
13479
|
* @param {ColumnInfo} columns 列配置
|
|
13437
13480
|
*/
|
|
13438
13481
|
loadColumn: function loadColumn(columns) {
|
|
13439
|
-
var
|
|
13482
|
+
var _this6 = this;
|
|
13440
13483
|
|
|
13441
13484
|
var collectColumn = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.mapTree(columns, function (column) {
|
|
13442
|
-
return src_cell.createColumn(
|
|
13485
|
+
return src_cell.createColumn(_this6, column);
|
|
13443
13486
|
}, {
|
|
13444
13487
|
children: 'children'
|
|
13445
13488
|
});
|
|
@@ -13452,14 +13495,14 @@ var Methods = {
|
|
|
13452
13495
|
* @param {ColumnInfo} columns 列配置
|
|
13453
13496
|
*/
|
|
13454
13497
|
reloadColumn: function reloadColumn(columns) {
|
|
13455
|
-
var
|
|
13498
|
+
var _this7 = this;
|
|
13456
13499
|
|
|
13457
13500
|
return this.clearAll().then(function () {
|
|
13458
|
-
return
|
|
13501
|
+
return _this7.loadColumn(columns);
|
|
13459
13502
|
});
|
|
13460
13503
|
},
|
|
13461
13504
|
handleColumn: function handleColumn(collectColumn) {
|
|
13462
|
-
var
|
|
13505
|
+
var _this8 = this;
|
|
13463
13506
|
|
|
13464
13507
|
this.collectColumn = collectColumn;
|
|
13465
13508
|
var tableFullColumn = methods_getColumnList(collectColumn);
|
|
@@ -13467,8 +13510,8 @@ var Methods = {
|
|
|
13467
13510
|
this.cacheColumnMap();
|
|
13468
13511
|
this.restoreCustomStorage();
|
|
13469
13512
|
this.parseColumns().then(function () {
|
|
13470
|
-
if (
|
|
13471
|
-
|
|
13513
|
+
if (_this8.scrollXLoad) {
|
|
13514
|
+
_this8.loadScrollXData(true);
|
|
13472
13515
|
}
|
|
13473
13516
|
});
|
|
13474
13517
|
this.clearMergeCells();
|
|
@@ -13478,14 +13521,14 @@ var Methods = {
|
|
|
13478
13521
|
if (false) {}
|
|
13479
13522
|
|
|
13480
13523
|
return this.$nextTick().then(function () {
|
|
13481
|
-
if (
|
|
13482
|
-
|
|
13524
|
+
if (_this8.$toolbar) {
|
|
13525
|
+
_this8.$toolbar.syncUpdate({
|
|
13483
13526
|
collectColumn: collectColumn,
|
|
13484
|
-
$table:
|
|
13527
|
+
$table: _this8
|
|
13485
13528
|
});
|
|
13486
13529
|
}
|
|
13487
13530
|
|
|
13488
|
-
return
|
|
13531
|
+
return _this8.recalculate();
|
|
13489
13532
|
});
|
|
13490
13533
|
},
|
|
13491
13534
|
|
|
@@ -13494,20 +13537,23 @@ var Methods = {
|
|
|
13494
13537
|
* 牺牲数据组装的耗时,用来换取使用过程中的流畅
|
|
13495
13538
|
*/
|
|
13496
13539
|
cacheRowMap: function cacheRowMap(source) {
|
|
13497
|
-
var
|
|
13540
|
+
var _this9 = this;
|
|
13498
13541
|
|
|
13499
13542
|
var treeConfig = this.treeConfig,
|
|
13500
13543
|
treeOpts = this.treeOpts,
|
|
13501
13544
|
tableFullData = this.tableFullData,
|
|
13502
13545
|
fullDataRowMap = this.fullDataRowMap,
|
|
13503
|
-
fullAllDataRowMap = this.fullAllDataRowMap
|
|
13546
|
+
fullAllDataRowMap = this.fullAllDataRowMap,
|
|
13547
|
+
tableFullTreeData = this.tableFullTreeData;
|
|
13504
13548
|
var fullDataRowIdData = this.fullDataRowIdData,
|
|
13505
13549
|
fullAllDataRowIdData = this.fullAllDataRowIdData;
|
|
13506
13550
|
var rowkey = getRowkey(this);
|
|
13507
13551
|
var isLazy = treeConfig && treeOpts.lazy;
|
|
13508
13552
|
|
|
13509
13553
|
var handleCache = function handleCache(row, index, items, path, parent, nodes) {
|
|
13510
|
-
var rowid = methods_getRowid(
|
|
13554
|
+
var rowid = methods_getRowid(_this9, row);
|
|
13555
|
+
var seq = treeConfig && path ? toTreePathSeq(path) : index + 1;
|
|
13556
|
+
var level = nodes ? nodes.length - 1 : 0;
|
|
13511
13557
|
|
|
13512
13558
|
if (eqEmptyValue(rowid)) {
|
|
13513
13559
|
rowid = getRowUniqueId();
|
|
@@ -13521,10 +13567,13 @@ var Methods = {
|
|
|
13521
13567
|
var rest = {
|
|
13522
13568
|
row: row,
|
|
13523
13569
|
rowid: rowid,
|
|
13570
|
+
seq: seq,
|
|
13524
13571
|
index: treeConfig && parent ? -1 : index,
|
|
13572
|
+
_index: -1,
|
|
13573
|
+
$index: -1,
|
|
13525
13574
|
items: items,
|
|
13526
13575
|
parent: parent,
|
|
13527
|
-
level:
|
|
13576
|
+
level: level
|
|
13528
13577
|
};
|
|
13529
13578
|
|
|
13530
13579
|
if (source) {
|
|
@@ -13545,13 +13594,13 @@ var Methods = {
|
|
|
13545
13594
|
fullAllDataRowMap.clear();
|
|
13546
13595
|
|
|
13547
13596
|
if (treeConfig) {
|
|
13548
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(
|
|
13597
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(tableFullTreeData, handleCache, treeOpts);
|
|
13549
13598
|
} else {
|
|
13550
13599
|
tableFullData.forEach(handleCache);
|
|
13551
13600
|
}
|
|
13552
13601
|
},
|
|
13553
13602
|
loadTreeChildren: function loadTreeChildren(row, childRecords) {
|
|
13554
|
-
var
|
|
13603
|
+
var _this10 = this;
|
|
13555
13604
|
|
|
13556
13605
|
var keepSource = this.keepSource,
|
|
13557
13606
|
tableSourceData = this.tableSourceData,
|
|
@@ -13560,14 +13609,16 @@ var Methods = {
|
|
|
13560
13609
|
fullDataRowMap = this.fullDataRowMap,
|
|
13561
13610
|
fullAllDataRowMap = this.fullAllDataRowMap,
|
|
13562
13611
|
fullAllDataRowIdData = this.fullAllDataRowIdData;
|
|
13563
|
-
var
|
|
13612
|
+
var transform = treeOpts.transform,
|
|
13613
|
+
children = treeOpts.children,
|
|
13614
|
+
mapChildren = treeOpts.mapChildren;
|
|
13564
13615
|
var rest = fullAllDataRowIdData[methods_getRowid(this, row)];
|
|
13565
13616
|
var parentLevel = rest ? rest.level : 0;
|
|
13566
13617
|
return this.createData(childRecords).then(function (rows) {
|
|
13567
13618
|
if (keepSource) {
|
|
13568
|
-
var rowid = methods_getRowid(
|
|
13619
|
+
var rowid = methods_getRowid(_this10, row);
|
|
13569
13620
|
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableSourceData, function (item) {
|
|
13570
|
-
return rowid === methods_getRowid(
|
|
13621
|
+
return rowid === methods_getRowid(_this10, item);
|
|
13571
13622
|
}, treeOpts);
|
|
13572
13623
|
|
|
13573
13624
|
if (matchObj) {
|
|
@@ -13576,11 +13627,14 @@ var Methods = {
|
|
|
13576
13627
|
}
|
|
13577
13628
|
|
|
13578
13629
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(rows, function (childRow, index, items, path, parent, nodes) {
|
|
13579
|
-
var rowid = methods_getRowid(
|
|
13630
|
+
var rowid = methods_getRowid(_this10, childRow);
|
|
13580
13631
|
var rest = {
|
|
13581
13632
|
row: childRow,
|
|
13582
13633
|
rowid: rowid,
|
|
13634
|
+
seq: -1,
|
|
13583
13635
|
index: -1,
|
|
13636
|
+
_index: -1,
|
|
13637
|
+
$index: -1,
|
|
13584
13638
|
items: items,
|
|
13585
13639
|
parent: parent,
|
|
13586
13640
|
level: parentLevel + nodes.length
|
|
@@ -13591,6 +13645,11 @@ var Methods = {
|
|
|
13591
13645
|
fullAllDataRowMap.set(childRow, rest);
|
|
13592
13646
|
}, treeOpts);
|
|
13593
13647
|
row[children] = rows;
|
|
13648
|
+
|
|
13649
|
+
if (transform) {
|
|
13650
|
+
row[mapChildren] = rows;
|
|
13651
|
+
}
|
|
13652
|
+
|
|
13594
13653
|
return rows;
|
|
13595
13654
|
});
|
|
13596
13655
|
},
|
|
@@ -13600,7 +13659,7 @@ var Methods = {
|
|
|
13600
13659
|
* 牺牲数据组装的耗时,用来换取使用过程中的流畅
|
|
13601
13660
|
*/
|
|
13602
13661
|
cacheColumnMap: function cacheColumnMap() {
|
|
13603
|
-
var
|
|
13662
|
+
var _this11 = this;
|
|
13604
13663
|
|
|
13605
13664
|
var tableFullColumn = this.tableFullColumn,
|
|
13606
13665
|
collectColumn = this.collectColumn,
|
|
@@ -13737,6 +13796,25 @@ var Methods = {
|
|
|
13737
13796
|
return null;
|
|
13738
13797
|
},
|
|
13739
13798
|
|
|
13799
|
+
/**
|
|
13800
|
+
* 根据 row 获取序号
|
|
13801
|
+
* @param {Row} row 行对象
|
|
13802
|
+
*/
|
|
13803
|
+
getRowSeq: function getRowSeq(row) {
|
|
13804
|
+
var fullDataRowIdData = this.fullDataRowIdData;
|
|
13805
|
+
|
|
13806
|
+
if (row) {
|
|
13807
|
+
var rowid = methods_getRowid(this, row);
|
|
13808
|
+
var rest = fullDataRowIdData[rowid];
|
|
13809
|
+
|
|
13810
|
+
if (rest) {
|
|
13811
|
+
return rest.seq;
|
|
13812
|
+
}
|
|
13813
|
+
}
|
|
13814
|
+
|
|
13815
|
+
return -1;
|
|
13816
|
+
},
|
|
13817
|
+
|
|
13740
13818
|
/**
|
|
13741
13819
|
* 根据 row 获取相对于 data 中的索引
|
|
13742
13820
|
* @param {Row} row 行对象
|
|
@@ -13875,13 +13953,13 @@ var Methods = {
|
|
|
13875
13953
|
* @param {Array} records 新数据
|
|
13876
13954
|
*/
|
|
13877
13955
|
createData: function createData(records) {
|
|
13878
|
-
var
|
|
13956
|
+
var _this12 = this;
|
|
13879
13957
|
|
|
13880
13958
|
var treeConfig = this.treeConfig,
|
|
13881
13959
|
treeOpts = this.treeOpts;
|
|
13882
13960
|
|
|
13883
13961
|
var handleRrecord = function handleRrecord(record) {
|
|
13884
|
-
return
|
|
13962
|
+
return _this12.defineField(Object.assign({}, record));
|
|
13885
13963
|
};
|
|
13886
13964
|
|
|
13887
13965
|
var rows = treeConfig ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.mapTree(records, handleRrecord, treeOpts) : records.map(handleRrecord);
|
|
@@ -13896,7 +13974,7 @@ var Methods = {
|
|
|
13896
13974
|
* @param {Array/Object} records 新数据
|
|
13897
13975
|
*/
|
|
13898
13976
|
createRow: function createRow(records) {
|
|
13899
|
-
var
|
|
13977
|
+
var _this13 = this;
|
|
13900
13978
|
|
|
13901
13979
|
var isArr = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(records);
|
|
13902
13980
|
|
|
@@ -13905,7 +13983,7 @@ var Methods = {
|
|
|
13905
13983
|
}
|
|
13906
13984
|
|
|
13907
13985
|
return this.$nextTick().then(function () {
|
|
13908
|
-
return
|
|
13986
|
+
return _this13.createData(records).then(function (rows) {
|
|
13909
13987
|
return isArr ? rows : rows[0];
|
|
13910
13988
|
});
|
|
13911
13989
|
});
|
|
@@ -13919,7 +13997,7 @@ var Methods = {
|
|
|
13919
13997
|
* 如果还额外传了 field 则还原指定的单元格数据
|
|
13920
13998
|
*/
|
|
13921
13999
|
revertData: function revertData(rows, field) {
|
|
13922
|
-
var
|
|
14000
|
+
var _this14 = this;
|
|
13923
14001
|
|
|
13924
14002
|
var keepSource = this.keepSource,
|
|
13925
14003
|
tableSourceData = this.tableSourceData,
|
|
@@ -13943,8 +14021,8 @@ var Methods = {
|
|
|
13943
14021
|
|
|
13944
14022
|
if (targetRows.length) {
|
|
13945
14023
|
targetRows.forEach(function (row) {
|
|
13946
|
-
if (!
|
|
13947
|
-
var rowIndex =
|
|
14024
|
+
if (!_this14.isInsertByRow(row)) {
|
|
14025
|
+
var rowIndex = _this14.getRowIndex(row);
|
|
13948
14026
|
|
|
13949
14027
|
if (treeConfig && rowIndex === -1) {
|
|
13950
14028
|
throw new Error(UtilTools.getLog('vxe.error.noTree', ['revertData']));
|
|
@@ -14028,7 +14106,7 @@ var Methods = {
|
|
|
14028
14106
|
* @param {String} field 字段名
|
|
14029
14107
|
*/
|
|
14030
14108
|
isUpdateByRow: function isUpdateByRow(row, field) {
|
|
14031
|
-
var
|
|
14109
|
+
var _this15 = this;
|
|
14032
14110
|
|
|
14033
14111
|
var visibleColumn = this.visibleColumn,
|
|
14034
14112
|
keepSource = this.keepSource,
|
|
@@ -14048,7 +14126,7 @@ var Methods = {
|
|
|
14048
14126
|
if (treeConfig) {
|
|
14049
14127
|
var children = treeOpts.children;
|
|
14050
14128
|
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableSourceData, function (item) {
|
|
14051
|
-
return rowid === methods_getRowid(
|
|
14129
|
+
return rowid === methods_getRowid(_this15, item);
|
|
14052
14130
|
}, treeOpts);
|
|
14053
14131
|
row = Object.assign({}, row, _defineProperty({}, children, null));
|
|
14054
14132
|
|
|
@@ -14171,18 +14249,23 @@ var Methods = {
|
|
|
14171
14249
|
* 如果存在筛选条件,继续处理
|
|
14172
14250
|
*/
|
|
14173
14251
|
updateAfterFullData: function updateAfterFullData() {
|
|
14174
|
-
var
|
|
14252
|
+
var _this16 = this;
|
|
14175
14253
|
|
|
14176
14254
|
var tableFullColumn = this.tableFullColumn,
|
|
14177
14255
|
tableFullData = this.tableFullData,
|
|
14178
14256
|
filterOpts = this.filterOpts,
|
|
14179
|
-
sortOpts = this.sortOpts
|
|
14257
|
+
sortOpts = this.sortOpts,
|
|
14258
|
+
treeConfig = this.treeConfig,
|
|
14259
|
+
treeOpts = this.treeOpts,
|
|
14260
|
+
tableFullTreeData = this.tableFullTreeData;
|
|
14180
14261
|
var allRemoteFilter = filterOpts.remote,
|
|
14181
14262
|
allFilterMethod = filterOpts.filterMethod;
|
|
14182
14263
|
var allRemoteSort = sortOpts.remote,
|
|
14183
14264
|
allSortMethod = sortOpts.sortMethod,
|
|
14184
14265
|
sortMultiple = sortOpts.multiple;
|
|
14185
|
-
var
|
|
14266
|
+
var transform = treeOpts.transform;
|
|
14267
|
+
var tableData = [];
|
|
14268
|
+
var tableTree = [];
|
|
14186
14269
|
var filterColumns = [];
|
|
14187
14270
|
var orderColumns = [];
|
|
14188
14271
|
tableFullColumn.forEach(function (column) {
|
|
@@ -14219,7 +14302,7 @@ var Methods = {
|
|
|
14219
14302
|
});
|
|
14220
14303
|
|
|
14221
14304
|
if (filterColumns.length) {
|
|
14222
|
-
|
|
14305
|
+
var handleFilter = function handleFilter(row) {
|
|
14223
14306
|
return filterColumns.every(function (_ref) {
|
|
14224
14307
|
var column = _ref.column,
|
|
14225
14308
|
valueList = _ref.valueList,
|
|
@@ -14241,7 +14324,7 @@ var Methods = {
|
|
|
14241
14324
|
cellValue: cellValue,
|
|
14242
14325
|
row: row,
|
|
14243
14326
|
column: column,
|
|
14244
|
-
$table:
|
|
14327
|
+
$table: _this16
|
|
14245
14328
|
});
|
|
14246
14329
|
});
|
|
14247
14330
|
} else if (compFilterMethod) {
|
|
@@ -14252,7 +14335,7 @@ var Methods = {
|
|
|
14252
14335
|
cellValue: cellValue,
|
|
14253
14336
|
row: row,
|
|
14254
14337
|
column: column,
|
|
14255
|
-
$table:
|
|
14338
|
+
$table: _this16
|
|
14256
14339
|
});
|
|
14257
14340
|
});
|
|
14258
14341
|
} else if (allFilterMethod) {
|
|
@@ -14271,7 +14354,7 @@ var Methods = {
|
|
|
14271
14354
|
cellValue: cellValue,
|
|
14272
14355
|
row: row,
|
|
14273
14356
|
column: column,
|
|
14274
|
-
$table:
|
|
14357
|
+
$table: _this16
|
|
14275
14358
|
});
|
|
14276
14359
|
});
|
|
14277
14360
|
}
|
|
@@ -14281,7 +14364,19 @@ var Methods = {
|
|
|
14281
14364
|
|
|
14282
14365
|
return true;
|
|
14283
14366
|
});
|
|
14284
|
-
}
|
|
14367
|
+
};
|
|
14368
|
+
|
|
14369
|
+
if (treeConfig && transform) {
|
|
14370
|
+
tableTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.searchTree(tableFullTreeData, handleFilter, _objectSpread2(_objectSpread2({}, treeOpts), {}, {
|
|
14371
|
+
original: true
|
|
14372
|
+
}));
|
|
14373
|
+
} else {
|
|
14374
|
+
tableData = treeConfig ? tableFullTreeData.filter(handleFilter) : tableFullData.filter(handleFilter);
|
|
14375
|
+
tableTree = tableData;
|
|
14376
|
+
}
|
|
14377
|
+
} else {
|
|
14378
|
+
tableData = treeConfig ? tableFullTreeData.slice(0) : tableFullData.slice(0);
|
|
14379
|
+
tableTree = tableData;
|
|
14285
14380
|
}
|
|
14286
14381
|
|
|
14287
14382
|
var firstOrderColumn = orderColumns[0];
|
|
@@ -14303,7 +14398,7 @@ var Methods = {
|
|
|
14303
14398
|
tableData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.orderBy(tableData, orderColumns.map(function (_ref2) {
|
|
14304
14399
|
var column = _ref2.column,
|
|
14305
14400
|
order = _ref2.order;
|
|
14306
|
-
return [getOrderField(
|
|
14401
|
+
return [getOrderField(_this16, column), order];
|
|
14307
14402
|
}));
|
|
14308
14403
|
} else {
|
|
14309
14404
|
// 兼容 v2,在 v4 中废弃, sortBy 不能为数组
|
|
@@ -14318,14 +14413,113 @@ var Methods = {
|
|
|
14318
14413
|
tableData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.orderBy(tableData, sortByConfs || [firstOrderColumn].map(function (_ref3) {
|
|
14319
14414
|
var column = _ref3.column,
|
|
14320
14415
|
order = _ref3.order;
|
|
14321
|
-
return [getOrderField(
|
|
14416
|
+
return [getOrderField(_this16, column), order];
|
|
14322
14417
|
}));
|
|
14323
14418
|
}
|
|
14324
14419
|
}
|
|
14420
|
+
|
|
14421
|
+
tableTree = tableData;
|
|
14325
14422
|
}
|
|
14326
14423
|
|
|
14327
14424
|
this.afterFullData = tableData;
|
|
14328
|
-
|
|
14425
|
+
this.afterTreeFullData = tableTree;
|
|
14426
|
+
this.updateAfterDataIndex();
|
|
14427
|
+
},
|
|
14428
|
+
|
|
14429
|
+
/**
|
|
14430
|
+
* 预编译
|
|
14431
|
+
* 对渲染中的数据提前解析序号及索引。牺牲提前编译耗时换取渲染中额外损耗,使运行时更加流畅
|
|
14432
|
+
*/
|
|
14433
|
+
updateAfterDataIndex: function updateAfterDataIndex() {
|
|
14434
|
+
var _this17 = this;
|
|
14435
|
+
|
|
14436
|
+
var treeConfig = this.treeConfig,
|
|
14437
|
+
afterFullData = this.afterFullData,
|
|
14438
|
+
fullDataRowIdData = this.fullDataRowIdData,
|
|
14439
|
+
fullAllDataRowIdData = this.fullAllDataRowIdData,
|
|
14440
|
+
afterTreeFullData = this.afterTreeFullData,
|
|
14441
|
+
treeOpts = this.treeOpts;
|
|
14442
|
+
|
|
14443
|
+
if (treeConfig) {
|
|
14444
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(afterTreeFullData, function (row, index, items, path) {
|
|
14445
|
+
var rowid = methods_getRowid(_this17, row);
|
|
14446
|
+
var allrest = fullAllDataRowIdData[rowid];
|
|
14447
|
+
var fullrest = fullDataRowIdData[rowid];
|
|
14448
|
+
var seq = path.map(function (num, i) {
|
|
14449
|
+
return i % 2 === 0 ? Number(num) + 1 : '.';
|
|
14450
|
+
}).join('');
|
|
14451
|
+
|
|
14452
|
+
if (allrest) {
|
|
14453
|
+
allrest.seq = seq;
|
|
14454
|
+
}
|
|
14455
|
+
|
|
14456
|
+
if (fullrest) {
|
|
14457
|
+
fullrest.seq = seq;
|
|
14458
|
+
} else {
|
|
14459
|
+
fullAllDataRowIdData[rowid] = {
|
|
14460
|
+
row: row,
|
|
14461
|
+
rowid: rowid,
|
|
14462
|
+
seq: seq,
|
|
14463
|
+
index: -1,
|
|
14464
|
+
$index: -1,
|
|
14465
|
+
_index: index,
|
|
14466
|
+
items: [],
|
|
14467
|
+
parent: null,
|
|
14468
|
+
level: 0
|
|
14469
|
+
};
|
|
14470
|
+
fullDataRowIdData[rowid] = {
|
|
14471
|
+
row: row,
|
|
14472
|
+
rowid: rowid,
|
|
14473
|
+
seq: seq,
|
|
14474
|
+
index: -1,
|
|
14475
|
+
$index: -1,
|
|
14476
|
+
_index: index,
|
|
14477
|
+
items: [],
|
|
14478
|
+
parent: null,
|
|
14479
|
+
level: 0
|
|
14480
|
+
};
|
|
14481
|
+
}
|
|
14482
|
+
}, treeOpts);
|
|
14483
|
+
} else {
|
|
14484
|
+
afterFullData.forEach(function (row, index) {
|
|
14485
|
+
var rowid = methods_getRowid(_this17, row);
|
|
14486
|
+
var allrest = fullAllDataRowIdData[rowid];
|
|
14487
|
+
var fullrest = fullDataRowIdData[rowid];
|
|
14488
|
+
var seq = index + 1;
|
|
14489
|
+
|
|
14490
|
+
if (allrest) {
|
|
14491
|
+
allrest.seq = seq;
|
|
14492
|
+
}
|
|
14493
|
+
|
|
14494
|
+
if (fullrest) {
|
|
14495
|
+
fullrest.seq = seq;
|
|
14496
|
+
fullrest._index = index;
|
|
14497
|
+
} else {
|
|
14498
|
+
fullAllDataRowIdData[rowid] = {
|
|
14499
|
+
row: row,
|
|
14500
|
+
rowid: rowid,
|
|
14501
|
+
seq: seq,
|
|
14502
|
+
index: -1,
|
|
14503
|
+
$index: -1,
|
|
14504
|
+
_index: index,
|
|
14505
|
+
items: [],
|
|
14506
|
+
parent: null,
|
|
14507
|
+
level: 0
|
|
14508
|
+
};
|
|
14509
|
+
fullDataRowIdData[rowid] = {
|
|
14510
|
+
row: row,
|
|
14511
|
+
rowid: rowid,
|
|
14512
|
+
seq: seq,
|
|
14513
|
+
index: -1,
|
|
14514
|
+
$index: -1,
|
|
14515
|
+
_index: index,
|
|
14516
|
+
items: [],
|
|
14517
|
+
parent: null,
|
|
14518
|
+
level: 0
|
|
14519
|
+
};
|
|
14520
|
+
}
|
|
14521
|
+
});
|
|
14522
|
+
}
|
|
14329
14523
|
},
|
|
14330
14524
|
|
|
14331
14525
|
/**
|
|
@@ -14369,7 +14563,7 @@ var Methods = {
|
|
|
14369
14563
|
* 默认执行一次,除非被重置
|
|
14370
14564
|
*/
|
|
14371
14565
|
handleLoadDefaults: function handleLoadDefaults() {
|
|
14372
|
-
var
|
|
14566
|
+
var _this18 = this;
|
|
14373
14567
|
|
|
14374
14568
|
if (this.checkboxConfig) {
|
|
14375
14569
|
this.handleDefaultSelectionChecked();
|
|
@@ -14396,7 +14590,7 @@ var Methods = {
|
|
|
14396
14590
|
}
|
|
14397
14591
|
|
|
14398
14592
|
this.$nextTick(function () {
|
|
14399
|
-
return setTimeout(
|
|
14593
|
+
return setTimeout(_this18.recalculate);
|
|
14400
14594
|
});
|
|
14401
14595
|
},
|
|
14402
14596
|
|
|
@@ -14646,12 +14840,12 @@ var Methods = {
|
|
|
14646
14840
|
* 刷新列配置
|
|
14647
14841
|
*/
|
|
14648
14842
|
refreshColumn: function refreshColumn() {
|
|
14649
|
-
var
|
|
14843
|
+
var _this19 = this;
|
|
14650
14844
|
|
|
14651
14845
|
return this.parseColumns().then(function () {
|
|
14652
|
-
return
|
|
14846
|
+
return _this19.refreshScroll();
|
|
14653
14847
|
}).then(function () {
|
|
14654
|
-
return
|
|
14848
|
+
return _this19.recalculate();
|
|
14655
14849
|
});
|
|
14656
14850
|
},
|
|
14657
14851
|
|
|
@@ -14660,7 +14854,7 @@ var Methods = {
|
|
|
14660
14854
|
* 将固定的列左边、右边分别靠边
|
|
14661
14855
|
*/
|
|
14662
14856
|
parseColumns: function parseColumns() {
|
|
14663
|
-
var
|
|
14857
|
+
var _this20 = this;
|
|
14664
14858
|
|
|
14665
14859
|
var leftList = [];
|
|
14666
14860
|
var centerList = [];
|
|
@@ -14767,11 +14961,11 @@ var Methods = {
|
|
|
14767
14961
|
this.visibleColumn = visibleColumn;
|
|
14768
14962
|
this.handleTableColumn();
|
|
14769
14963
|
return this.updateFooter().then(function () {
|
|
14770
|
-
return
|
|
14964
|
+
return _this20.recalculate();
|
|
14771
14965
|
}).then(function () {
|
|
14772
|
-
|
|
14966
|
+
_this20.updateCellAreas();
|
|
14773
14967
|
|
|
14774
|
-
return
|
|
14968
|
+
return _this20.recalculate();
|
|
14775
14969
|
});
|
|
14776
14970
|
},
|
|
14777
14971
|
|
|
@@ -14855,7 +15049,7 @@ var Methods = {
|
|
|
14855
15049
|
* 支持 width=? width=?px width=?% min-width=? min-width=?px min-width=?%
|
|
14856
15050
|
*/
|
|
14857
15051
|
recalculate: function recalculate(refull) {
|
|
14858
|
-
var
|
|
15052
|
+
var _this21 = this;
|
|
14859
15053
|
|
|
14860
15054
|
var $refs = this.$refs;
|
|
14861
15055
|
var tableBody = $refs.tableBody,
|
|
@@ -14871,9 +15065,9 @@ var Methods = {
|
|
|
14871
15065
|
if (refull === true) {
|
|
14872
15066
|
// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
|
|
14873
15067
|
return this.computeScrollLoad().then(function () {
|
|
14874
|
-
|
|
15068
|
+
_this21.autoCellWidth(headerElem, bodyElem, footerElem);
|
|
14875
15069
|
|
|
14876
|
-
return
|
|
15070
|
+
return _this21.computeScrollLoad();
|
|
14877
15071
|
});
|
|
14878
15072
|
}
|
|
14879
15073
|
}
|
|
@@ -15021,7 +15215,7 @@ var Methods = {
|
|
|
15021
15215
|
this.customMaxHeight = methods_calcHeight(this, 'maxHeight');
|
|
15022
15216
|
},
|
|
15023
15217
|
updateStyle: function updateStyle() {
|
|
15024
|
-
var
|
|
15218
|
+
var _this22 = this;
|
|
15025
15219
|
|
|
15026
15220
|
var $refs = this.$refs,
|
|
15027
15221
|
isGroup = this.isGroup,
|
|
@@ -15125,7 +15319,7 @@ var Methods = {
|
|
|
15125
15319
|
|
|
15126
15320
|
if (isGroup && listElem) {
|
|
15127
15321
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.arrayEach(listElem.querySelectorAll('.col--group'), function (thElem) {
|
|
15128
|
-
var colNode =
|
|
15322
|
+
var colNode = _this22.getColumnNode(thElem);
|
|
15129
15323
|
|
|
15130
15324
|
if (colNode) {
|
|
15131
15325
|
var column = colNode.item;
|
|
@@ -15306,10 +15500,10 @@ var Methods = {
|
|
|
15306
15500
|
|
|
15307
15501
|
if (cellElem) {
|
|
15308
15502
|
if (colspan > 1) {
|
|
15309
|
-
var columnIndex =
|
|
15503
|
+
var columnIndex = _this22.getColumnIndex(column);
|
|
15310
15504
|
|
|
15311
15505
|
for (var _index = 1; _index < colspan; _index++) {
|
|
15312
|
-
var nextColumn =
|
|
15506
|
+
var nextColumn = _this22.getColumns(columnIndex + _index);
|
|
15313
15507
|
|
|
15314
15508
|
if (nextColumn) {
|
|
15315
15509
|
colWidth += nextColumn.renderWidth;
|
|
@@ -15359,15 +15553,15 @@ var Methods = {
|
|
|
15359
15553
|
}
|
|
15360
15554
|
},
|
|
15361
15555
|
preventEvent: function preventEvent(evnt, type, args, next, end) {
|
|
15362
|
-
var
|
|
15556
|
+
var _this23 = this;
|
|
15363
15557
|
|
|
15364
15558
|
var evntList = v_x_e_table.interceptor.get(type);
|
|
15365
15559
|
var rest;
|
|
15366
15560
|
|
|
15367
15561
|
if (!evntList.some(function (func) {
|
|
15368
15562
|
return func(Object.assign({
|
|
15369
|
-
$grid:
|
|
15370
|
-
$table:
|
|
15563
|
+
$grid: _this23.$xegrid,
|
|
15564
|
+
$table: _this23,
|
|
15371
15565
|
$event: evnt
|
|
15372
15566
|
}, args)) === false;
|
|
15373
15567
|
})) {
|
|
@@ -15387,7 +15581,7 @@ var Methods = {
|
|
|
15387
15581
|
* 全局按下事件处理
|
|
15388
15582
|
*/
|
|
15389
15583
|
handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
|
|
15390
|
-
var
|
|
15584
|
+
var _this24 = this;
|
|
15391
15585
|
|
|
15392
15586
|
var $el = this.$el,
|
|
15393
15587
|
$refs = this.$refs,
|
|
@@ -15448,7 +15642,7 @@ var Methods = {
|
|
|
15448
15642
|
} // 如果固定了高度且点击了行之外的空白处,则清除激活状态
|
|
15449
15643
|
|
|
15450
15644
|
|
|
15451
|
-
if (!isClearActived &&
|
|
15645
|
+
if (!isClearActived && _this24.height && !_this24.overflowY) {
|
|
15452
15646
|
var bodyWrapperElem = evnt.target;
|
|
15453
15647
|
|
|
15454
15648
|
if (methods_hasClass(bodyWrapperElem, 'vxe-table--body-wrapper')) {
|
|
@@ -15459,7 +15653,7 @@ var Methods = {
|
|
|
15459
15653
|
if (isClearActived || // 如果点击了当前表格之外
|
|
15460
15654
|
!getEventTargetNode(evnt, $el).flag) {
|
|
15461
15655
|
setTimeout(function () {
|
|
15462
|
-
return
|
|
15656
|
+
return _this24.clearActived(evnt);
|
|
15463
15657
|
});
|
|
15464
15658
|
}
|
|
15465
15659
|
});
|
|
@@ -15473,9 +15667,9 @@ var Methods = {
|
|
|
15473
15667
|
|
|
15474
15668
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
|
|
15475
15669
|
this.preventEvent(evnt, 'event.clearAreas', {}, function () {
|
|
15476
|
-
|
|
15670
|
+
_this24.clearCellAreas();
|
|
15477
15671
|
|
|
15478
|
-
|
|
15672
|
+
_this24.clearCopyCellArea();
|
|
15479
15673
|
});
|
|
15480
15674
|
}
|
|
15481
15675
|
}
|
|
@@ -15510,45 +15704,48 @@ var Methods = {
|
|
|
15510
15704
|
* 表格键盘事件
|
|
15511
15705
|
*/
|
|
15512
15706
|
keydownEvent: function keydownEvent(evnt) {
|
|
15513
|
-
var
|
|
15707
|
+
var _this25 = this;
|
|
15514
15708
|
|
|
15515
15709
|
var filterStore = this.filterStore,
|
|
15516
15710
|
ctxMenuStore = this.ctxMenuStore,
|
|
15517
15711
|
editStore = this.editStore,
|
|
15518
15712
|
keyboardConfig = this.keyboardConfig,
|
|
15519
15713
|
mouseConfig = this.mouseConfig,
|
|
15520
|
-
mouseOpts = this.mouseOpts
|
|
15714
|
+
mouseOpts = this.mouseOpts,
|
|
15715
|
+
keyboardOpts = this.keyboardOpts;
|
|
15521
15716
|
var actived = editStore.actived;
|
|
15522
15717
|
var keyCode = evnt.keyCode;
|
|
15523
15718
|
var isEsc = keyCode === 27;
|
|
15524
15719
|
|
|
15525
15720
|
if (isEsc) {
|
|
15526
15721
|
this.preventEvent(evnt, 'event.keydown', null, function () {
|
|
15527
|
-
if (keyboardConfig && mouseConfig && mouseOpts.area &&
|
|
15528
|
-
|
|
15722
|
+
if (keyboardConfig && mouseConfig && mouseOpts.area && _this25.handleKeyboardEvent) {
|
|
15723
|
+
_this25.handleKeyboardEvent(evnt);
|
|
15529
15724
|
} else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
|
|
15530
15725
|
evnt.stopPropagation(); // 如果按下了 Esc 键,关闭快捷菜单、筛选
|
|
15531
15726
|
|
|
15532
|
-
|
|
15727
|
+
_this25.closeFilter();
|
|
15533
15728
|
|
|
15534
|
-
|
|
15729
|
+
_this25.closeMenu();
|
|
15535
15730
|
|
|
15731
|
+
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
15732
|
+
// 如果是激活编辑状态,则取消编辑
|
|
15733
|
+
if (actived.row) {
|
|
15734
|
+
var params = actived.args;
|
|
15536
15735
|
|
|
15537
|
-
|
|
15538
|
-
var params = actived.args;
|
|
15539
|
-
|
|
15540
|
-
_this23.clearActived(evnt); // 如果配置了选中功能,则为选中状态
|
|
15736
|
+
_this25.clearActived(evnt); // 如果配置了选中功能,则为选中状态
|
|
15541
15737
|
|
|
15542
15738
|
|
|
15543
|
-
|
|
15544
|
-
|
|
15545
|
-
|
|
15546
|
-
|
|
15739
|
+
if (mouseConfig && mouseOpts.selected) {
|
|
15740
|
+
_this25.$nextTick(function () {
|
|
15741
|
+
return _this25.handleSelected(params, evnt);
|
|
15742
|
+
});
|
|
15743
|
+
}
|
|
15547
15744
|
}
|
|
15548
15745
|
}
|
|
15549
15746
|
}
|
|
15550
15747
|
|
|
15551
|
-
|
|
15748
|
+
_this25.emitEvent('keydown', {}, evnt);
|
|
15552
15749
|
});
|
|
15553
15750
|
}
|
|
15554
15751
|
},
|
|
@@ -15557,27 +15754,27 @@ var Methods = {
|
|
|
15557
15754
|
* 全局键盘事件
|
|
15558
15755
|
*/
|
|
15559
15756
|
handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
|
|
15560
|
-
var
|
|
15757
|
+
var _this26 = this;
|
|
15561
15758
|
|
|
15562
15759
|
// 该行为只对当前激活的表格有效
|
|
15563
15760
|
if (this.isActivated) {
|
|
15564
15761
|
this.preventEvent(evnt, 'event.keydown', null, function () {
|
|
15565
|
-
var filterStore =
|
|
15566
|
-
isCtxMenu =
|
|
15567
|
-
ctxMenuStore =
|
|
15568
|
-
editStore =
|
|
15569
|
-
editOpts =
|
|
15570
|
-
editConfig =
|
|
15571
|
-
mouseConfig =
|
|
15572
|
-
mouseOpts =
|
|
15573
|
-
keyboardConfig =
|
|
15574
|
-
keyboardOpts =
|
|
15575
|
-
treeConfig =
|
|
15576
|
-
treeOpts =
|
|
15577
|
-
highlightCurrentRow =
|
|
15578
|
-
currentRow =
|
|
15579
|
-
bodyCtxMenu =
|
|
15580
|
-
rowOpts =
|
|
15762
|
+
var filterStore = _this26.filterStore,
|
|
15763
|
+
isCtxMenu = _this26.isCtxMenu,
|
|
15764
|
+
ctxMenuStore = _this26.ctxMenuStore,
|
|
15765
|
+
editStore = _this26.editStore,
|
|
15766
|
+
editOpts = _this26.editOpts,
|
|
15767
|
+
editConfig = _this26.editConfig,
|
|
15768
|
+
mouseConfig = _this26.mouseConfig,
|
|
15769
|
+
mouseOpts = _this26.mouseOpts,
|
|
15770
|
+
keyboardConfig = _this26.keyboardConfig,
|
|
15771
|
+
keyboardOpts = _this26.keyboardOpts,
|
|
15772
|
+
treeConfig = _this26.treeConfig,
|
|
15773
|
+
treeOpts = _this26.treeOpts,
|
|
15774
|
+
highlightCurrentRow = _this26.highlightCurrentRow,
|
|
15775
|
+
currentRow = _this26.currentRow,
|
|
15776
|
+
bodyCtxMenu = _this26.bodyCtxMenu,
|
|
15777
|
+
rowOpts = _this26.rowOpts;
|
|
15581
15778
|
var selected = editStore.selected,
|
|
15582
15779
|
actived = editStore.actived;
|
|
15583
15780
|
var keyCode = evnt.keyCode;
|
|
@@ -15604,7 +15801,7 @@ var Methods = {
|
|
|
15604
15801
|
|
|
15605
15802
|
if (filterStore.visible) {
|
|
15606
15803
|
if (isEsc) {
|
|
15607
|
-
|
|
15804
|
+
_this26.closeFilter();
|
|
15608
15805
|
}
|
|
15609
15806
|
|
|
15610
15807
|
return;
|
|
@@ -15615,20 +15812,20 @@ var Methods = {
|
|
|
15615
15812
|
evnt.preventDefault();
|
|
15616
15813
|
|
|
15617
15814
|
if (ctxMenuStore.showChild && hasChildrenList(ctxMenuStore.selected)) {
|
|
15618
|
-
|
|
15815
|
+
_this26.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
|
|
15619
15816
|
} else {
|
|
15620
|
-
|
|
15817
|
+
_this26.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this26.ctxMenuList);
|
|
15621
15818
|
}
|
|
15622
|
-
} else if (keyboardConfig && mouseConfig && mouseOpts.area &&
|
|
15623
|
-
|
|
15819
|
+
} else if (keyboardConfig && mouseConfig && mouseOpts.area && _this26.handleKeyboardEvent) {
|
|
15820
|
+
_this26.handleKeyboardEvent(evnt);
|
|
15624
15821
|
} else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selected.row && selected.column && (selected.column.type === 'checkbox' || selected.column.type === 'radio')) {
|
|
15625
15822
|
// 空格键支持选中复选框
|
|
15626
15823
|
evnt.preventDefault();
|
|
15627
15824
|
|
|
15628
15825
|
if (selected.column.type === 'checkbox') {
|
|
15629
|
-
|
|
15826
|
+
_this26.handleToggleCheckRowEvent(evnt, selected.args);
|
|
15630
15827
|
} else {
|
|
15631
|
-
|
|
15828
|
+
_this26.triggerRadioRowEvent(evnt, selected.args);
|
|
15632
15829
|
}
|
|
15633
15830
|
} else if (isF2 && isEnableConf(editConfig)) {
|
|
15634
15831
|
if (!isEditStatus) {
|
|
@@ -15637,15 +15834,15 @@ var Methods = {
|
|
|
15637
15834
|
evnt.stopPropagation();
|
|
15638
15835
|
evnt.preventDefault();
|
|
15639
15836
|
|
|
15640
|
-
|
|
15837
|
+
_this26.handleActived(selected.args, evnt);
|
|
15641
15838
|
}
|
|
15642
15839
|
}
|
|
15643
15840
|
} else if (isContextMenu) {
|
|
15644
15841
|
// 如果按下上下文键
|
|
15645
|
-
|
|
15646
|
-
clearTimeout(
|
|
15647
|
-
|
|
15648
|
-
|
|
15842
|
+
_this26._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
|
|
15843
|
+
clearTimeout(_this26.keyCtxTimeout);
|
|
15844
|
+
_this26.keyCtxTimeout = setTimeout(function () {
|
|
15845
|
+
_this26._keyCtx = false;
|
|
15649
15846
|
}, 1000);
|
|
15650
15847
|
} else if (isEnter && !hasAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow)) {
|
|
15651
15848
|
// 退出选中
|
|
@@ -15654,12 +15851,12 @@ var Methods = {
|
|
|
15654
15851
|
if (actived.row) {
|
|
15655
15852
|
params = actived.args;
|
|
15656
15853
|
|
|
15657
|
-
|
|
15854
|
+
_this26.clearActived(evnt); // 如果配置了选中功能,则为选中状态
|
|
15658
15855
|
|
|
15659
15856
|
|
|
15660
15857
|
if (mouseConfig && mouseOpts.selected) {
|
|
15661
|
-
|
|
15662
|
-
return
|
|
15858
|
+
_this26.$nextTick(function () {
|
|
15859
|
+
return _this26.handleSelected(params, evnt);
|
|
15663
15860
|
});
|
|
15664
15861
|
}
|
|
15665
15862
|
}
|
|
@@ -15670,15 +15867,15 @@ var Methods = {
|
|
|
15670
15867
|
|
|
15671
15868
|
if (hasShiftKey) {
|
|
15672
15869
|
if (keyboardOpts.enterToTab) {
|
|
15673
|
-
|
|
15870
|
+
_this26.moveTabSelected(targetArgs, hasShiftKey, evnt);
|
|
15674
15871
|
} else {
|
|
15675
|
-
|
|
15872
|
+
_this26.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
|
|
15676
15873
|
}
|
|
15677
15874
|
} else {
|
|
15678
15875
|
if (keyboardOpts.enterToTab) {
|
|
15679
|
-
|
|
15876
|
+
_this26.moveTabSelected(targetArgs, hasShiftKey, evnt);
|
|
15680
15877
|
} else {
|
|
15681
|
-
|
|
15878
|
+
_this26.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
|
|
15682
15879
|
}
|
|
15683
15880
|
}
|
|
15684
15881
|
} else if (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
@@ -15689,14 +15886,14 @@ var Methods = {
|
|
|
15689
15886
|
evnt.preventDefault();
|
|
15690
15887
|
var targetRow = childrens[0];
|
|
15691
15888
|
params = {
|
|
15692
|
-
$table:
|
|
15889
|
+
$table: _this26,
|
|
15693
15890
|
row: targetRow
|
|
15694
15891
|
};
|
|
15695
15892
|
|
|
15696
|
-
|
|
15697
|
-
return
|
|
15893
|
+
_this26.setTreeExpand(currentRow, true).then(function () {
|
|
15894
|
+
return _this26.scrollToRow(targetRow);
|
|
15698
15895
|
}).then(function () {
|
|
15699
|
-
return
|
|
15896
|
+
return _this26.triggerCurrentRowEvent(evnt, params);
|
|
15700
15897
|
});
|
|
15701
15898
|
}
|
|
15702
15899
|
}
|
|
@@ -15705,18 +15902,18 @@ var Methods = {
|
|
|
15705
15902
|
if (!isEditStatus) {
|
|
15706
15903
|
// 如果按下了方向键
|
|
15707
15904
|
if (selected.row && selected.column) {
|
|
15708
|
-
|
|
15905
|
+
_this26.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
|
|
15709
15906
|
} else if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
|
|
15710
15907
|
// 当前行按键上下移动
|
|
15711
|
-
|
|
15908
|
+
_this26.moveCurrentRow(isUpArrow, isDwArrow, evnt);
|
|
15712
15909
|
}
|
|
15713
15910
|
}
|
|
15714
15911
|
} else if (isTab && keyboardConfig && keyboardOpts.isTab) {
|
|
15715
15912
|
// 如果按下了 Tab 键切换
|
|
15716
15913
|
if (selected.row || selected.column) {
|
|
15717
|
-
|
|
15914
|
+
_this26.moveTabSelected(selected.args, hasShiftKey, evnt);
|
|
15718
15915
|
} else if (actived.row || actived.column) {
|
|
15719
|
-
|
|
15916
|
+
_this26.moveTabSelected(actived.args, hasShiftKey, evnt);
|
|
15720
15917
|
}
|
|
15721
15918
|
} else if (keyboardConfig && (isDel || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow ? isBack && keyboardOpts.isArrow : isBack))) {
|
|
15722
15919
|
if (!isEditStatus) {
|
|
@@ -15727,10 +15924,10 @@ var Methods = {
|
|
|
15727
15924
|
if (delMethod) {
|
|
15728
15925
|
delMethod({
|
|
15729
15926
|
row: selected.row,
|
|
15730
|
-
rowIndex:
|
|
15927
|
+
rowIndex: _this26.getRowIndex(selected.row),
|
|
15731
15928
|
column: selected.column,
|
|
15732
|
-
columnIndex:
|
|
15733
|
-
$table:
|
|
15929
|
+
columnIndex: _this26.getColumnIndex(selected.column),
|
|
15930
|
+
$table: _this26
|
|
15734
15931
|
});
|
|
15735
15932
|
} else {
|
|
15736
15933
|
methods_setCellValue(selected.row, selected.column, null);
|
|
@@ -15740,21 +15937,21 @@ var Methods = {
|
|
|
15740
15937
|
if (backMethod) {
|
|
15741
15938
|
backMethod({
|
|
15742
15939
|
row: selected.row,
|
|
15743
|
-
rowIndex:
|
|
15940
|
+
rowIndex: _this26.getRowIndex(selected.row),
|
|
15744
15941
|
column: selected.column,
|
|
15745
|
-
columnIndex:
|
|
15746
|
-
$table:
|
|
15942
|
+
columnIndex: _this26.getColumnIndex(selected.column),
|
|
15943
|
+
$table: _this26
|
|
15747
15944
|
});
|
|
15748
15945
|
} else {
|
|
15749
|
-
|
|
15946
|
+
_this26.handleActived(selected.args, evnt);
|
|
15750
15947
|
}
|
|
15751
15948
|
} else if (isDel) {
|
|
15752
15949
|
// 如果按下 del 键,更新表尾数据
|
|
15753
|
-
|
|
15950
|
+
_this26.updateFooter();
|
|
15754
15951
|
}
|
|
15755
15952
|
} else if (isBack && keyboardOpts.isArrow && treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
15756
15953
|
// 如果树形表格回退键关闭当前行返回父节点
|
|
15757
|
-
var _XEUtils$findTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(
|
|
15954
|
+
var _XEUtils$findTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(_this26.afterFullData, function (item) {
|
|
15758
15955
|
return item === currentRow;
|
|
15759
15956
|
}, treeOpts),
|
|
15760
15957
|
parentRow = _XEUtils$findTree.parent;
|
|
@@ -15762,14 +15959,14 @@ var Methods = {
|
|
|
15762
15959
|
if (parentRow) {
|
|
15763
15960
|
evnt.preventDefault();
|
|
15764
15961
|
params = {
|
|
15765
|
-
$table:
|
|
15962
|
+
$table: _this26,
|
|
15766
15963
|
row: parentRow
|
|
15767
15964
|
};
|
|
15768
15965
|
|
|
15769
|
-
|
|
15770
|
-
return
|
|
15966
|
+
_this26.setTreeExpand(parentRow, false).then(function () {
|
|
15967
|
+
return _this26.scrollToRow(parentRow);
|
|
15771
15968
|
}).then(function () {
|
|
15772
|
-
return
|
|
15969
|
+
return _this26.triggerCurrentRowEvent(evnt, params);
|
|
15773
15970
|
});
|
|
15774
15971
|
}
|
|
15775
15972
|
}
|
|
@@ -15786,21 +15983,21 @@ var Methods = {
|
|
|
15786
15983
|
if (editMethod) {
|
|
15787
15984
|
editMethod({
|
|
15788
15985
|
row: selected.row,
|
|
15789
|
-
rowIndex:
|
|
15986
|
+
rowIndex: _this26.getRowIndex(selected.row),
|
|
15790
15987
|
column: selected.column,
|
|
15791
|
-
columnIndex:
|
|
15792
|
-
$table:
|
|
15988
|
+
columnIndex: _this26.getColumnIndex(selected.column),
|
|
15989
|
+
$table: _this26
|
|
15793
15990
|
});
|
|
15794
15991
|
} else {
|
|
15795
15992
|
methods_setCellValue(selected.row, selected.column, null);
|
|
15796
15993
|
|
|
15797
|
-
|
|
15994
|
+
_this26.handleActived(selected.args, evnt);
|
|
15798
15995
|
}
|
|
15799
15996
|
}
|
|
15800
15997
|
}
|
|
15801
15998
|
}
|
|
15802
15999
|
|
|
15803
|
-
|
|
16000
|
+
_this26.emitEvent('keydown', {}, evnt);
|
|
15804
16001
|
});
|
|
15805
16002
|
}
|
|
15806
16003
|
},
|
|
@@ -15870,12 +16067,12 @@ var Methods = {
|
|
|
15870
16067
|
this.recalculate(true);
|
|
15871
16068
|
},
|
|
15872
16069
|
handleTooltipLeaveMethod: function handleTooltipLeaveMethod() {
|
|
15873
|
-
var
|
|
16070
|
+
var _this27 = this;
|
|
15874
16071
|
|
|
15875
16072
|
var tooltipOpts = this.tooltipOpts;
|
|
15876
16073
|
setTimeout(function () {
|
|
15877
|
-
if (!
|
|
15878
|
-
|
|
16074
|
+
if (!_this27.tooltipActive) {
|
|
16075
|
+
_this27.closeTooltip();
|
|
15879
16076
|
}
|
|
15880
16077
|
}, tooltipOpts.leaveDelay);
|
|
15881
16078
|
return false;
|
|
@@ -15886,17 +16083,17 @@ var Methods = {
|
|
|
15886
16083
|
this.closeTooltip();
|
|
15887
16084
|
},
|
|
15888
16085
|
handleTargetLeaveEvent: function handleTargetLeaveEvent() {
|
|
15889
|
-
var
|
|
16086
|
+
var _this28 = this;
|
|
15890
16087
|
|
|
15891
16088
|
var tooltipOpts = this.tooltipOpts;
|
|
15892
16089
|
this.tooltipActive = false;
|
|
15893
16090
|
|
|
15894
16091
|
if (tooltipOpts.enterable) {
|
|
15895
16092
|
this.tooltipTimeout = setTimeout(function () {
|
|
15896
|
-
var tooltip =
|
|
16093
|
+
var tooltip = _this28.$refs.tooltip;
|
|
15897
16094
|
|
|
15898
16095
|
if (tooltip && !tooltip.isHover) {
|
|
15899
|
-
|
|
16096
|
+
_this28.closeTooltip();
|
|
15900
16097
|
}
|
|
15901
16098
|
}, tooltipOpts.leaveDelay);
|
|
15902
16099
|
} else {
|
|
@@ -16126,14 +16323,14 @@ var Methods = {
|
|
|
16126
16323
|
* @param {Boolean} value 是否选中
|
|
16127
16324
|
*/
|
|
16128
16325
|
setCheckboxRow: function setCheckboxRow(rows, value) {
|
|
16129
|
-
var
|
|
16326
|
+
var _this29 = this;
|
|
16130
16327
|
|
|
16131
16328
|
if (rows && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(rows)) {
|
|
16132
16329
|
rows = [rows];
|
|
16133
16330
|
}
|
|
16134
16331
|
|
|
16135
16332
|
rows.forEach(function (row) {
|
|
16136
|
-
return
|
|
16333
|
+
return _this29.handleSelectRow({
|
|
16137
16334
|
row: row
|
|
16138
16335
|
}, !!value);
|
|
16139
16336
|
});
|
|
@@ -16157,7 +16354,7 @@ var Methods = {
|
|
|
16157
16354
|
* value 选中true 不选false 半选-1
|
|
16158
16355
|
*/
|
|
16159
16356
|
handleSelectRow: function handleSelectRow(_ref5, value) {
|
|
16160
|
-
var
|
|
16357
|
+
var _this30 = this;
|
|
16161
16358
|
|
|
16162
16359
|
var row = _ref5.row;
|
|
16163
16360
|
var selection = this.selection,
|
|
@@ -16189,7 +16386,7 @@ var Methods = {
|
|
|
16189
16386
|
return half === item;
|
|
16190
16387
|
});
|
|
16191
16388
|
|
|
16192
|
-
|
|
16389
|
+
_this30.handleCheckboxReserveRow(row, value);
|
|
16193
16390
|
}
|
|
16194
16391
|
}, treeOpts);
|
|
16195
16392
|
} // 如果存在父节点,更新父节点状态
|
|
@@ -16261,7 +16458,7 @@ var Methods = {
|
|
|
16261
16458
|
return half === item;
|
|
16262
16459
|
});
|
|
16263
16460
|
|
|
16264
|
-
|
|
16461
|
+
_this30.handleCheckboxReserveRow(row, value);
|
|
16265
16462
|
}
|
|
16266
16463
|
}, treeOpts);
|
|
16267
16464
|
} // 如果存在父节点,更新父节点状态
|
|
@@ -16365,7 +16562,7 @@ var Methods = {
|
|
|
16365
16562
|
* @param {Boolean} value 是否选中
|
|
16366
16563
|
*/
|
|
16367
16564
|
setAllCheckboxRow: function setAllCheckboxRow(value) {
|
|
16368
|
-
var
|
|
16565
|
+
var _this31 = this;
|
|
16369
16566
|
|
|
16370
16567
|
var afterFullData = this.afterFullData,
|
|
16371
16568
|
treeConfig = this.treeConfig,
|
|
@@ -16478,11 +16675,11 @@ var Methods = {
|
|
|
16478
16675
|
if (reserve) {
|
|
16479
16676
|
if (value) {
|
|
16480
16677
|
selectRows.forEach(function (row) {
|
|
16481
|
-
checkboxReserveRowMap[methods_getRowid(
|
|
16678
|
+
checkboxReserveRowMap[methods_getRowid(_this31, row)] = row;
|
|
16482
16679
|
});
|
|
16483
16680
|
} else {
|
|
16484
16681
|
afterFullData.forEach(function (row) {
|
|
16485
|
-
return
|
|
16682
|
+
return _this31.handleCheckboxReserveRow(row, false);
|
|
16486
16683
|
});
|
|
16487
16684
|
}
|
|
16488
16685
|
}
|
|
@@ -16677,7 +16874,7 @@ var Methods = {
|
|
|
16677
16874
|
* 获取复选框保留选中的行
|
|
16678
16875
|
*/
|
|
16679
16876
|
getCheckboxReserveRecords: function getCheckboxReserveRecords(isFull) {
|
|
16680
|
-
var
|
|
16877
|
+
var _this32 = this;
|
|
16681
16878
|
|
|
16682
16879
|
var fullDataRowIdData = this.fullDataRowIdData,
|
|
16683
16880
|
afterFullData = this.afterFullData,
|
|
@@ -16692,11 +16889,11 @@ var Methods = {
|
|
|
16692
16889
|
|
|
16693
16890
|
if (treeConfig) {
|
|
16694
16891
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(afterFullData, function (row) {
|
|
16695
|
-
afterFullIdMaps[methods_getRowid(
|
|
16892
|
+
afterFullIdMaps[methods_getRowid(_this32, row)] = 1;
|
|
16696
16893
|
}, treeOpts);
|
|
16697
16894
|
} else {
|
|
16698
16895
|
afterFullData.forEach(function (row) {
|
|
16699
|
-
afterFullIdMaps[methods_getRowid(
|
|
16896
|
+
afterFullIdMaps[methods_getRowid(_this32, row)] = 1;
|
|
16700
16897
|
});
|
|
16701
16898
|
}
|
|
16702
16899
|
|
|
@@ -16762,7 +16959,7 @@ var Methods = {
|
|
|
16762
16959
|
* 清空行为不管是否被禁用还是保留记录,都将彻底清空选中状态
|
|
16763
16960
|
*/
|
|
16764
16961
|
clearCheckboxRow: function clearCheckboxRow() {
|
|
16765
|
-
var
|
|
16962
|
+
var _this33 = this;
|
|
16766
16963
|
|
|
16767
16964
|
var tableFullData = this.tableFullData,
|
|
16768
16965
|
treeConfig = this.treeConfig,
|
|
@@ -16785,7 +16982,7 @@ var Methods = {
|
|
|
16785
16982
|
|
|
16786
16983
|
if (reserve) {
|
|
16787
16984
|
tableFullData.forEach(function (row) {
|
|
16788
|
-
return
|
|
16985
|
+
return _this33.handleCheckboxReserveRow(row, false);
|
|
16789
16986
|
});
|
|
16790
16987
|
}
|
|
16791
16988
|
|
|
@@ -17076,13 +17273,13 @@ var Methods = {
|
|
|
17076
17273
|
* 如果存在规则,则校验
|
|
17077
17274
|
*/
|
|
17078
17275
|
handleChangeCell: function handleChangeCell(evnt, params) {
|
|
17079
|
-
var
|
|
17276
|
+
var _this34 = this;
|
|
17080
17277
|
|
|
17081
17278
|
this.checkValidate('blur').catch(function (e) {
|
|
17082
17279
|
return e;
|
|
17083
17280
|
}).then(function () {
|
|
17084
|
-
|
|
17085
|
-
return
|
|
17281
|
+
_this34.handleActived(params, evnt).then(function () {
|
|
17282
|
+
return _this34.checkValidate('change');
|
|
17086
17283
|
}).catch(function (e) {
|
|
17087
17284
|
return e;
|
|
17088
17285
|
});
|
|
@@ -17185,7 +17382,7 @@ var Methods = {
|
|
|
17185
17382
|
* 如果是双击模式,则激活为编辑状态
|
|
17186
17383
|
*/
|
|
17187
17384
|
triggerCellDblclickEvent: function triggerCellDblclickEvent(evnt, params) {
|
|
17188
|
-
var
|
|
17385
|
+
var _this35 = this;
|
|
17189
17386
|
|
|
17190
17387
|
var editStore = this.editStore,
|
|
17191
17388
|
editConfig = this.editConfig,
|
|
@@ -17200,15 +17397,15 @@ var Methods = {
|
|
|
17200
17397
|
this.checkValidate('blur').catch(function (e) {
|
|
17201
17398
|
return e;
|
|
17202
17399
|
}).then(function () {
|
|
17203
|
-
|
|
17204
|
-
return
|
|
17400
|
+
_this35.handleActived(params, evnt).then(function () {
|
|
17401
|
+
return _this35.checkValidate('change');
|
|
17205
17402
|
}).catch(function (e) {
|
|
17206
17403
|
return e;
|
|
17207
17404
|
});
|
|
17208
17405
|
});
|
|
17209
17406
|
} else if (editOpts.mode === 'cell') {
|
|
17210
17407
|
this.handleActived(params, evnt).then(function () {
|
|
17211
|
-
return
|
|
17408
|
+
return _this35.checkValidate('change');
|
|
17212
17409
|
}).catch(function (e) {
|
|
17213
17410
|
return e;
|
|
17214
17411
|
});
|
|
@@ -17219,7 +17416,7 @@ var Methods = {
|
|
|
17219
17416
|
this.emitEvent('cell-dblclick', params, evnt);
|
|
17220
17417
|
},
|
|
17221
17418
|
handleDefaultSort: function handleDefaultSort() {
|
|
17222
|
-
var
|
|
17419
|
+
var _this36 = this;
|
|
17223
17420
|
|
|
17224
17421
|
var sortConfig = this.sortConfig,
|
|
17225
17422
|
sortOpts = this.sortOpts;
|
|
@@ -17236,7 +17433,7 @@ var Methods = {
|
|
|
17236
17433
|
order = item.order;
|
|
17237
17434
|
|
|
17238
17435
|
if (field && order) {
|
|
17239
|
-
var column =
|
|
17436
|
+
var column = _this36.getColumnByField(field);
|
|
17240
17437
|
|
|
17241
17438
|
if (column && column.sortable) {
|
|
17242
17439
|
column.order = order;
|
|
@@ -17279,7 +17476,7 @@ var Methods = {
|
|
|
17279
17476
|
}
|
|
17280
17477
|
},
|
|
17281
17478
|
sort: function sort(sortConfs, sortOrder) {
|
|
17282
|
-
var
|
|
17479
|
+
var _this37 = this;
|
|
17283
17480
|
|
|
17284
17481
|
var sortOpts = this.sortOpts;
|
|
17285
17482
|
var multiple = sortOpts.multiple,
|
|
@@ -17312,7 +17509,7 @@ var Methods = {
|
|
|
17312
17509
|
var column = field;
|
|
17313
17510
|
|
|
17314
17511
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(field)) {
|
|
17315
|
-
column =
|
|
17512
|
+
column = _this37.getColumnByField(field);
|
|
17316
17513
|
}
|
|
17317
17514
|
|
|
17318
17515
|
if (column && (column.sortable || column.remoteSort)) {
|
|
@@ -17321,7 +17518,7 @@ var Methods = {
|
|
|
17321
17518
|
}
|
|
17322
17519
|
|
|
17323
17520
|
if (orders.indexOf(order) === -1) {
|
|
17324
|
-
order = getNextSortOrder(
|
|
17521
|
+
order = getNextSortOrder(_this37, column);
|
|
17325
17522
|
}
|
|
17326
17523
|
|
|
17327
17524
|
if (column.order !== order) {
|
|
@@ -17469,7 +17666,7 @@ var Methods = {
|
|
|
17469
17666
|
* @param {Row} row 行对象
|
|
17470
17667
|
*/
|
|
17471
17668
|
reloadRowExpand: function reloadRowExpand(row) {
|
|
17472
|
-
var
|
|
17669
|
+
var _this38 = this;
|
|
17473
17670
|
|
|
17474
17671
|
var expandOpts = this.expandOpts,
|
|
17475
17672
|
expandLazyLoadeds = this.expandLazyLoadeds;
|
|
@@ -17477,7 +17674,7 @@ var Methods = {
|
|
|
17477
17674
|
|
|
17478
17675
|
if (lazy && expandLazyLoadeds.indexOf(row) === -1) {
|
|
17479
17676
|
this.clearRowExpandLoaded(row).then(function () {
|
|
17480
|
-
return
|
|
17677
|
+
return _this38.handleAsyncRowExpand(row);
|
|
17481
17678
|
});
|
|
17482
17679
|
}
|
|
17483
17680
|
|
|
@@ -17554,28 +17751,28 @@ var Methods = {
|
|
|
17554
17751
|
return this.setRowExpand(this.expandOpts.lazy ? this.tableData : this.tableFullData, expanded);
|
|
17555
17752
|
},
|
|
17556
17753
|
handleAsyncRowExpand: function handleAsyncRowExpand(row) {
|
|
17557
|
-
var
|
|
17754
|
+
var _this39 = this;
|
|
17558
17755
|
|
|
17559
17756
|
var rest = this.fullAllDataRowMap.get(row);
|
|
17560
17757
|
return new Promise(function (resolve) {
|
|
17561
|
-
|
|
17758
|
+
_this39.expandLazyLoadeds.push(row);
|
|
17562
17759
|
|
|
17563
|
-
|
|
17564
|
-
$table:
|
|
17760
|
+
_this39.expandOpts.loadMethod({
|
|
17761
|
+
$table: _this39,
|
|
17565
17762
|
row: row,
|
|
17566
|
-
rowIndex:
|
|
17567
|
-
$rowIndex:
|
|
17763
|
+
rowIndex: _this39.getRowIndex(row),
|
|
17764
|
+
$rowIndex: _this39.getVMRowIndex(row)
|
|
17568
17765
|
}).catch(function (e) {
|
|
17569
17766
|
return e;
|
|
17570
17767
|
}).then(function () {
|
|
17571
17768
|
rest.expandLoaded = true;
|
|
17572
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(
|
|
17769
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(_this39.expandLazyLoadeds, function (item) {
|
|
17573
17770
|
return item === row;
|
|
17574
17771
|
});
|
|
17575
17772
|
|
|
17576
|
-
|
|
17773
|
+
_this39.rowExpandeds.push(row);
|
|
17577
17774
|
|
|
17578
|
-
resolve(
|
|
17775
|
+
resolve(_this39.$nextTick().then(_this39.recalculate));
|
|
17579
17776
|
});
|
|
17580
17777
|
});
|
|
17581
17778
|
},
|
|
@@ -17588,7 +17785,7 @@ var Methods = {
|
|
|
17588
17785
|
* @param {Boolean} expanded 是否展开
|
|
17589
17786
|
*/
|
|
17590
17787
|
setRowExpand: function setRowExpand(rows, expanded) {
|
|
17591
|
-
var
|
|
17788
|
+
var _this40 = this;
|
|
17592
17789
|
|
|
17593
17790
|
var fullAllDataRowMap = this.fullAllDataRowMap,
|
|
17594
17791
|
expandLazyLoadeds = this.expandLazyLoadeds,
|
|
@@ -17621,8 +17818,8 @@ var Methods = {
|
|
|
17621
17818
|
columnIndex: columnIndex,
|
|
17622
17819
|
$columnIndex: $columnIndex,
|
|
17623
17820
|
row: row,
|
|
17624
|
-
rowIndex:
|
|
17625
|
-
$rowIndex:
|
|
17821
|
+
rowIndex: _this40.getRowIndex(row),
|
|
17822
|
+
$rowIndex: _this40.getVMRowIndex(row)
|
|
17626
17823
|
});
|
|
17627
17824
|
}) : rows;
|
|
17628
17825
|
|
|
@@ -17633,7 +17830,7 @@ var Methods = {
|
|
|
17633
17830
|
var isLoad = lazy && !rest.expandLoaded && expandLazyLoadeds.indexOf(row) === -1;
|
|
17634
17831
|
|
|
17635
17832
|
if (isLoad) {
|
|
17636
|
-
lazyRests.push(
|
|
17833
|
+
lazyRests.push(_this40.handleAsyncRowExpand(row));
|
|
17637
17834
|
} else {
|
|
17638
17835
|
rowExpandeds.push(row);
|
|
17639
17836
|
}
|
|
@@ -17647,7 +17844,7 @@ var Methods = {
|
|
|
17647
17844
|
|
|
17648
17845
|
if (reserve) {
|
|
17649
17846
|
validRows.forEach(function (row) {
|
|
17650
|
-
return
|
|
17847
|
+
return _this40.handleRowExpandReserve(row, expanded);
|
|
17651
17848
|
});
|
|
17652
17849
|
}
|
|
17653
17850
|
}
|
|
@@ -17668,7 +17865,7 @@ var Methods = {
|
|
|
17668
17865
|
* 手动清空展开行状态,数据会恢复成未展开的状态
|
|
17669
17866
|
*/
|
|
17670
17867
|
clearRowExpand: function clearRowExpand() {
|
|
17671
|
-
var
|
|
17868
|
+
var _this41 = this;
|
|
17672
17869
|
|
|
17673
17870
|
var expandOpts = this.expandOpts,
|
|
17674
17871
|
rowExpandeds = this.rowExpandeds,
|
|
@@ -17679,13 +17876,13 @@ var Methods = {
|
|
|
17679
17876
|
|
|
17680
17877
|
if (reserve) {
|
|
17681
17878
|
tableFullData.forEach(function (row) {
|
|
17682
|
-
return
|
|
17879
|
+
return _this41.handleRowExpandReserve(row, false);
|
|
17683
17880
|
});
|
|
17684
17881
|
}
|
|
17685
17882
|
|
|
17686
17883
|
return this.$nextTick().then(function () {
|
|
17687
17884
|
if (isExists) {
|
|
17688
|
-
|
|
17885
|
+
_this41.recalculate();
|
|
17689
17886
|
}
|
|
17690
17887
|
});
|
|
17691
17888
|
},
|
|
@@ -17758,7 +17955,7 @@ var Methods = {
|
|
|
17758
17955
|
* @param {Row} row 行对象
|
|
17759
17956
|
*/
|
|
17760
17957
|
reloadTreeExpand: function reloadTreeExpand(row) {
|
|
17761
|
-
var
|
|
17958
|
+
var _this42 = this;
|
|
17762
17959
|
|
|
17763
17960
|
var treeOpts = this.treeOpts,
|
|
17764
17961
|
treeLazyLoadeds = this.treeLazyLoadeds;
|
|
@@ -17768,13 +17965,13 @@ var Methods = {
|
|
|
17768
17965
|
|
|
17769
17966
|
if (lazy && row[hasChild] && treeLazyLoadeds.indexOf(row) === -1) {
|
|
17770
17967
|
this.clearTreeExpandLoaded(row).then(function () {
|
|
17771
|
-
return
|
|
17968
|
+
return _this42.handleAsyncTreeExpandChilds(row);
|
|
17772
17969
|
}).then(function () {
|
|
17773
17970
|
if (transform) {
|
|
17774
|
-
return
|
|
17971
|
+
return _this42.handleTableData();
|
|
17775
17972
|
}
|
|
17776
17973
|
}).then(function () {
|
|
17777
|
-
return
|
|
17974
|
+
return _this42.recalculate();
|
|
17778
17975
|
});
|
|
17779
17976
|
}
|
|
17780
17977
|
|
|
@@ -17850,20 +18047,21 @@ var Methods = {
|
|
|
17850
18047
|
}
|
|
17851
18048
|
},
|
|
17852
18049
|
handleAsyncTreeExpandChilds: function handleAsyncTreeExpandChilds(row) {
|
|
17853
|
-
var
|
|
18050
|
+
var _this43 = this;
|
|
17854
18051
|
|
|
17855
18052
|
var fullAllDataRowMap = this.fullAllDataRowMap,
|
|
17856
18053
|
treeExpandeds = this.treeExpandeds,
|
|
17857
18054
|
treeOpts = this.treeOpts,
|
|
17858
18055
|
treeLazyLoadeds = this.treeLazyLoadeds,
|
|
17859
18056
|
checkboxOpts = this.checkboxOpts;
|
|
17860
|
-
var
|
|
18057
|
+
var transform = treeOpts.transform,
|
|
18058
|
+
loadMethod = treeOpts.loadMethod;
|
|
17861
18059
|
var checkStrictly = checkboxOpts.checkStrictly;
|
|
17862
18060
|
var rest = fullAllDataRowMap.get(row);
|
|
17863
18061
|
return new Promise(function (resolve) {
|
|
17864
18062
|
treeLazyLoadeds.push(row);
|
|
17865
18063
|
loadMethod({
|
|
17866
|
-
$table:
|
|
18064
|
+
$table: _this43,
|
|
17867
18065
|
row: row
|
|
17868
18066
|
}).catch(function () {
|
|
17869
18067
|
return [];
|
|
@@ -17878,19 +18076,33 @@ var Methods = {
|
|
|
17878
18076
|
}
|
|
17879
18077
|
|
|
17880
18078
|
if (childRecords) {
|
|
17881
|
-
|
|
18079
|
+
_this43.loadTreeChildren(row, childRecords).then(function (childRows) {
|
|
17882
18080
|
if (childRows.length && treeExpandeds.indexOf(row) === -1) {
|
|
17883
18081
|
treeExpandeds.push(row);
|
|
17884
18082
|
} // 如果当前节点已选中,则展开后子节点也被选中
|
|
17885
18083
|
|
|
17886
18084
|
|
|
17887
|
-
if (!checkStrictly &&
|
|
17888
|
-
|
|
18085
|
+
if (!checkStrictly && _this43.isCheckedByCheckboxRow(row)) {
|
|
18086
|
+
_this43.setCheckboxRow(childRows, true);
|
|
17889
18087
|
}
|
|
18088
|
+
|
|
18089
|
+
_this43.$nextTick().then(function () {
|
|
18090
|
+
if (transform) {
|
|
18091
|
+
return _this43.handleTableData();
|
|
18092
|
+
}
|
|
18093
|
+
}).then(function () {
|
|
18094
|
+
return _this43.recalculate();
|
|
18095
|
+
}).then(function () {
|
|
18096
|
+
return resolve();
|
|
18097
|
+
});
|
|
18098
|
+
});
|
|
18099
|
+
} else {
|
|
18100
|
+
_this43.$nextTick().then(function () {
|
|
18101
|
+
return _this43.recalculate();
|
|
18102
|
+
}).then(function () {
|
|
18103
|
+
return resolve();
|
|
17890
18104
|
});
|
|
17891
18105
|
}
|
|
17892
|
-
|
|
17893
|
-
resolve(_this41.$nextTick().then(_this41.recalculate));
|
|
17894
18106
|
});
|
|
17895
18107
|
});
|
|
17896
18108
|
},
|
|
@@ -17922,7 +18134,7 @@ var Methods = {
|
|
|
17922
18134
|
* @returns
|
|
17923
18135
|
*/
|
|
17924
18136
|
handleBaseTreeExpand: function handleBaseTreeExpand(rows, expanded) {
|
|
17925
|
-
var
|
|
18137
|
+
var _this44 = this;
|
|
17926
18138
|
|
|
17927
18139
|
var fullAllDataRowMap = this.fullAllDataRowMap,
|
|
17928
18140
|
tableFullData = this.tableFullData,
|
|
@@ -17970,7 +18182,7 @@ var Methods = {
|
|
|
17970
18182
|
var isLoad = lazy && row[hasChild] && !rest.treeLoaded && treeLazyLoadeds.indexOf(row) === -1; // 是否使用懒加载
|
|
17971
18183
|
|
|
17972
18184
|
if (isLoad) {
|
|
17973
|
-
result.push(
|
|
18185
|
+
result.push(_this44.handleAsyncTreeExpandChilds(row));
|
|
17974
18186
|
} else {
|
|
17975
18187
|
if (row[children] && row[children].length) {
|
|
17976
18188
|
treeExpandeds.push(row);
|
|
@@ -17986,38 +18198,12 @@ var Methods = {
|
|
|
17986
18198
|
|
|
17987
18199
|
if (reserve) {
|
|
17988
18200
|
validRows.forEach(function (row) {
|
|
17989
|
-
return
|
|
18201
|
+
return _this44.handleTreeExpandReserve(row, expanded);
|
|
17990
18202
|
});
|
|
17991
18203
|
}
|
|
17992
18204
|
|
|
17993
18205
|
return Promise.all(result).then(this.recalculate);
|
|
17994
18206
|
},
|
|
17995
|
-
updateVirtualTreeData: function updateVirtualTreeData() {
|
|
17996
|
-
var _this43 = this;
|
|
17997
|
-
|
|
17998
|
-
var oldScrollYLoad = this.scrollYLoad,
|
|
17999
|
-
treeExpandeds = this.treeExpandeds,
|
|
18000
|
-
treeOpts = this.treeOpts,
|
|
18001
|
-
treeFullData = this.treeFullData;
|
|
18002
|
-
var fullData = [];
|
|
18003
|
-
var expandMaps = new Map();
|
|
18004
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(treeFullData, function (row, index, items, path, parent) {
|
|
18005
|
-
if (!parent || expandMaps.has(parent) && treeExpandeds.indexOf(parent) > -1) {
|
|
18006
|
-
expandMaps.set(row, 1);
|
|
18007
|
-
fullData.push(row);
|
|
18008
|
-
}
|
|
18009
|
-
}, treeOpts);
|
|
18010
|
-
var scrollYLoad = this.updateScrollYStatus(fullData);
|
|
18011
|
-
this.tableFullData = scrollYLoad ? fullData : treeFullData;
|
|
18012
|
-
|
|
18013
|
-
if (scrollYLoad || oldScrollYLoad !== scrollYLoad) {
|
|
18014
|
-
return this.handleTableData(true).then(function () {
|
|
18015
|
-
return _this43.recalculate();
|
|
18016
|
-
});
|
|
18017
|
-
}
|
|
18018
|
-
|
|
18019
|
-
return this.$nextTick();
|
|
18020
|
-
},
|
|
18021
18207
|
|
|
18022
18208
|
/**
|
|
18023
18209
|
* 虚拟树的展开与收起
|
|
@@ -18026,12 +18212,12 @@ var Methods = {
|
|
|
18026
18212
|
* @returns
|
|
18027
18213
|
*/
|
|
18028
18214
|
handleVirtualTreeExpand: function handleVirtualTreeExpand(rows, expanded) {
|
|
18029
|
-
var
|
|
18215
|
+
var _this45 = this;
|
|
18030
18216
|
|
|
18031
18217
|
return this.handleBaseTreeExpand(rows, expanded).then(function () {
|
|
18032
|
-
return
|
|
18218
|
+
return _this45.handleTableData();
|
|
18033
18219
|
}).then(function () {
|
|
18034
|
-
return
|
|
18220
|
+
return _this45.recalculate();
|
|
18035
18221
|
});
|
|
18036
18222
|
},
|
|
18037
18223
|
|
|
@@ -18076,7 +18262,7 @@ var Methods = {
|
|
|
18076
18262
|
* 手动清空树形节点的展开状态,数据会恢复成未展开的状态
|
|
18077
18263
|
*/
|
|
18078
18264
|
clearTreeExpand: function clearTreeExpand() {
|
|
18079
|
-
var
|
|
18265
|
+
var _this46 = this;
|
|
18080
18266
|
|
|
18081
18267
|
var treeOpts = this.treeOpts,
|
|
18082
18268
|
treeExpandeds = this.treeExpandeds,
|
|
@@ -18087,13 +18273,13 @@ var Methods = {
|
|
|
18087
18273
|
|
|
18088
18274
|
if (reserve) {
|
|
18089
18275
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(tableFullData, function (row) {
|
|
18090
|
-
return
|
|
18276
|
+
return _this46.handleTreeExpandReserve(row, false);
|
|
18091
18277
|
}, treeOpts);
|
|
18092
18278
|
}
|
|
18093
18279
|
|
|
18094
|
-
return this.
|
|
18280
|
+
return this.handleTableData().then(function () {
|
|
18095
18281
|
if (isExists) {
|
|
18096
|
-
|
|
18282
|
+
_this46.recalculate();
|
|
18097
18283
|
}
|
|
18098
18284
|
});
|
|
18099
18285
|
},
|
|
@@ -18223,18 +18409,18 @@ var Methods = {
|
|
|
18223
18409
|
},
|
|
18224
18410
|
// 计算可视渲染相关数据
|
|
18225
18411
|
computeScrollLoad: function computeScrollLoad() {
|
|
18226
|
-
var
|
|
18412
|
+
var _this47 = this;
|
|
18227
18413
|
|
|
18228
18414
|
return this.$nextTick().then(function () {
|
|
18229
|
-
var sYOpts =
|
|
18230
|
-
sXOpts =
|
|
18231
|
-
scrollXLoad =
|
|
18232
|
-
scrollYLoad =
|
|
18233
|
-
scrollXStore =
|
|
18234
|
-
scrollYStore =
|
|
18415
|
+
var sYOpts = _this47.sYOpts,
|
|
18416
|
+
sXOpts = _this47.sXOpts,
|
|
18417
|
+
scrollXLoad = _this47.scrollXLoad,
|
|
18418
|
+
scrollYLoad = _this47.scrollYLoad,
|
|
18419
|
+
scrollXStore = _this47.scrollXStore,
|
|
18420
|
+
scrollYStore = _this47.scrollYStore; // 计算 X 逻辑
|
|
18235
18421
|
|
|
18236
18422
|
if (scrollXLoad) {
|
|
18237
|
-
var _computeVirtualX3 = computeVirtualX(
|
|
18423
|
+
var _computeVirtualX3 = computeVirtualX(_this47),
|
|
18238
18424
|
visibleXSize = _computeVirtualX3.visibleSize;
|
|
18239
18425
|
|
|
18240
18426
|
var offsetXSize = sXOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(sXOpts.oSize) : browse.msie ? 10 : browse.edge ? 5 : 0;
|
|
@@ -18242,13 +18428,13 @@ var Methods = {
|
|
|
18242
18428
|
scrollXStore.visibleSize = visibleXSize;
|
|
18243
18429
|
scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
|
|
18244
18430
|
|
|
18245
|
-
|
|
18431
|
+
_this47.updateScrollXData();
|
|
18246
18432
|
} else {
|
|
18247
|
-
|
|
18433
|
+
_this47.updateScrollXSpace();
|
|
18248
18434
|
} // 计算 Y 逻辑
|
|
18249
18435
|
|
|
18250
18436
|
|
|
18251
|
-
var _computeVirtualY = computeVirtualY(
|
|
18437
|
+
var _computeVirtualY = computeVirtualY(_this47),
|
|
18252
18438
|
rowHeight = _computeVirtualY.rowHeight,
|
|
18253
18439
|
visibleYSize = _computeVirtualY.visibleSize;
|
|
18254
18440
|
|
|
@@ -18260,14 +18446,14 @@ var Methods = {
|
|
|
18260
18446
|
scrollYStore.visibleSize = visibleYSize;
|
|
18261
18447
|
scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
|
|
18262
18448
|
|
|
18263
|
-
|
|
18449
|
+
_this47.updateScrollYData();
|
|
18264
18450
|
} else {
|
|
18265
|
-
|
|
18451
|
+
_this47.updateScrollYSpace();
|
|
18266
18452
|
}
|
|
18267
18453
|
|
|
18268
|
-
|
|
18454
|
+
_this47.rowHeight = rowHeight;
|
|
18269
18455
|
|
|
18270
|
-
|
|
18456
|
+
_this47.$nextTick(_this47.updateStyle);
|
|
18271
18457
|
});
|
|
18272
18458
|
},
|
|
18273
18459
|
handleTableColumn: function handleTableColumn() {
|
|
@@ -18381,7 +18567,7 @@ var Methods = {
|
|
|
18381
18567
|
* @param {Number} scrollTop 上距离
|
|
18382
18568
|
*/
|
|
18383
18569
|
scrollTo: function scrollTo(scrollLeft, scrollTop) {
|
|
18384
|
-
var
|
|
18570
|
+
var _this48 = this;
|
|
18385
18571
|
|
|
18386
18572
|
var $refs = this.$refs;
|
|
18387
18573
|
var tableBody = $refs.tableBody,
|
|
@@ -18402,7 +18588,7 @@ var Methods = {
|
|
|
18402
18588
|
if (this.scrollXLoad || this.scrollYLoad) {
|
|
18403
18589
|
return new Promise(function (resolve) {
|
|
18404
18590
|
return setTimeout(function () {
|
|
18405
|
-
return resolve(
|
|
18591
|
+
return resolve(_this48.$nextTick());
|
|
18406
18592
|
}, 50);
|
|
18407
18593
|
});
|
|
18408
18594
|
}
|
|
@@ -18453,7 +18639,7 @@ var Methods = {
|
|
|
18453
18639
|
* @param {Row} row 行对象
|
|
18454
18640
|
*/
|
|
18455
18641
|
scrollToTreeRow: function scrollToTreeRow(row) {
|
|
18456
|
-
var
|
|
18642
|
+
var _this49 = this;
|
|
18457
18643
|
|
|
18458
18644
|
var tableFullData = this.tableFullData,
|
|
18459
18645
|
treeConfig = this.treeConfig,
|
|
@@ -18468,15 +18654,15 @@ var Methods = {
|
|
|
18468
18654
|
if (matchObj) {
|
|
18469
18655
|
var nodes = matchObj.nodes;
|
|
18470
18656
|
nodes.forEach(function (row, index) {
|
|
18471
|
-
if (index < nodes.length - 1 && !
|
|
18472
|
-
rests.push(
|
|
18657
|
+
if (index < nodes.length - 1 && !_this49.isTreeExpandByRow(row)) {
|
|
18658
|
+
rests.push(_this49.setTreeExpand(row, true));
|
|
18473
18659
|
}
|
|
18474
18660
|
});
|
|
18475
18661
|
}
|
|
18476
18662
|
}
|
|
18477
18663
|
|
|
18478
18664
|
return Promise.all(rests).then(function () {
|
|
18479
|
-
return DomTools.rowToVisible(
|
|
18665
|
+
return DomTools.rowToVisible(_this49, row);
|
|
18480
18666
|
});
|
|
18481
18667
|
},
|
|
18482
18668
|
|
|
@@ -18540,29 +18726,29 @@ var Methods = {
|
|
|
18540
18726
|
* 如果单元格配置了校验规则,则会进行校验
|
|
18541
18727
|
*/
|
|
18542
18728
|
updateStatus: function updateStatus(scope, cellValue) {
|
|
18543
|
-
var
|
|
18729
|
+
var _this50 = this;
|
|
18544
18730
|
|
|
18545
18731
|
var customVal = !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(cellValue);
|
|
18546
18732
|
return this.$nextTick().then(function () {
|
|
18547
|
-
var $refs =
|
|
18548
|
-
editRules =
|
|
18549
|
-
validStore =
|
|
18733
|
+
var $refs = _this50.$refs,
|
|
18734
|
+
editRules = _this50.editRules,
|
|
18735
|
+
validStore = _this50.validStore;
|
|
18550
18736
|
|
|
18551
18737
|
if (scope && $refs.tableBody && editRules) {
|
|
18552
18738
|
var row = scope.row,
|
|
18553
18739
|
column = scope.column;
|
|
18554
18740
|
var type = 'change';
|
|
18555
18741
|
|
|
18556
|
-
if (
|
|
18557
|
-
var cell =
|
|
18742
|
+
if (_this50.hasCellRules(type, row, column)) {
|
|
18743
|
+
var cell = _this50.getCell(row, column);
|
|
18558
18744
|
|
|
18559
18745
|
if (cell) {
|
|
18560
|
-
return
|
|
18746
|
+
return _this50.validCellRules(type, row, column, cellValue).then(function () {
|
|
18561
18747
|
if (customVal && validStore.visible) {
|
|
18562
18748
|
methods_setCellValue(row, column, cellValue);
|
|
18563
18749
|
}
|
|
18564
18750
|
|
|
18565
|
-
|
|
18751
|
+
_this50.clearValidate();
|
|
18566
18752
|
}).catch(function (_ref7) {
|
|
18567
18753
|
var rule = _ref7.rule;
|
|
18568
18754
|
|
|
@@ -18570,7 +18756,7 @@ var Methods = {
|
|
|
18570
18756
|
methods_setCellValue(row, column, cellValue);
|
|
18571
18757
|
}
|
|
18572
18758
|
|
|
18573
|
-
|
|
18759
|
+
_this50.showValidTooltip({
|
|
18574
18760
|
rule: rule,
|
|
18575
18761
|
row: row,
|
|
18576
18762
|
column: column,
|
|
@@ -18591,7 +18777,7 @@ var Methods = {
|
|
|
18591
18777
|
* @param {TableMergeConfig[]} merges { row: Row|number, column: ColumnInfo|number, rowspan: number, colspan: number }
|
|
18592
18778
|
*/
|
|
18593
18779
|
setMergeCells: function setMergeCells(merges) {
|
|
18594
|
-
var
|
|
18780
|
+
var _this51 = this;
|
|
18595
18781
|
|
|
18596
18782
|
if (this.spanMethod) {
|
|
18597
18783
|
UtilTools.error('vxe.error.errConflicts', ['merge-cells', 'span-method']);
|
|
@@ -18599,7 +18785,7 @@ var Methods = {
|
|
|
18599
18785
|
|
|
18600
18786
|
setMerges(this, merges, this.mergeList, this.afterFullData);
|
|
18601
18787
|
return this.$nextTick().then(function () {
|
|
18602
|
-
return
|
|
18788
|
+
return _this51.updateCellAreas();
|
|
18603
18789
|
});
|
|
18604
18790
|
},
|
|
18605
18791
|
|
|
@@ -18608,7 +18794,7 @@ var Methods = {
|
|
|
18608
18794
|
* @param {TableMergeConfig[]} merges 多个或数组 [{row:Row|number, col:ColumnInfo|number}]
|
|
18609
18795
|
*/
|
|
18610
18796
|
removeMergeCells: function removeMergeCells(merges) {
|
|
18611
|
-
var
|
|
18797
|
+
var _this52 = this;
|
|
18612
18798
|
|
|
18613
18799
|
if (this.spanMethod) {
|
|
18614
18800
|
UtilTools.error('vxe.error.errConflicts', ['merge-cells', 'span-method']);
|
|
@@ -18616,7 +18802,7 @@ var Methods = {
|
|
|
18616
18802
|
|
|
18617
18803
|
var rest = removeMerges(this, merges, this.mergeList, this.afterFullData);
|
|
18618
18804
|
return this.$nextTick().then(function () {
|
|
18619
|
-
|
|
18805
|
+
_this52.updateCellAreas();
|
|
18620
18806
|
|
|
18621
18807
|
return rest;
|
|
18622
18808
|
});
|
|
@@ -18640,7 +18826,7 @@ var Methods = {
|
|
|
18640
18826
|
this.setMergeFooterItems(this.mergeFooterItems);
|
|
18641
18827
|
},
|
|
18642
18828
|
setMergeFooterItems: function setMergeFooterItems(merges) {
|
|
18643
|
-
var
|
|
18829
|
+
var _this53 = this;
|
|
18644
18830
|
|
|
18645
18831
|
if (this.footerSpanMethod) {
|
|
18646
18832
|
UtilTools.error('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
|
|
@@ -18648,11 +18834,11 @@ var Methods = {
|
|
|
18648
18834
|
|
|
18649
18835
|
setMerges(this, merges, this.mergeFooterList, null);
|
|
18650
18836
|
return this.$nextTick().then(function () {
|
|
18651
|
-
return
|
|
18837
|
+
return _this53.updateCellAreas();
|
|
18652
18838
|
});
|
|
18653
18839
|
},
|
|
18654
18840
|
removeMergeFooterItems: function removeMergeFooterItems(merges) {
|
|
18655
|
-
var
|
|
18841
|
+
var _this54 = this;
|
|
18656
18842
|
|
|
18657
18843
|
if (this.footerSpanMethod) {
|
|
18658
18844
|
UtilTools.error('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
|
|
@@ -18660,7 +18846,7 @@ var Methods = {
|
|
|
18660
18846
|
|
|
18661
18847
|
var rest = removeMerges(this, merges, this.mergeFooterList, null);
|
|
18662
18848
|
return this.$nextTick().then(function () {
|
|
18663
|
-
|
|
18849
|
+
_this54.updateCellAreas();
|
|
18664
18850
|
|
|
18665
18851
|
return rest;
|
|
18666
18852
|
});
|
|
@@ -18797,7 +18983,7 @@ var Methods = {
|
|
|
18797
18983
|
|
|
18798
18984
|
}; // Module methods
|
|
18799
18985
|
|
|
18800
|
-
var funcs = 'setFilter,clearFilter,getCheckedFilters,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,clearCopyCellArea,setCellAreas,openFind,openReplace,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearActived,getActiveRecord,isActiveByRow,setActiveRow,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',');
|
|
18986
|
+
var funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,clearCopyCellArea,setCellAreas,openFind,openReplace,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearActived,getActiveRecord,isActiveByRow,setActiveRow,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',');
|
|
18801
18987
|
funcs.forEach(function (name) {
|
|
18802
18988
|
Methods[name] = function () {
|
|
18803
18989
|
if (false) {}
|
|
@@ -18825,6 +19011,8 @@ funcs.forEach(function (name) {
|
|
|
18825
19011
|
|
|
18826
19012
|
|
|
18827
19013
|
|
|
19014
|
+
|
|
19015
|
+
|
|
18828
19016
|
/**
|
|
18829
19017
|
* 渲染浮固定列
|
|
18830
19018
|
* 分别渲染左边固定列和右边固定列
|
|
@@ -18995,35 +19183,35 @@ function handleUupdateResize(_vm) {
|
|
|
18995
19183
|
return conf.table.showHeader;
|
|
18996
19184
|
}
|
|
18997
19185
|
},
|
|
18998
|
-
//
|
|
19186
|
+
// (即将废弃)是否要高亮当前选中行
|
|
18999
19187
|
highlightCurrentRow: {
|
|
19000
19188
|
type: Boolean,
|
|
19001
19189
|
default: function _default() {
|
|
19002
19190
|
return conf.table.highlightCurrentRow;
|
|
19003
19191
|
}
|
|
19004
19192
|
},
|
|
19005
|
-
//
|
|
19193
|
+
// (即将废弃)鼠标移到行是否要高亮显示
|
|
19006
19194
|
highlightHoverRow: {
|
|
19007
19195
|
type: Boolean,
|
|
19008
19196
|
default: function _default() {
|
|
19009
19197
|
return conf.table.highlightHoverRow;
|
|
19010
19198
|
}
|
|
19011
19199
|
},
|
|
19012
|
-
//
|
|
19200
|
+
// (即将废弃)是否要高亮当前选中列
|
|
19013
19201
|
highlightCurrentColumn: {
|
|
19014
19202
|
type: Boolean,
|
|
19015
19203
|
default: function _default() {
|
|
19016
19204
|
return conf.table.highlightCurrentColumn;
|
|
19017
19205
|
}
|
|
19018
19206
|
},
|
|
19019
|
-
//
|
|
19207
|
+
// (即将废弃)鼠标移到列是否要高亮显示
|
|
19020
19208
|
highlightHoverColumn: {
|
|
19021
19209
|
type: Boolean,
|
|
19022
19210
|
default: function _default() {
|
|
19023
19211
|
return conf.table.highlightHoverColumn;
|
|
19024
19212
|
}
|
|
19025
19213
|
},
|
|
19026
|
-
//
|
|
19214
|
+
// (即将废弃)激活单元格编辑时是否高亮显示
|
|
19027
19215
|
highlightCell: Boolean,
|
|
19028
19216
|
// 是否显示表尾合计
|
|
19029
19217
|
showFooter: Boolean,
|
|
@@ -19171,7 +19359,7 @@ function handleUupdateResize(_vm) {
|
|
|
19171
19359
|
scrollX: Object,
|
|
19172
19360
|
// 纵向虚拟滚动配置项
|
|
19173
19361
|
scrollY: Object,
|
|
19174
|
-
//
|
|
19362
|
+
// (即将废弃)优化相关
|
|
19175
19363
|
animat: {
|
|
19176
19364
|
type: Boolean,
|
|
19177
19365
|
default: function _default() {
|
|
@@ -20089,6 +20277,7 @@ function handleUupdateResize(_vm) {
|
|
|
20089
20277
|
|
|
20090
20278
|
|
|
20091
20279
|
|
|
20280
|
+
|
|
20092
20281
|
var Table = Object.assign(table, {
|
|
20093
20282
|
install: function install(Vue) {
|
|
20094
20283
|
if (typeof window !== 'undefined' && window.VXETableMixin) {
|
|
@@ -20125,6 +20314,7 @@ var Table = Object.assign(table, {
|
|
|
20125
20314
|
|
|
20126
20315
|
|
|
20127
20316
|
|
|
20317
|
+
|
|
20128
20318
|
/* harmony default export */ var panel = ({
|
|
20129
20319
|
name: 'VxeTableFilter',
|
|
20130
20320
|
props: {
|
|
@@ -20336,8 +20526,32 @@ var Table = Object.assign(table, {
|
|
|
20336
20526
|
|
|
20337
20527
|
|
|
20338
20528
|
|
|
20529
|
+
|
|
20339
20530
|
/* harmony default export */ var src_mixin = ({
|
|
20340
20531
|
methods: {
|
|
20532
|
+
/**
|
|
20533
|
+
* 手动弹出筛选面板
|
|
20534
|
+
* @param column
|
|
20535
|
+
*/
|
|
20536
|
+
_openFilter: function _openFilter(fieldOrColumn) {
|
|
20537
|
+
var column = handleFieldOrColumn(this, fieldOrColumn);
|
|
20538
|
+
|
|
20539
|
+
if (column && column.filters) {
|
|
20540
|
+
var elemStore = this.elemStore;
|
|
20541
|
+
var fixed = column.fixed;
|
|
20542
|
+
return this.scrollToColumn(column).then(function () {
|
|
20543
|
+
var headerWrapperElem = elemStore["".concat(fixed || 'main', "-header-wrapper")] || elemStore['main-header-wrapper'];
|
|
20544
|
+
|
|
20545
|
+
if (headerWrapperElem) {
|
|
20546
|
+
var filterBtnElem = headerWrapperElem.querySelector(".vxe-header--column.".concat(column.id, " .vxe-filter--btn"));
|
|
20547
|
+
DomTools.triggerEvent(filterBtnElem, 'click');
|
|
20548
|
+
}
|
|
20549
|
+
});
|
|
20550
|
+
}
|
|
20551
|
+
|
|
20552
|
+
return this.$nextTick();
|
|
20553
|
+
},
|
|
20554
|
+
|
|
20341
20555
|
/**
|
|
20342
20556
|
* 修改筛选条件列表
|
|
20343
20557
|
* @param {ColumnInfo} fieldOrColumn 列
|
|
@@ -20443,7 +20657,7 @@ var Table = Object.assign(table, {
|
|
|
20443
20657
|
var maxHeight = null;
|
|
20444
20658
|
|
|
20445
20659
|
if (filterHeight >= bodyElem.clientHeight) {
|
|
20446
|
-
maxHeight = Math.max(
|
|
20660
|
+
maxHeight = Math.max(60, bodyElem.clientHeight - (filterFootElem ? filterFootElem.offsetHeight : 0) - (filterHeadElem ? filterHeadElem.offsetHeight : 0));
|
|
20447
20661
|
}
|
|
20448
20662
|
|
|
20449
20663
|
if (column.fixed === 'left') {
|
|
@@ -20758,6 +20972,7 @@ var Filter = {
|
|
|
20758
20972
|
|
|
20759
20973
|
|
|
20760
20974
|
|
|
20975
|
+
|
|
20761
20976
|
/* harmony default export */ var menu_src_mixin = ({
|
|
20762
20977
|
methods: {
|
|
20763
20978
|
/**
|
|
@@ -21147,10 +21362,11 @@ var Menu = {
|
|
|
21147
21362
|
|
|
21148
21363
|
|
|
21149
21364
|
|
|
21365
|
+
|
|
21150
21366
|
var mixin_getRowid = UtilTools.getRowid;
|
|
21151
21367
|
|
|
21152
21368
|
function insertTreeRow(_vm, newRecords, isAppend) {
|
|
21153
|
-
var
|
|
21369
|
+
var tableFullTreeData = _vm.tableFullTreeData,
|
|
21154
21370
|
afterFullData = _vm.afterFullData,
|
|
21155
21371
|
fullDataRowIdData = _vm.fullDataRowIdData,
|
|
21156
21372
|
fullAllDataRowIdData = _vm.fullAllDataRowIdData,
|
|
@@ -21159,7 +21375,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21159
21375
|
newRecords.forEach(function (item) {
|
|
21160
21376
|
var parentRowId = item[treeOpts.parentField];
|
|
21161
21377
|
var rowid = mixin_getRowid(_vm, item);
|
|
21162
|
-
var matchObj = parentRowId ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(
|
|
21378
|
+
var matchObj = parentRowId ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullTreeData, function (item) {
|
|
21163
21379
|
return parentRowId === item[treeOpts.rowField];
|
|
21164
21380
|
}, treeOpts) : null;
|
|
21165
21381
|
|
|
@@ -21177,6 +21393,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21177
21393
|
var rest = {
|
|
21178
21394
|
row: item,
|
|
21179
21395
|
rowid: rowid,
|
|
21396
|
+
seq: -1,
|
|
21180
21397
|
index: -1,
|
|
21181
21398
|
_index: -1,
|
|
21182
21399
|
$index: -1,
|
|
@@ -21190,14 +21407,15 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21190
21407
|
if (false) {}
|
|
21191
21408
|
|
|
21192
21409
|
afterFullData[funcName](item);
|
|
21193
|
-
|
|
21410
|
+
tableFullTreeData[funcName](item);
|
|
21194
21411
|
var _rest = {
|
|
21195
21412
|
row: item,
|
|
21196
21413
|
rowid: rowid,
|
|
21414
|
+
seq: -1,
|
|
21197
21415
|
index: -1,
|
|
21198
21416
|
_index: -1,
|
|
21199
21417
|
$index: -1,
|
|
21200
|
-
items:
|
|
21418
|
+
items: tableFullTreeData,
|
|
21201
21419
|
parent: null,
|
|
21202
21420
|
level: 0
|
|
21203
21421
|
};
|
|
@@ -21205,8 +21423,6 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21205
21423
|
fullAllDataRowIdData[rowid] = _rest;
|
|
21206
21424
|
}
|
|
21207
21425
|
});
|
|
21208
|
-
|
|
21209
|
-
_vm.updateVirtualTreeData();
|
|
21210
21426
|
}
|
|
21211
21427
|
|
|
21212
21428
|
/* harmony default export */ var edit_src_mixin = ({
|
|
@@ -21232,12 +21448,10 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21232
21448
|
var _this = this,
|
|
21233
21449
|
_editStore$insertList;
|
|
21234
21450
|
|
|
21235
|
-
var
|
|
21451
|
+
var tableFullTreeData = this.tableFullTreeData,
|
|
21236
21452
|
mergeList = this.mergeList,
|
|
21237
21453
|
afterFullData = this.afterFullData,
|
|
21238
21454
|
editStore = this.editStore,
|
|
21239
|
-
sYOpts = this.sYOpts,
|
|
21240
|
-
scrollYLoad = this.scrollYLoad,
|
|
21241
21455
|
tableFullData = this.tableFullData,
|
|
21242
21456
|
treeConfig = this.treeConfig,
|
|
21243
21457
|
fullDataRowIdData = this.fullDataRowIdData,
|
|
@@ -21290,7 +21504,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21290
21504
|
} else {
|
|
21291
21505
|
// 如果为虚拟树
|
|
21292
21506
|
if (treeConfig && transform) {
|
|
21293
|
-
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(
|
|
21507
|
+
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullTreeData, function (item) {
|
|
21294
21508
|
return row[treeOpts.rowField] === item[treeOpts.rowField];
|
|
21295
21509
|
}, treeOpts);
|
|
21296
21510
|
|
|
@@ -21312,6 +21526,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21312
21526
|
var rest = {
|
|
21313
21527
|
row: item,
|
|
21314
21528
|
rowid: rowid,
|
|
21529
|
+
seq: -1,
|
|
21315
21530
|
index: -1,
|
|
21316
21531
|
_index: -1,
|
|
21317
21532
|
$index: -1,
|
|
@@ -21322,7 +21537,6 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21322
21537
|
fullDataRowIdData[rowid] = rest;
|
|
21323
21538
|
fullAllDataRowIdData[rowid] = rest;
|
|
21324
21539
|
});
|
|
21325
|
-
this.updateVirtualTreeData();
|
|
21326
21540
|
} else {
|
|
21327
21541
|
if (false) {}
|
|
21328
21542
|
|
|
@@ -21358,13 +21572,13 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21358
21572
|
|
|
21359
21573
|
(_editStore$insertList = editStore.insertList).unshift.apply(_editStore$insertList, _toConsumableArray(newRecords));
|
|
21360
21574
|
|
|
21361
|
-
this.
|
|
21362
|
-
this.handleTableData(transform);
|
|
21575
|
+
this.handleTableData(treeConfig && treeOpts.transform);
|
|
21363
21576
|
this.updateFooter();
|
|
21364
21577
|
this.cacheRowMap();
|
|
21578
|
+
this.updateAfterDataIndex();
|
|
21365
21579
|
this.checkSelectionStatus();
|
|
21366
21580
|
|
|
21367
|
-
if (scrollYLoad) {
|
|
21581
|
+
if (this.scrollYLoad) {
|
|
21368
21582
|
this.updateScrollYSpace();
|
|
21369
21583
|
}
|
|
21370
21584
|
|
|
@@ -21391,15 +21605,13 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21391
21605
|
|
|
21392
21606
|
var afterFullData = this.afterFullData,
|
|
21393
21607
|
tableFullData = this.tableFullData,
|
|
21394
|
-
|
|
21608
|
+
tableFullTreeData = this.tableFullTreeData,
|
|
21395
21609
|
treeConfig = this.treeConfig,
|
|
21396
21610
|
mergeList = this.mergeList,
|
|
21397
21611
|
editStore = this.editStore,
|
|
21398
21612
|
checkboxOpts = this.checkboxOpts,
|
|
21399
21613
|
selection = this.selection,
|
|
21400
21614
|
isInsertByRow = this.isInsertByRow,
|
|
21401
|
-
sYOpts = this.sYOpts,
|
|
21402
|
-
scrollYLoad = this.scrollYLoad,
|
|
21403
21615
|
treeOpts = this.treeOpts;
|
|
21404
21616
|
var transform = treeOpts.transform;
|
|
21405
21617
|
var actived = editStore.actived,
|
|
@@ -21442,7 +21654,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21442
21654
|
if (treeConfig && transform) {
|
|
21443
21655
|
rows.forEach(function (row) {
|
|
21444
21656
|
var rowid = mixin_getRowid(_this2, row);
|
|
21445
|
-
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(
|
|
21657
|
+
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullTreeData, function (item) {
|
|
21446
21658
|
return rowid === mixin_getRowid(_this2, item);
|
|
21447
21659
|
}, treeOpts);
|
|
21448
21660
|
|
|
@@ -21456,8 +21668,6 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21456
21668
|
if (afIndex > -1) {
|
|
21457
21669
|
afterFullData.splice(afIndex, 1);
|
|
21458
21670
|
}
|
|
21459
|
-
|
|
21460
|
-
_this2.updateVirtualTreeData();
|
|
21461
21671
|
});
|
|
21462
21672
|
} else {
|
|
21463
21673
|
rows.forEach(function (row) {
|
|
@@ -21501,13 +21711,13 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21501
21711
|
insertList.splice(iIndex, 1);
|
|
21502
21712
|
}
|
|
21503
21713
|
});
|
|
21504
|
-
this.
|
|
21505
|
-
this.handleTableData(transform);
|
|
21714
|
+
this.handleTableData(treeConfig && treeOpts.transform);
|
|
21506
21715
|
this.updateFooter();
|
|
21507
21716
|
this.cacheRowMap();
|
|
21717
|
+
this.updateAfterDataIndex();
|
|
21508
21718
|
this.checkSelectionStatus();
|
|
21509
21719
|
|
|
21510
|
-
if (scrollYLoad) {
|
|
21720
|
+
if (this.scrollYLoad) {
|
|
21511
21721
|
this.updateScrollYSpace();
|
|
21512
21722
|
}
|
|
21513
21723
|
|
|
@@ -21582,7 +21792,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21582
21792
|
var _this6 = this;
|
|
21583
21793
|
|
|
21584
21794
|
var treeConfig = this.treeConfig,
|
|
21585
|
-
|
|
21795
|
+
tableFullTreeData = this.tableFullTreeData,
|
|
21586
21796
|
tableFullData = this.tableFullData,
|
|
21587
21797
|
treeOpts = this.treeOpts;
|
|
21588
21798
|
var insertList = this.editStore.insertList;
|
|
@@ -21593,7 +21803,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
21593
21803
|
if (treeConfig && treeOpts.transform) {
|
|
21594
21804
|
insertList.forEach(function (row) {
|
|
21595
21805
|
var rowid = mixin_getRowid(_this6, row);
|
|
21596
|
-
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(
|
|
21806
|
+
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullTreeData, function (item) {
|
|
21597
21807
|
return rowid === mixin_getRowid(_this6, item);
|
|
21598
21808
|
}, treeOpts);
|
|
21599
21809
|
|
|
@@ -22080,6 +22290,7 @@ function _arrayWithHoles(arr) {
|
|
|
22080
22290
|
|
|
22081
22291
|
|
|
22082
22292
|
|
|
22293
|
+
|
|
22083
22294
|
function _iterableToArrayLimit(arr, i) {
|
|
22084
22295
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
22085
22296
|
|
|
@@ -22136,6 +22347,8 @@ function _slicedToArray(arr, i) {
|
|
|
22136
22347
|
|
|
22137
22348
|
|
|
22138
22349
|
|
|
22350
|
+
|
|
22351
|
+
|
|
22139
22352
|
var allActivedModals = [];
|
|
22140
22353
|
var msgQueue = [];
|
|
22141
22354
|
/* harmony default export */ var modal = ({
|
|
@@ -23336,6 +23549,7 @@ var es_string_pad_start = __webpack_require__("4d90");
|
|
|
23336
23549
|
|
|
23337
23550
|
|
|
23338
23551
|
|
|
23552
|
+
|
|
23339
23553
|
var yearSize = 20;
|
|
23340
23554
|
var monthSize = 20;
|
|
23341
23555
|
var quarterSize = 8;
|
|
@@ -25874,6 +26088,7 @@ function renderExtraSuffixIcon(h, _vm) {
|
|
|
25874
26088
|
|
|
25875
26089
|
|
|
25876
26090
|
|
|
26091
|
+
|
|
25877
26092
|
function isOptionVisible(option) {
|
|
25878
26093
|
return option.visible !== false;
|
|
25879
26094
|
}
|
|
@@ -25883,7 +26098,7 @@ function getOptUniqueId() {
|
|
|
25883
26098
|
}
|
|
25884
26099
|
|
|
25885
26100
|
function getOptkey(_vm) {
|
|
25886
|
-
return _vm.optionId || '
|
|
26101
|
+
return _vm.optionId || '_X_ID';
|
|
25887
26102
|
}
|
|
25888
26103
|
|
|
25889
26104
|
function getOptid(_vm, option) {
|
|
@@ -26768,6 +26983,7 @@ function select_renderOpts(h, _vm) {
|
|
|
26768
26983
|
|
|
26769
26984
|
|
|
26770
26985
|
|
|
26986
|
+
|
|
26771
26987
|
var util_OptionConfig = /*#__PURE__*/function () {
|
|
26772
26988
|
function OptionConfig($xeselect, _vm) {
|
|
26773
26989
|
_classCallCheck(this, OptionConfig);
|
|
@@ -26892,6 +27108,7 @@ Object.keys(option_props).forEach(function (name) {
|
|
|
26892
27108
|
|
|
26893
27109
|
|
|
26894
27110
|
|
|
27111
|
+
|
|
26895
27112
|
/* harmony default export */ var export_panel = ({
|
|
26896
27113
|
name: 'VxeExportPanel',
|
|
26897
27114
|
props: {
|
|
@@ -27431,6 +27648,7 @@ Object.keys(option_props).forEach(function (name) {
|
|
|
27431
27648
|
|
|
27432
27649
|
|
|
27433
27650
|
|
|
27651
|
+
|
|
27434
27652
|
/* harmony default export */ var import_panel = ({
|
|
27435
27653
|
name: 'VxeImportPanel',
|
|
27436
27654
|
props: {
|
|
@@ -27638,6 +27856,10 @@ var es_string_repeat = __webpack_require__("38cf");
|
|
|
27638
27856
|
|
|
27639
27857
|
|
|
27640
27858
|
|
|
27859
|
+
|
|
27860
|
+
|
|
27861
|
+
|
|
27862
|
+
|
|
27641
27863
|
|
|
27642
27864
|
|
|
27643
27865
|
|
|
@@ -27676,15 +27898,24 @@ function hasTreeChildren($xetable, row) {
|
|
|
27676
27898
|
return row[treeOpts.children] && row[treeOpts.children].length > 0;
|
|
27677
27899
|
}
|
|
27678
27900
|
|
|
27679
|
-
function getSeq($xetable, row, rowIndex, column, columnIndex) {
|
|
27901
|
+
function getSeq($xetable, row, rowIndex, column, columnIndex, path) {
|
|
27680
27902
|
var seqOpts = $xetable.seqOpts;
|
|
27681
27903
|
var seqMethod = seqOpts.seqMethod || column.seqMethod;
|
|
27682
|
-
|
|
27683
|
-
|
|
27684
|
-
|
|
27685
|
-
|
|
27686
|
-
|
|
27687
|
-
|
|
27904
|
+
|
|
27905
|
+
if (seqMethod) {
|
|
27906
|
+
return seqMethod({
|
|
27907
|
+
row: row,
|
|
27908
|
+
rowIndex: rowIndex,
|
|
27909
|
+
column: column,
|
|
27910
|
+
columnIndex: columnIndex
|
|
27911
|
+
});
|
|
27912
|
+
}
|
|
27913
|
+
|
|
27914
|
+
if (path) {
|
|
27915
|
+
return toTreePathSeq(path);
|
|
27916
|
+
}
|
|
27917
|
+
|
|
27918
|
+
return seqOpts.startIndex + rowIndex + 1;
|
|
27688
27919
|
}
|
|
27689
27920
|
|
|
27690
27921
|
function defaultFilterExportColumn(column) {
|
|
@@ -27721,11 +27952,12 @@ function getLabelData($xetable, opts, columns, datas) {
|
|
|
27721
27952
|
if (treeConfig) {
|
|
27722
27953
|
// 如果是树表格只允许导出数据源
|
|
27723
27954
|
var rest = [];
|
|
27955
|
+
var expandMaps = new Map();
|
|
27724
27956
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(datas, function (item, rowIndex, items, path, parent, nodes) {
|
|
27725
27957
|
var row = item._row || item;
|
|
27726
27958
|
var parentRow = parent && parent._row ? parent._row : parent;
|
|
27727
27959
|
|
|
27728
|
-
if (isAllExpand || !parentRow || $xetable.isTreeExpandByRow(parentRow)) {
|
|
27960
|
+
if (isAllExpand || !parentRow || expandMaps.has(parentRow) && $xetable.isTreeExpandByRow(parentRow)) {
|
|
27729
27961
|
var hasRowChild = hasTreeChildren($xetable, row);
|
|
27730
27962
|
var _item = {
|
|
27731
27963
|
_row: row,
|
|
@@ -27756,7 +27988,7 @@ function getLabelData($xetable, opts, columns, datas) {
|
|
|
27756
27988
|
} else {
|
|
27757
27989
|
switch (column.type) {
|
|
27758
27990
|
case 'seq':
|
|
27759
|
-
cellValue = getSeq($xetable, row, rowIndex, column, columnIndex);
|
|
27991
|
+
cellValue = getSeq($xetable, row, rowIndex, column, columnIndex, path);
|
|
27760
27992
|
break;
|
|
27761
27993
|
|
|
27762
27994
|
case 'checkbox':
|
|
@@ -27798,6 +28030,7 @@ function getLabelData($xetable, opts, columns, datas) {
|
|
|
27798
28030
|
|
|
27799
28031
|
_item[column.id] = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toValueString(cellValue);
|
|
27800
28032
|
});
|
|
28033
|
+
expandMaps.set(row, 1);
|
|
27801
28034
|
rest.push(Object.assign(_item, row));
|
|
27802
28035
|
}
|
|
27803
28036
|
}, treeOpts);
|
|
@@ -27831,7 +28064,7 @@ function getLabelData($xetable, opts, columns, datas) {
|
|
|
27831
28064
|
} else {
|
|
27832
28065
|
switch (column.type) {
|
|
27833
28066
|
case 'seq':
|
|
27834
|
-
cellValue = getSeq($xetable, row, rowIndex, column, columnIndex);
|
|
28067
|
+
cellValue = getSeq($xetable, row, rowIndex, column, columnIndex, null);
|
|
27835
28068
|
break;
|
|
27836
28069
|
|
|
27837
28070
|
case 'checkbox':
|
|
@@ -27939,6 +28172,10 @@ function getFooterData(opts, footerTableData) {
|
|
|
27939
28172
|
|
|
27940
28173
|
function getCsvCellTypeLabel(column, cellValue) {
|
|
27941
28174
|
if (cellValue) {
|
|
28175
|
+
if (column.type === 'seq') {
|
|
28176
|
+
return "\t".concat(cellValue);
|
|
28177
|
+
}
|
|
28178
|
+
|
|
27942
28179
|
switch (column.cellType) {
|
|
27943
28180
|
case 'string':
|
|
27944
28181
|
if (!isNaN(cellValue)) {
|
|
@@ -29486,6 +29723,7 @@ var convertToRows = function convertToRows(originColumns) {
|
|
|
29486
29723
|
|
|
29487
29724
|
|
|
29488
29725
|
|
|
29726
|
+
|
|
29489
29727
|
function print(options) {
|
|
29490
29728
|
var opts = Object.assign({}, options, {
|
|
29491
29729
|
type: 'html'
|
|
@@ -29524,6 +29762,7 @@ var Export = {
|
|
|
29524
29762
|
|
|
29525
29763
|
|
|
29526
29764
|
|
|
29765
|
+
|
|
29527
29766
|
function getTargetOffset(target, container) {
|
|
29528
29767
|
var offsetTop = 0;
|
|
29529
29768
|
var offsetLeft = 0;
|
|
@@ -30012,6 +30251,9 @@ var Keyboard = {
|
|
|
30012
30251
|
|
|
30013
30252
|
|
|
30014
30253
|
|
|
30254
|
+
|
|
30255
|
+
|
|
30256
|
+
|
|
30015
30257
|
/**
|
|
30016
30258
|
* 校验规则
|
|
30017
30259
|
*/
|
|
@@ -30909,6 +31151,7 @@ var cellType = 'header';
|
|
|
30909
31151
|
// CONCATENATED MODULE: ./packages/header/index.js
|
|
30910
31152
|
|
|
30911
31153
|
|
|
31154
|
+
|
|
30912
31155
|
var Header = Object.assign(header, {
|
|
30913
31156
|
install: function install(Vue) {
|
|
30914
31157
|
Vue.component(header.name, header);
|
|
@@ -30922,6 +31165,7 @@ var Header = Object.assign(header, {
|
|
|
30922
31165
|
|
|
30923
31166
|
|
|
30924
31167
|
|
|
31168
|
+
|
|
30925
31169
|
var footer_cellType = 'footer';
|
|
30926
31170
|
|
|
30927
31171
|
function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
@@ -31270,6 +31514,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
|
|
|
31270
31514
|
// CONCATENATED MODULE: ./packages/footer/index.js
|
|
31271
31515
|
|
|
31272
31516
|
|
|
31517
|
+
|
|
31273
31518
|
var Footer = Object.assign(footer, {
|
|
31274
31519
|
install: function install(Vue) {
|
|
31275
31520
|
Vue.component(footer.name, footer);
|
|
@@ -31427,6 +31672,7 @@ Object.keys(column_props).forEach(function (name) {
|
|
|
31427
31672
|
// CONCATENATED MODULE: ./packages/column/index.js
|
|
31428
31673
|
|
|
31429
31674
|
|
|
31675
|
+
|
|
31430
31676
|
var Column = Object.assign(src_column, {
|
|
31431
31677
|
install: function install(Vue) {
|
|
31432
31678
|
Vue.component(src_column.name, src_column); // 兼容旧用法
|
|
@@ -31450,6 +31696,7 @@ var Column = Object.assign(src_column, {
|
|
|
31450
31696
|
// CONCATENATED MODULE: ./packages/colgroup/index.js
|
|
31451
31697
|
|
|
31452
31698
|
|
|
31699
|
+
|
|
31453
31700
|
var Colgroup = Object.assign(src_group, {
|
|
31454
31701
|
install: function install(Vue) {
|
|
31455
31702
|
Vue.component(src_group.name, src_group); // 兼容旧用法
|
|
@@ -31476,6 +31723,8 @@ var Colgroup = Object.assign(src_group, {
|
|
|
31476
31723
|
|
|
31477
31724
|
|
|
31478
31725
|
|
|
31726
|
+
|
|
31727
|
+
|
|
31479
31728
|
var grid_methods = {};
|
|
31480
31729
|
var propKeys = Object.keys(packages_table.props);
|
|
31481
31730
|
|
|
@@ -32328,7 +32577,12 @@ Object.keys(packages_table.methods).forEach(function (name) {
|
|
|
32328
32577
|
} // 只校验新增和修改的数据
|
|
32329
32578
|
|
|
32330
32579
|
|
|
32331
|
-
return this.validate(_body.insertRecords.concat(updateRecords)).then(function () {
|
|
32580
|
+
return this.validate(_body.insertRecords.concat(updateRecords)).then(function (errMap) {
|
|
32581
|
+
if (errMap) {
|
|
32582
|
+
// 如果校验不通过
|
|
32583
|
+
return;
|
|
32584
|
+
}
|
|
32585
|
+
|
|
32332
32586
|
if (_body.insertRecords.length || _removeRecords.length || updateRecords.length || _body.pendingRecords.length) {
|
|
32333
32587
|
_this5.tableLoading = true;
|
|
32334
32588
|
return Promise.resolve((beforeSave || _ajaxMethods2).apply(void 0, _toConsumableArray(_applyArgs2))).then(function (rest) {
|
|
@@ -32376,8 +32630,6 @@ Object.keys(packages_table.methods).forEach(function (name) {
|
|
|
32376
32630
|
});
|
|
32377
32631
|
}
|
|
32378
32632
|
}
|
|
32379
|
-
}).catch(function (errMap) {
|
|
32380
|
-
return errMap;
|
|
32381
32633
|
});
|
|
32382
32634
|
} else {
|
|
32383
32635
|
if (false) {}
|
|
@@ -32672,6 +32924,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
|
|
|
32672
32924
|
|
|
32673
32925
|
|
|
32674
32926
|
|
|
32927
|
+
|
|
32675
32928
|
var Grid = Object.assign(grid, {
|
|
32676
32929
|
install: function install(Vue) {
|
|
32677
32930
|
v_x_e_table.Grid = grid;
|
|
@@ -32693,6 +32946,8 @@ var Grid = Object.assign(grid, {
|
|
|
32693
32946
|
|
|
32694
32947
|
|
|
32695
32948
|
|
|
32949
|
+
|
|
32950
|
+
|
|
32696
32951
|
var renderDropdowns = function renderDropdowns(h, _vm, item, isBtn) {
|
|
32697
32952
|
var _e = _vm._e;
|
|
32698
32953
|
var dropdowns = item.dropdowns;
|
|
@@ -33464,6 +33719,7 @@ function renderCustoms(h, _vm) {
|
|
|
33464
33719
|
// CONCATENATED MODULE: ./packages/toolbar/index.js
|
|
33465
33720
|
|
|
33466
33721
|
|
|
33722
|
+
|
|
33467
33723
|
var Toolbar = Object.assign(src_toolbar, {
|
|
33468
33724
|
install: function install(Vue) {
|
|
33469
33725
|
Vue.component(src_toolbar.name, src_toolbar);
|
|
@@ -33953,6 +34209,7 @@ var Toolbar = Object.assign(src_toolbar, {
|
|
|
33953
34209
|
// CONCATENATED MODULE: ./packages/pager/index.js
|
|
33954
34210
|
|
|
33955
34211
|
|
|
34212
|
+
|
|
33956
34213
|
var Pager = Object.assign(pager, {
|
|
33957
34214
|
install: function install(Vue) {
|
|
33958
34215
|
Vue.component(pager.name, pager);
|
|
@@ -33962,6 +34219,7 @@ var Pager = Object.assign(pager, {
|
|
|
33962
34219
|
// CONCATENATED MODULE: ./packages/checkbox/index.js
|
|
33963
34220
|
|
|
33964
34221
|
|
|
34222
|
+
|
|
33965
34223
|
var Checkbox = Object.assign(src_checkbox, {
|
|
33966
34224
|
install: function install(Vue) {
|
|
33967
34225
|
Vue.component(src_checkbox.name, src_checkbox);
|
|
@@ -33971,6 +34229,7 @@ var Checkbox = Object.assign(src_checkbox, {
|
|
|
33971
34229
|
// CONCATENATED MODULE: ./packages/checkbox/src/group.js
|
|
33972
34230
|
|
|
33973
34231
|
|
|
34232
|
+
|
|
33974
34233
|
/* harmony default export */ var checkbox_src_group = ({
|
|
33975
34234
|
name: 'VxeCheckboxGroup',
|
|
33976
34235
|
props: {
|
|
@@ -34024,6 +34283,7 @@ var Checkbox = Object.assign(src_checkbox, {
|
|
|
34024
34283
|
// CONCATENATED MODULE: ./packages/checkbox-group/index.js
|
|
34025
34284
|
|
|
34026
34285
|
|
|
34286
|
+
|
|
34027
34287
|
var CheckboxGroup = Object.assign(checkbox_src_group, {
|
|
34028
34288
|
install: function install(Vue) {
|
|
34029
34289
|
Vue.component(checkbox_src_group.name, checkbox_src_group);
|
|
@@ -34033,6 +34293,7 @@ var CheckboxGroup = Object.assign(checkbox_src_group, {
|
|
|
34033
34293
|
// CONCATENATED MODULE: ./packages/radio/index.js
|
|
34034
34294
|
|
|
34035
34295
|
|
|
34296
|
+
|
|
34036
34297
|
var Radio = Object.assign(src_radio, {
|
|
34037
34298
|
install: function install(Vue) {
|
|
34038
34299
|
Vue.component(src_radio.name, src_radio);
|
|
@@ -34086,6 +34347,7 @@ var Radio = Object.assign(src_radio, {
|
|
|
34086
34347
|
// CONCATENATED MODULE: ./packages/radio-group/index.js
|
|
34087
34348
|
|
|
34088
34349
|
|
|
34350
|
+
|
|
34089
34351
|
var RadioGroup = Object.assign(radio_src_group, {
|
|
34090
34352
|
install: function install(Vue) {
|
|
34091
34353
|
Vue.component(radio_src_group.name, radio_src_group);
|
|
@@ -34189,6 +34451,7 @@ var RadioGroup = Object.assign(radio_src_group, {
|
|
|
34189
34451
|
// CONCATENATED MODULE: ./packages/radio-button/index.js
|
|
34190
34452
|
|
|
34191
34453
|
|
|
34454
|
+
|
|
34192
34455
|
var RadioButton = Object.assign(src_button, {
|
|
34193
34456
|
install: function install(Vue) {
|
|
34194
34457
|
Vue.component(src_button.name, src_button);
|
|
@@ -34198,6 +34461,7 @@ var RadioButton = Object.assign(src_button, {
|
|
|
34198
34461
|
// CONCATENATED MODULE: ./packages/input/index.js
|
|
34199
34462
|
|
|
34200
34463
|
|
|
34464
|
+
|
|
34201
34465
|
var Input = Object.assign(input, {
|
|
34202
34466
|
install: function install(Vue) {
|
|
34203
34467
|
Vue.component(input.name, input);
|
|
@@ -34216,6 +34480,7 @@ var Input = Object.assign(input, {
|
|
|
34216
34480
|
|
|
34217
34481
|
|
|
34218
34482
|
|
|
34483
|
+
|
|
34219
34484
|
var autoTxtElem;
|
|
34220
34485
|
/* harmony default export */ var src_textarea = ({
|
|
34221
34486
|
name: 'VxeTextarea',
|
|
@@ -34484,6 +34749,7 @@ var autoTxtElem;
|
|
|
34484
34749
|
// CONCATENATED MODULE: ./packages/textarea/index.js
|
|
34485
34750
|
|
|
34486
34751
|
|
|
34752
|
+
|
|
34487
34753
|
var Textarea = Object.assign(src_textarea, {
|
|
34488
34754
|
install: function install(Vue) {
|
|
34489
34755
|
Vue.component(src_textarea.name, src_textarea);
|
|
@@ -34499,6 +34765,7 @@ var Textarea = Object.assign(src_textarea, {
|
|
|
34499
34765
|
|
|
34500
34766
|
|
|
34501
34767
|
|
|
34768
|
+
|
|
34502
34769
|
/* harmony default export */ var button_src_button = ({
|
|
34503
34770
|
name: 'VxeButton',
|
|
34504
34771
|
mixins: [size],
|
|
@@ -34806,48 +35073,49 @@ var Textarea = Object.assign(src_textarea, {
|
|
|
34806
35073
|
};
|
|
34807
35074
|
|
|
34808
35075
|
var _DomTools$getAbsolute = DomTools.getAbsolutePos(targetElem),
|
|
35076
|
+
top = _DomTools$getAbsolute.top,
|
|
35077
|
+
left = _DomTools$getAbsolute.left,
|
|
34809
35078
|
boundingTop = _DomTools$getAbsolute.boundingTop,
|
|
34810
|
-
boundingLeft = _DomTools$getAbsolute.boundingLeft,
|
|
34811
35079
|
visibleHeight = _DomTools$getAbsolute.visibleHeight,
|
|
34812
35080
|
visibleWidth = _DomTools$getAbsolute.visibleWidth;
|
|
34813
35081
|
|
|
34814
35082
|
var panelPlacement = 'bottom';
|
|
34815
35083
|
|
|
34816
35084
|
if (transfer) {
|
|
34817
|
-
var
|
|
34818
|
-
var
|
|
35085
|
+
var btnLeft = left + targetWidth - panelWidth;
|
|
35086
|
+
var btnTop = top + targetHeight;
|
|
34819
35087
|
|
|
34820
35088
|
if (placement === 'top') {
|
|
34821
35089
|
panelPlacement = 'top';
|
|
34822
|
-
|
|
35090
|
+
btnTop = top - panelHeight;
|
|
34823
35091
|
} else if (!placement) {
|
|
34824
35092
|
// 如果下面不够放,则向上
|
|
34825
|
-
if (
|
|
35093
|
+
if (boundingTop + targetHeight + panelHeight + marginSize > visibleHeight) {
|
|
34826
35094
|
panelPlacement = 'top';
|
|
34827
|
-
|
|
35095
|
+
btnTop = top - panelHeight;
|
|
34828
35096
|
} // 如果上面不够放,则向下(优先)
|
|
34829
35097
|
|
|
34830
35098
|
|
|
34831
|
-
if (
|
|
35099
|
+
if (btnTop < marginSize) {
|
|
34832
35100
|
panelPlacement = 'bottom';
|
|
34833
|
-
|
|
35101
|
+
btnTop = top + targetHeight;
|
|
34834
35102
|
}
|
|
34835
35103
|
} // 如果溢出右边
|
|
34836
35104
|
|
|
34837
35105
|
|
|
34838
|
-
if (
|
|
34839
|
-
|
|
35106
|
+
if (btnLeft + panelWidth + marginSize > visibleWidth) {
|
|
35107
|
+
btnLeft -= btnLeft + panelWidth + marginSize - visibleWidth;
|
|
34840
35108
|
} // 如果溢出左边
|
|
34841
35109
|
|
|
34842
35110
|
|
|
34843
|
-
if (
|
|
34844
|
-
|
|
35111
|
+
if (btnLeft < marginSize) {
|
|
35112
|
+
btnLeft = marginSize;
|
|
34845
35113
|
}
|
|
34846
35114
|
|
|
34847
35115
|
Object.assign(panelStyle, {
|
|
34848
|
-
left: "".concat(
|
|
35116
|
+
left: "".concat(btnLeft, "px"),
|
|
34849
35117
|
right: 'auto',
|
|
34850
|
-
top: "".concat(
|
|
35118
|
+
top: "".concat(btnTop, "px"),
|
|
34851
35119
|
minWidth: "".concat(targetWidth, "px")
|
|
34852
35120
|
});
|
|
34853
35121
|
} else {
|
|
@@ -34885,6 +35153,7 @@ var Textarea = Object.assign(src_textarea, {
|
|
|
34885
35153
|
// CONCATENATED MODULE: ./packages/button/index.js
|
|
34886
35154
|
|
|
34887
35155
|
|
|
35156
|
+
|
|
34888
35157
|
var Button = Object.assign(button_src_button, {
|
|
34889
35158
|
install: function install(Vue) {
|
|
34890
35159
|
Vue.component(button_src_button.name, button_src_button);
|
|
@@ -34899,6 +35168,8 @@ var Button = Object.assign(button_src_button, {
|
|
|
34899
35168
|
|
|
34900
35169
|
|
|
34901
35170
|
|
|
35171
|
+
|
|
35172
|
+
|
|
34902
35173
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
34903
35174
|
|
|
34904
35175
|
var ModalClass = null;
|
|
@@ -35034,6 +35305,7 @@ var Modal = Object.assign(modal, {
|
|
|
35034
35305
|
|
|
35035
35306
|
|
|
35036
35307
|
|
|
35308
|
+
|
|
35037
35309
|
function updateTipStyle(_vm) {
|
|
35038
35310
|
var wrapperElem = _vm.$el,
|
|
35039
35311
|
tipTarget = _vm.tipTarget,
|
|
@@ -35354,6 +35626,7 @@ function updateTipStyle(_vm) {
|
|
|
35354
35626
|
|
|
35355
35627
|
|
|
35356
35628
|
|
|
35629
|
+
|
|
35357
35630
|
var Tooltip = Object.assign(src_tooltip, {
|
|
35358
35631
|
install: function install(Vue) {
|
|
35359
35632
|
v_x_e_table._tooltip = 1;
|
|
@@ -35370,6 +35643,7 @@ var Tooltip = Object.assign(src_tooltip, {
|
|
|
35370
35643
|
|
|
35371
35644
|
|
|
35372
35645
|
|
|
35646
|
+
|
|
35373
35647
|
var util_ItemConfig = /*#__PURE__*/function () {
|
|
35374
35648
|
function ItemConfig($xeform, item) {
|
|
35375
35649
|
_classCallCheck(this, ItemConfig);
|
|
@@ -35547,6 +35821,9 @@ function renderTitle(h, _vm, item) {
|
|
|
35547
35821
|
|
|
35548
35822
|
|
|
35549
35823
|
|
|
35824
|
+
|
|
35825
|
+
|
|
35826
|
+
|
|
35550
35827
|
|
|
35551
35828
|
|
|
35552
35829
|
|
|
@@ -36379,6 +36656,7 @@ function renderItems(h, _vm, itemList) {
|
|
|
36379
36656
|
// CONCATENATED MODULE: ./packages/form/index.js
|
|
36380
36657
|
|
|
36381
36658
|
|
|
36659
|
+
|
|
36382
36660
|
var Form = Object.assign(src_form, {
|
|
36383
36661
|
install: function install(Vue) {
|
|
36384
36662
|
Vue.component(src_form.name, src_form);
|
|
@@ -36568,6 +36846,7 @@ var form_item_renderItem = function renderItem(h, _vm, item, slots) {
|
|
|
36568
36846
|
// CONCATENATED MODULE: ./packages/form-item/index.js
|
|
36569
36847
|
|
|
36570
36848
|
|
|
36849
|
+
|
|
36571
36850
|
var FormItem = Object.assign(form_item, {
|
|
36572
36851
|
install: function install(Vue) {
|
|
36573
36852
|
Vue.component(form_item.name, form_item);
|
|
@@ -36597,6 +36876,7 @@ var FormItem = Object.assign(form_item, {
|
|
|
36597
36876
|
// CONCATENATED MODULE: ./packages/form-gather/index.js
|
|
36598
36877
|
|
|
36599
36878
|
|
|
36879
|
+
|
|
36600
36880
|
var FormGather = Object.assign(form_gather, {
|
|
36601
36881
|
install: function install(Vue) {
|
|
36602
36882
|
Vue.component(form_gather.name, form_gather);
|
|
@@ -36663,6 +36943,7 @@ Object.keys(optgroup_props).forEach(function (name) {
|
|
|
36663
36943
|
|
|
36664
36944
|
|
|
36665
36945
|
|
|
36946
|
+
|
|
36666
36947
|
var Select = Object.assign(src_select, {
|
|
36667
36948
|
Option: src_option,
|
|
36668
36949
|
Optgroup: optgroup,
|
|
@@ -36676,6 +36957,7 @@ var Select = Object.assign(src_select, {
|
|
|
36676
36957
|
// CONCATENATED MODULE: ./packages/optgroup/index.js
|
|
36677
36958
|
|
|
36678
36959
|
|
|
36960
|
+
|
|
36679
36961
|
var Optgroup = Object.assign(optgroup, {
|
|
36680
36962
|
install: function install(Vue) {
|
|
36681
36963
|
Vue.component(optgroup.name, optgroup);
|
|
@@ -36685,6 +36967,7 @@ var Optgroup = Object.assign(optgroup, {
|
|
|
36685
36967
|
// CONCATENATED MODULE: ./packages/option/index.js
|
|
36686
36968
|
|
|
36687
36969
|
|
|
36970
|
+
|
|
36688
36971
|
var Option = Object.assign(src_option, {
|
|
36689
36972
|
install: function install(Vue) {
|
|
36690
36973
|
Vue.component(src_option.name, src_option);
|
|
@@ -36839,6 +37122,7 @@ var Option = Object.assign(src_option, {
|
|
|
36839
37122
|
// CONCATENATED MODULE: ./packages/switch/index.js
|
|
36840
37123
|
|
|
36841
37124
|
|
|
37125
|
+
|
|
36842
37126
|
var Switch = Object.assign(src_switch, {
|
|
36843
37127
|
install: function install(Vue) {
|
|
36844
37128
|
Vue.component(src_switch.name, src_switch);
|
|
@@ -36854,6 +37138,8 @@ var Switch = Object.assign(src_switch, {
|
|
|
36854
37138
|
|
|
36855
37139
|
|
|
36856
37140
|
|
|
37141
|
+
|
|
37142
|
+
|
|
36857
37143
|
/* harmony default export */ var src_list = ({
|
|
36858
37144
|
name: 'VxeList',
|
|
36859
37145
|
mixins: [size],
|
|
@@ -37220,6 +37506,7 @@ var Switch = Object.assign(src_switch, {
|
|
|
37220
37506
|
// CONCATENATED MODULE: ./packages/list/index.js
|
|
37221
37507
|
|
|
37222
37508
|
|
|
37509
|
+
|
|
37223
37510
|
var List = Object.assign(src_list, {
|
|
37224
37511
|
install: function install(Vue) {
|
|
37225
37512
|
Vue.component(src_list.name, src_list);
|
|
@@ -37232,6 +37519,8 @@ var List = Object.assign(src_list, {
|
|
|
37232
37519
|
|
|
37233
37520
|
|
|
37234
37521
|
|
|
37522
|
+
|
|
37523
|
+
|
|
37235
37524
|
/* harmony default export */ var pulldown = ({
|
|
37236
37525
|
name: 'VxePulldown',
|
|
37237
37526
|
mixins: [size],
|
|
@@ -37532,6 +37821,7 @@ var List = Object.assign(src_list, {
|
|
|
37532
37821
|
// CONCATENATED MODULE: ./packages/pulldown/index.js
|
|
37533
37822
|
|
|
37534
37823
|
|
|
37824
|
+
|
|
37535
37825
|
var Pulldown = Object.assign(pulldown, {
|
|
37536
37826
|
install: function install(Vue) {
|
|
37537
37827
|
Vue.component(pulldown.name, pulldown);
|