vxe-table 3.8.8 → 3.8.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/button/src/button.js +87 -41
- package/lib/button/src/button.min.js +1 -1
- package/lib/custom/src/panel.js +2 -16
- package/lib/custom/src/panel.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +605 -710
- package/lib/index.umd.min.js +1 -1
- package/lib/input/style/style.css +6 -1
- package/lib/input/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/columnInfo.js +2 -0
- package/lib/table/src/header.js +1 -1
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +455 -600
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +5 -3
- package/lib/table/src/table.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +1 -0
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/v-x-e-table/src/renderer.js +1 -0
- package/lib/v-x-e-table/src/renderer.min.js +1 -1
- package/lib/vxe-input/style/style.css +6 -1
- package/lib/vxe-input/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/button/src/button.js +71 -31
- package/packages/custom/src/panel.js +2 -14
- package/packages/table/src/columnInfo.js +1 -1
- package/packages/table/src/header.js +1 -1
- package/packages/table/src/methods.js +141 -251
- package/packages/table/src/table.js +6 -4
- package/packages/v-x-e-table/src/conf.js +1 -0
- package/packages/v-x-e-table/src/renderer.js +1 -0
- package/styles/input.scss +6 -1
- /package/lib/icon/style/{iconfont.1719197379838.ttf → iconfont.1719366342405.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1719197379838.woff → iconfont.1719366342405.woff} +0 -0
- /package/lib/icon/style/{iconfont.1719197379838.woff2 → iconfont.1719366342405.woff2} +0 -0
- /package/lib/{iconfont.1719197379838.ttf → iconfont.1719366342405.ttf} +0 -0
- /package/lib/{iconfont.1719197379838.woff → iconfont.1719366342405.woff} +0 -0
- /package/lib/{iconfont.1719197379838.woff2 → iconfont.1719366342405.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -11436,6 +11436,7 @@ var iconPrefix = 'vxe-icon-';
|
|
|
11436
11436
|
button: {
|
|
11437
11437
|
// size: null,
|
|
11438
11438
|
// transfer: false
|
|
11439
|
+
trigger: 'hover'
|
|
11439
11440
|
},
|
|
11440
11441
|
buttonGroup: {
|
|
11441
11442
|
// size: null
|
|
@@ -11504,7 +11505,7 @@ var es_array_concat = __webpack_require__(8706);
|
|
|
11504
11505
|
|
|
11505
11506
|
|
|
11506
11507
|
function getLog(message, params) {
|
|
11507
|
-
return "[vxe-table v".concat("3.8.
|
|
11508
|
+
return "[vxe-table v".concat("3.8.9-beta.1", "] ").concat(conf.i18n(message, params));
|
|
11508
11509
|
}
|
|
11509
11510
|
function outLog(type) {
|
|
11510
11511
|
return function (message, params) {
|
|
@@ -12539,6 +12540,7 @@ var renderMap = {
|
|
|
12539
12540
|
case 'date':
|
|
12540
12541
|
case 'week':
|
|
12541
12542
|
case 'month':
|
|
12543
|
+
case 'quarter':
|
|
12542
12544
|
case 'year':
|
|
12543
12545
|
cellValue = getLabelFormatDate(cellValue, props);
|
|
12544
12546
|
break;
|
|
@@ -13198,7 +13200,7 @@ function component(comp) {
|
|
|
13198
13200
|
components[comp.name] = comp;
|
|
13199
13201
|
}
|
|
13200
13202
|
}
|
|
13201
|
-
var version = "3.8.
|
|
13203
|
+
var version = "3.8.9-beta.1";
|
|
13202
13204
|
var tableVersion = version;
|
|
13203
13205
|
var VxeUI = {
|
|
13204
13206
|
v: v,
|
|
@@ -13344,6 +13346,8 @@ var ColumnInfo = /*#__PURE__*/function () {
|
|
|
13344
13346
|
renderHeight: 0,
|
|
13345
13347
|
renderResizeWidth: 0,
|
|
13346
13348
|
resizeWidth: 0,
|
|
13349
|
+
// 手动调整
|
|
13350
|
+
|
|
13347
13351
|
renderLeft: 0,
|
|
13348
13352
|
renderArgs: [],
|
|
13349
13353
|
// 渲染参数可用于扩展
|
|
@@ -15203,7 +15207,7 @@ var cellType = 'header';
|
|
|
15203
15207
|
$xetable._lastResizeTime = Date.now();
|
|
15204
15208
|
$xetable.analyColumnWidth();
|
|
15205
15209
|
$xetable.recalculate(true).then(function () {
|
|
15206
|
-
$xetable.
|
|
15210
|
+
$xetable.saveCustomStore('update:visible');
|
|
15207
15211
|
$xetable.updateCellAreas();
|
|
15208
15212
|
$xetable.emitEvent('resizable-change', _objectSpread2(_objectSpread2({}, params), {}, {
|
|
15209
15213
|
resizeWidth: resizeWidth
|
|
@@ -15747,59 +15751,6 @@ if (browse.isDoc) {
|
|
|
15747
15751
|
trailing: false
|
|
15748
15752
|
}), false);
|
|
15749
15753
|
}
|
|
15750
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
|
15751
|
-
function _arrayWithHoles(arr) {
|
|
15752
|
-
if (Array.isArray(arr)) return arr;
|
|
15753
|
-
}
|
|
15754
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
|
15755
|
-
|
|
15756
|
-
|
|
15757
|
-
|
|
15758
|
-
|
|
15759
|
-
|
|
15760
|
-
|
|
15761
|
-
|
|
15762
|
-
|
|
15763
|
-
function _iterableToArrayLimit(r, l) {
|
|
15764
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
15765
|
-
if (null != t) {
|
|
15766
|
-
var e,
|
|
15767
|
-
n,
|
|
15768
|
-
i,
|
|
15769
|
-
u,
|
|
15770
|
-
a = [],
|
|
15771
|
-
f = !0,
|
|
15772
|
-
o = !1;
|
|
15773
|
-
try {
|
|
15774
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
15775
|
-
if (Object(t) !== t) return;
|
|
15776
|
-
f = !1;
|
|
15777
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
15778
|
-
} catch (r) {
|
|
15779
|
-
o = !0, n = r;
|
|
15780
|
-
} finally {
|
|
15781
|
-
try {
|
|
15782
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
15783
|
-
} finally {
|
|
15784
|
-
if (o) throw n;
|
|
15785
|
-
}
|
|
15786
|
-
}
|
|
15787
|
-
return a;
|
|
15788
|
-
}
|
|
15789
|
-
}
|
|
15790
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
|
15791
|
-
|
|
15792
|
-
function _nonIterableRest() {
|
|
15793
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
15794
|
-
}
|
|
15795
|
-
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
|
|
15796
|
-
|
|
15797
|
-
|
|
15798
|
-
|
|
15799
|
-
|
|
15800
|
-
function _slicedToArray(arr, i) {
|
|
15801
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
15802
|
-
}
|
|
15803
15754
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.sort.js
|
|
15804
15755
|
var es_array_sort = __webpack_require__(6910);
|
|
15805
15756
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.finally.js
|
|
@@ -16699,7 +16650,6 @@ var Cell = {
|
|
|
16699
16650
|
|
|
16700
16651
|
|
|
16701
16652
|
|
|
16702
|
-
|
|
16703
16653
|
|
|
16704
16654
|
|
|
16705
16655
|
var setCellValue = utils.setCellValue,
|
|
@@ -16713,10 +16663,7 @@ var calcHeight = dom.calcHeight,
|
|
|
16713
16663
|
methods_isNodeElement = dom.isNodeElement;
|
|
16714
16664
|
var isWebkit = browse['-webkit'] && !browse.edge;
|
|
16715
16665
|
var debounceScrollYDuration = browse.msie ? 80 : 20;
|
|
16716
|
-
var
|
|
16717
|
-
var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
16718
|
-
var fixedStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_FIXED';
|
|
16719
|
-
var sortStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_SORT';
|
|
16666
|
+
var customStorageKey = 'VXE_CUSTOM_STORE';
|
|
16720
16667
|
|
|
16721
16668
|
/**
|
|
16722
16669
|
* 生成行的唯一主键
|
|
@@ -16741,13 +16688,21 @@ function getNextSortOrder(_vm, column) {
|
|
|
16741
16688
|
var oIndex = orders.indexOf(currOrder) + 1;
|
|
16742
16689
|
return orders[oIndex < orders.length ? oIndex : 0];
|
|
16743
16690
|
}
|
|
16744
|
-
function getCustomStorageMap(
|
|
16691
|
+
var getCustomStorageMap = function getCustomStorageMap(id) {
|
|
16745
16692
|
var version = conf.version;
|
|
16746
|
-
var rest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringJSON(localStorage.getItem(
|
|
16747
|
-
|
|
16693
|
+
var rest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringJSON(localStorage.getItem(customStorageKey) || '');
|
|
16694
|
+
var maps = rest && rest._v === version ? rest : {
|
|
16748
16695
|
_v: version
|
|
16749
16696
|
};
|
|
16750
|
-
}
|
|
16697
|
+
return (id ? maps[id] : maps) || {};
|
|
16698
|
+
};
|
|
16699
|
+
var setCustomStorageMap = function setCustomStorageMap(id, data) {
|
|
16700
|
+
var version = conf.version;
|
|
16701
|
+
var maps = getCustomStorageMap();
|
|
16702
|
+
maps[id] = data || undefined;
|
|
16703
|
+
maps._v = version;
|
|
16704
|
+
localStorage.setItem(customStorageKey, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toJSONString(maps));
|
|
16705
|
+
};
|
|
16751
16706
|
var getRecoverRowMaps = function getRecoverRowMaps(_vm, keyMaps) {
|
|
16752
16707
|
var fullAllDataRowIdData = _vm.fullAllDataRowIdData;
|
|
16753
16708
|
var restKeys = {};
|
|
@@ -17317,26 +17272,29 @@ var Methods = {
|
|
|
17317
17272
|
this.collectColumn = collectColumn;
|
|
17318
17273
|
var tableFullColumn = methods_getColumnList(collectColumn);
|
|
17319
17274
|
this.tableFullColumn = tableFullColumn;
|
|
17275
|
+
this._isLoading = true;
|
|
17320
17276
|
this.initColumnSort();
|
|
17321
|
-
this.restoreCustomStorage()
|
|
17322
|
-
|
|
17323
|
-
|
|
17324
|
-
|
|
17325
|
-
_this9.
|
|
17326
|
-
|
|
17327
|
-
|
|
17328
|
-
|
|
17329
|
-
|
|
17330
|
-
|
|
17331
|
-
|
|
17332
|
-
|
|
17333
|
-
|
|
17334
|
-
_this9.$toolbar
|
|
17335
|
-
|
|
17336
|
-
|
|
17337
|
-
|
|
17338
|
-
|
|
17339
|
-
|
|
17277
|
+
return Promise.resolve(this.restoreCustomStorage()).then(function () {
|
|
17278
|
+
_this9._isLoading = false;
|
|
17279
|
+
_this9.cacheColumnMap();
|
|
17280
|
+
_this9.parseColumns().then(function () {
|
|
17281
|
+
if (_this9.scrollXLoad) {
|
|
17282
|
+
_this9.loadScrollXData(true);
|
|
17283
|
+
}
|
|
17284
|
+
});
|
|
17285
|
+
_this9.clearMergeCells();
|
|
17286
|
+
_this9.clearMergeFooterItems();
|
|
17287
|
+
_this9.handleTableData(true);
|
|
17288
|
+
if (false) {}
|
|
17289
|
+
return _this9.$nextTick().then(function () {
|
|
17290
|
+
if (_this9.$toolbar) {
|
|
17291
|
+
_this9.$toolbar.syncUpdate({
|
|
17292
|
+
collectColumn: collectColumn,
|
|
17293
|
+
$table: _this9
|
|
17294
|
+
});
|
|
17295
|
+
}
|
|
17296
|
+
return _this9.recalculate();
|
|
17297
|
+
});
|
|
17340
17298
|
});
|
|
17341
17299
|
},
|
|
17342
17300
|
/**
|
|
@@ -17420,7 +17378,7 @@ var Methods = {
|
|
|
17420
17378
|
};
|
|
17421
17379
|
};
|
|
17422
17380
|
// 源数据缓存
|
|
17423
|
-
if (treeConfig
|
|
17381
|
+
if (treeConfig) {
|
|
17424
17382
|
var childrenField = treeOpts.children || treeOpts.childrenField;
|
|
17425
17383
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(sourceData, handleSourceRow, {
|
|
17426
17384
|
children: treeOpts.transform ? treeOpts.mapChildrenField : childrenField
|
|
@@ -17430,6 +17388,9 @@ var Methods = {
|
|
|
17430
17388
|
}
|
|
17431
17389
|
this.tableSourceData = sourceData;
|
|
17432
17390
|
},
|
|
17391
|
+
getParams: function getParams() {
|
|
17392
|
+
return this.params;
|
|
17393
|
+
},
|
|
17433
17394
|
loadTreeChildren: function loadTreeChildren(row, childRecords) {
|
|
17434
17395
|
var _this12 = this;
|
|
17435
17396
|
var keepSource = this.keepSource,
|
|
@@ -18488,7 +18449,7 @@ var Methods = {
|
|
|
18488
18449
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([targetColumn], function (column) {
|
|
18489
18450
|
column.fixed = fixed;
|
|
18490
18451
|
});
|
|
18491
|
-
this.
|
|
18452
|
+
this.saveCustomStore('update:fixed');
|
|
18492
18453
|
return this.refreshColumn();
|
|
18493
18454
|
}
|
|
18494
18455
|
return this.$nextTick();
|
|
@@ -18503,7 +18464,7 @@ var Methods = {
|
|
|
18503
18464
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([targetColumn], function (column) {
|
|
18504
18465
|
column.fixed = null;
|
|
18505
18466
|
});
|
|
18506
|
-
this.
|
|
18467
|
+
this.saveCustomStore('update:fixed');
|
|
18507
18468
|
return this.refreshColumn();
|
|
18508
18469
|
}
|
|
18509
18470
|
return this.$nextTick();
|
|
@@ -18584,15 +18545,7 @@ var Methods = {
|
|
|
18584
18545
|
}
|
|
18585
18546
|
column.renderResizeWidth = column.renderWidth;
|
|
18586
18547
|
});
|
|
18587
|
-
|
|
18588
|
-
this.saveCustomResizable(true);
|
|
18589
|
-
}
|
|
18590
|
-
if (opts.sort) {
|
|
18591
|
-
this.saveCustomSort(true);
|
|
18592
|
-
}
|
|
18593
|
-
if (opts.fixed) {
|
|
18594
|
-
this.saveCustomFixed();
|
|
18595
|
-
}
|
|
18548
|
+
this.saveCustomStore('reset');
|
|
18596
18549
|
return this.handleCustom();
|
|
18597
18550
|
},
|
|
18598
18551
|
handleCustom: function handleCustom() {
|
|
@@ -18606,142 +18559,33 @@ var Methods = {
|
|
|
18606
18559
|
this.clearCopyCellArea();
|
|
18607
18560
|
}
|
|
18608
18561
|
}
|
|
18609
|
-
this.saveCustomStore();
|
|
18610
18562
|
this.analyColumnWidth();
|
|
18611
18563
|
return this.refreshColumn(true);
|
|
18612
18564
|
},
|
|
18613
|
-
|
|
18614
|
-
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
|
|
18618
|
-
|
|
18619
|
-
|
|
18620
|
-
var
|
|
18621
|
-
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
|
|
18626
|
-
|
|
18627
|
-
var isCustomSort = isAllStorage || storageOpts.sort;
|
|
18628
|
-
if (storage && id && restoreStore) {
|
|
18629
|
-
restoreStore({
|
|
18630
|
-
id: id
|
|
18631
|
-
});
|
|
18632
|
-
}
|
|
18633
|
-
if (customConfig && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
|
|
18634
|
-
var customMap = {};
|
|
18635
|
-
if (!id) {
|
|
18636
|
-
errLog('vxe.error.reqProp', ['id']);
|
|
18637
|
-
return;
|
|
18638
|
-
}
|
|
18639
|
-
if (isCustomResizable) {
|
|
18640
|
-
var columnWidthStorage = getCustomStorageMap(resizableStorageKey)[id];
|
|
18641
|
-
if (columnWidthStorage) {
|
|
18642
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(columnWidthStorage, function (resizeWidth, field) {
|
|
18643
|
-
customMap[field] = {
|
|
18644
|
-
field: field,
|
|
18645
|
-
resizeWidth: resizeWidth
|
|
18646
|
-
};
|
|
18647
|
-
});
|
|
18648
|
-
}
|
|
18649
|
-
}
|
|
18650
|
-
// 自定义固定列
|
|
18651
|
-
if (isCustomFixed) {
|
|
18652
|
-
var columnFixedStorage = getCustomStorageMap(fixedStorageKey)[id];
|
|
18653
|
-
if (columnFixedStorage) {
|
|
18654
|
-
var colFixeds = columnFixedStorage.split(',');
|
|
18655
|
-
colFixeds.forEach(function (fixConf) {
|
|
18656
|
-
var _fixConf$split = fixConf.split('|'),
|
|
18657
|
-
_fixConf$split2 = _slicedToArray(_fixConf$split, 2),
|
|
18658
|
-
field = _fixConf$split2[0],
|
|
18659
|
-
fixed = _fixConf$split2[1];
|
|
18660
|
-
if (customMap[field]) {
|
|
18661
|
-
customMap[field].fixed = fixed;
|
|
18662
|
-
} else {
|
|
18663
|
-
customMap[field] = {
|
|
18664
|
-
field: field,
|
|
18665
|
-
fixed: fixed
|
|
18666
|
-
};
|
|
18667
|
-
}
|
|
18668
|
-
});
|
|
18669
|
-
}
|
|
18670
|
-
}
|
|
18671
|
-
// 自定义顺序
|
|
18672
|
-
var hasCustomSort = false;
|
|
18673
|
-
if (isCustomSort) {
|
|
18674
|
-
var columnSortStorage = getCustomStorageMap(sortStorageKey)[id];
|
|
18675
|
-
if (columnSortStorage) {
|
|
18676
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(columnSortStorage, function (renderSortNumber, colKey) {
|
|
18677
|
-
if (customMap[colKey]) {
|
|
18678
|
-
customMap[colKey].renderSortNumber = renderSortNumber;
|
|
18679
|
-
} else {
|
|
18680
|
-
customMap[colKey] = {
|
|
18681
|
-
renderSortNumber: renderSortNumber
|
|
18682
|
-
};
|
|
18683
|
-
}
|
|
18684
|
-
if (!hasCustomSort) {
|
|
18685
|
-
hasCustomSort = true;
|
|
18686
|
-
}
|
|
18687
|
-
});
|
|
18565
|
+
handleCustomRestore: function handleCustomRestore(storeData) {
|
|
18566
|
+
var tableFullColumn = this.tableFullColumn;
|
|
18567
|
+
var collectColumn = this.collectColumn;
|
|
18568
|
+
var resizableData = storeData.resizableData,
|
|
18569
|
+
sortData = storeData.sortData,
|
|
18570
|
+
visibleData = storeData.visibleData,
|
|
18571
|
+
fixedData = storeData.fixedData;
|
|
18572
|
+
var hasCustomSort = false;
|
|
18573
|
+
// 处理还原
|
|
18574
|
+
if (resizableData || sortData || visibleData || fixedData) {
|
|
18575
|
+
tableFullColumn.forEach(function (column) {
|
|
18576
|
+
var colKey = column.getKey();
|
|
18577
|
+
if (resizableData && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(resizableData[colKey])) {
|
|
18578
|
+
column.resizeWidth = resizableData[colKey];
|
|
18688
18579
|
}
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
var columnVisibleStorage = getCustomStorageMap(visibleStorageKey)[id];
|
|
18692
|
-
if (columnVisibleStorage) {
|
|
18693
|
-
var colVisibles = columnVisibleStorage.split('|');
|
|
18694
|
-
var colHides = colVisibles[0] ? colVisibles[0].split(',') : [];
|
|
18695
|
-
var colShows = colVisibles[1] ? colVisibles[1].split(',') : [];
|
|
18696
|
-
colHides.forEach(function (field) {
|
|
18697
|
-
if (customMap[field]) {
|
|
18698
|
-
customMap[field].visible = false;
|
|
18699
|
-
} else {
|
|
18700
|
-
customMap[field] = {
|
|
18701
|
-
field: field,
|
|
18702
|
-
visible: false
|
|
18703
|
-
};
|
|
18704
|
-
}
|
|
18705
|
-
});
|
|
18706
|
-
colShows.forEach(function (field) {
|
|
18707
|
-
if (customMap[field]) {
|
|
18708
|
-
customMap[field].visible = true;
|
|
18709
|
-
} else {
|
|
18710
|
-
customMap[field] = {
|
|
18711
|
-
field: field,
|
|
18712
|
-
visible: true
|
|
18713
|
-
};
|
|
18714
|
-
}
|
|
18715
|
-
});
|
|
18580
|
+
if (visibleData && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(visibleData[colKey])) {
|
|
18581
|
+
column.visible = visibleData[colKey];
|
|
18716
18582
|
}
|
|
18717
|
-
|
|
18718
|
-
|
|
18719
|
-
var keyMap = {};
|
|
18720
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, function (column) {
|
|
18721
|
-
var colKey = column.getKey();
|
|
18722
|
-
if (colKey) {
|
|
18723
|
-
keyMap[colKey] = column;
|
|
18583
|
+
if (fixedData && fixedData[colKey]) {
|
|
18584
|
+
column.fixed = fixedData[colKey];
|
|
18724
18585
|
}
|
|
18725
|
-
|
|
18726
|
-
|
|
18727
|
-
|
|
18728
|
-
resizeWidth = _ref5.resizeWidth,
|
|
18729
|
-
fixed = _ref5.fixed,
|
|
18730
|
-
renderSortNumber = _ref5.renderSortNumber;
|
|
18731
|
-
var column = keyMap[field];
|
|
18732
|
-
if (column) {
|
|
18733
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(resizeWidth)) {
|
|
18734
|
-
column.resizeWidth = resizeWidth;
|
|
18735
|
-
}
|
|
18736
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(visible)) {
|
|
18737
|
-
column.visible = visible;
|
|
18738
|
-
}
|
|
18739
|
-
if (fixed) {
|
|
18740
|
-
column.fixed = fixed;
|
|
18741
|
-
}
|
|
18742
|
-
if (renderSortNumber) {
|
|
18743
|
-
column.renderSortNumber = Number(renderSortNumber);
|
|
18744
|
-
}
|
|
18586
|
+
if (sortData && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(sortData[colKey])) {
|
|
18587
|
+
hasCustomSort = true;
|
|
18588
|
+
column.renderSortNumber = sortData[colKey];
|
|
18745
18589
|
}
|
|
18746
18590
|
});
|
|
18747
18591
|
// 如果自定义了顺序
|
|
@@ -18752,98 +18596,76 @@ var Methods = {
|
|
|
18752
18596
|
}
|
|
18753
18597
|
}
|
|
18754
18598
|
},
|
|
18755
|
-
|
|
18599
|
+
/**
|
|
18600
|
+
* 还原自定义列操作状态
|
|
18601
|
+
*/
|
|
18602
|
+
restoreCustomStorage: function restoreCustomStorage() {
|
|
18603
|
+
var _this21 = this;
|
|
18756
18604
|
var id = this.id,
|
|
18757
|
-
collectColumn = this.collectColumn,
|
|
18758
18605
|
customConfig = this.customConfig,
|
|
18759
18606
|
customOpts = this.customOpts;
|
|
18760
|
-
var storage = customOpts.storage
|
|
18761
|
-
|
|
18762
|
-
var
|
|
18763
|
-
var
|
|
18764
|
-
|
|
18765
|
-
|
|
18766
|
-
|
|
18607
|
+
var storage = customOpts.storage,
|
|
18608
|
+
restoreStore = customOpts.restoreStore;
|
|
18609
|
+
var isAllCustom = storage === true;
|
|
18610
|
+
var storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
|
|
18611
|
+
var isCustomResizable = isAllCustom || storageOpts.resizable;
|
|
18612
|
+
var isCustomVisible = isAllCustom || storageOpts.visible;
|
|
18613
|
+
var isCustomFixed = isAllCustom || storageOpts.fixed;
|
|
18614
|
+
var isCustomSort = isAllCustom || storageOpts.sort;
|
|
18615
|
+
if (customConfig && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
|
|
18767
18616
|
if (!id) {
|
|
18768
18617
|
errLog('vxe.error.reqProp', ['id']);
|
|
18769
18618
|
return;
|
|
18770
18619
|
}
|
|
18771
|
-
|
|
18772
|
-
|
|
18773
|
-
|
|
18774
|
-
|
|
18775
|
-
|
|
18620
|
+
var storeData = getCustomStorageMap(id);
|
|
18621
|
+
if (restoreStore) {
|
|
18622
|
+
return Promise.resolve(restoreStore({
|
|
18623
|
+
id: id,
|
|
18624
|
+
type: 'restore',
|
|
18625
|
+
storeData: storeData
|
|
18626
|
+
})).then(function (storeData) {
|
|
18627
|
+
if (!storeData) {
|
|
18628
|
+
return;
|
|
18776
18629
|
}
|
|
18777
|
-
|
|
18778
|
-
|
|
18779
|
-
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
saveCustomVisible: function saveCustomVisible() {
|
|
18784
|
-
var id = this.id,
|
|
18785
|
-
collectColumn = this.collectColumn,
|
|
18786
|
-
customConfig = this.customConfig,
|
|
18787
|
-
customOpts = this.customOpts;
|
|
18788
|
-
var checkMethod = customOpts.checkMethod,
|
|
18789
|
-
storage = customOpts.storage;
|
|
18790
|
-
var isAllStorage = storage === true;
|
|
18791
|
-
var storageOpts = isAllStorage ? {} : Object.assign({}, storage || {});
|
|
18792
|
-
var isCustomVisible = isAllStorage || storageOpts.visible;
|
|
18793
|
-
if (customConfig && isCustomVisible) {
|
|
18794
|
-
var columnVisibleStorageMap = getCustomStorageMap(visibleStorageKey);
|
|
18795
|
-
var colHides = [];
|
|
18796
|
-
var colShows = [];
|
|
18797
|
-
if (!id) {
|
|
18798
|
-
errLog('vxe.error.reqProp', ['id']);
|
|
18799
|
-
return;
|
|
18630
|
+
return _this21.handleCustomRestore(storeData);
|
|
18631
|
+
}).catch(function (e) {
|
|
18632
|
+
return e;
|
|
18633
|
+
});
|
|
18634
|
+
} else {
|
|
18635
|
+
return this.handleCustomRestore(storeData);
|
|
18800
18636
|
}
|
|
18801
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, function (column) {
|
|
18802
|
-
if (!checkMethod || checkMethod({
|
|
18803
|
-
column: column
|
|
18804
|
-
})) {
|
|
18805
|
-
if (!column.visible && column.defaultVisible) {
|
|
18806
|
-
var colKey = column.getKey();
|
|
18807
|
-
if (colKey) {
|
|
18808
|
-
colHides.push(colKey);
|
|
18809
|
-
}
|
|
18810
|
-
} else if (column.visible && !column.defaultVisible) {
|
|
18811
|
-
var _colKey = column.getKey();
|
|
18812
|
-
if (_colKey) {
|
|
18813
|
-
colShows.push(_colKey);
|
|
18814
|
-
}
|
|
18815
|
-
}
|
|
18816
|
-
}
|
|
18817
|
-
});
|
|
18818
|
-
columnVisibleStorageMap[id] = [colHides.join(',')].concat(colShows.length ? [colShows.join(',')] : []).join('|') || undefined;
|
|
18819
|
-
localStorage.setItem(visibleStorageKey, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toJSONString(columnVisibleStorageMap));
|
|
18820
18637
|
}
|
|
18821
18638
|
},
|
|
18822
18639
|
getCustomStoreData: function getCustomStoreData() {
|
|
18823
18640
|
var id = this.id,
|
|
18824
|
-
|
|
18825
|
-
|
|
18641
|
+
customOpts = this.customOpts,
|
|
18642
|
+
collectColumn = this.collectColumn;
|
|
18826
18643
|
var checkMethod = customOpts.checkMethod;
|
|
18827
18644
|
var resizableData = {};
|
|
18828
18645
|
var sortData = {};
|
|
18829
18646
|
var visibleData = {};
|
|
18830
18647
|
var fixedData = {};
|
|
18831
18648
|
var storeData = {
|
|
18832
|
-
resizableData:
|
|
18833
|
-
sortData:
|
|
18834
|
-
visibleData:
|
|
18835
|
-
fixedData:
|
|
18649
|
+
resizableData: undefined,
|
|
18650
|
+
sortData: undefined,
|
|
18651
|
+
visibleData: undefined,
|
|
18652
|
+
fixedData: undefined
|
|
18836
18653
|
};
|
|
18837
18654
|
if (!id) {
|
|
18838
18655
|
errLog('vxe.error.reqProp', ['id']);
|
|
18839
18656
|
return storeData;
|
|
18840
18657
|
}
|
|
18658
|
+
var hasResizable = 0;
|
|
18659
|
+
var hasSort = 0;
|
|
18660
|
+
var hasFixedt = 0;
|
|
18661
|
+
var hasVisible = 0;
|
|
18841
18662
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, function (column, index, items, path, parent) {
|
|
18842
18663
|
// 排序只支持一级
|
|
18843
18664
|
if (!parent) {
|
|
18844
18665
|
collectColumn.forEach(function (column) {
|
|
18845
18666
|
var colKey = column.getKey();
|
|
18846
18667
|
if (colKey) {
|
|
18668
|
+
hasSort = 1;
|
|
18847
18669
|
sortData[colKey] = column.renderSortNumber;
|
|
18848
18670
|
}
|
|
18849
18671
|
});
|
|
@@ -18851,99 +18673,82 @@ var Methods = {
|
|
|
18851
18673
|
if (column.resizeWidth) {
|
|
18852
18674
|
var colKey = column.getKey();
|
|
18853
18675
|
if (colKey) {
|
|
18676
|
+
hasResizable = 1;
|
|
18854
18677
|
resizableData[colKey] = column.renderWidth;
|
|
18855
18678
|
}
|
|
18856
18679
|
}
|
|
18857
18680
|
if (column.fixed && column.fixed !== column.defaultFixed) {
|
|
18858
|
-
var
|
|
18859
|
-
if (
|
|
18860
|
-
|
|
18681
|
+
var _colKey = column.getKey();
|
|
18682
|
+
if (_colKey) {
|
|
18683
|
+
hasFixedt = 1;
|
|
18684
|
+
fixedData[_colKey] = column.fixed;
|
|
18861
18685
|
}
|
|
18862
18686
|
}
|
|
18863
18687
|
if (!checkMethod || checkMethod({
|
|
18864
18688
|
column: column
|
|
18865
18689
|
})) {
|
|
18866
18690
|
if (!column.visible && column.defaultVisible) {
|
|
18867
|
-
var
|
|
18868
|
-
if (
|
|
18869
|
-
|
|
18691
|
+
var _colKey2 = column.getKey();
|
|
18692
|
+
if (_colKey2) {
|
|
18693
|
+
hasVisible = 1;
|
|
18694
|
+
visibleData[_colKey2] = false;
|
|
18870
18695
|
}
|
|
18871
18696
|
} else if (column.visible && !column.defaultVisible) {
|
|
18872
|
-
var
|
|
18873
|
-
if (
|
|
18874
|
-
|
|
18697
|
+
var _colKey3 = column.getKey();
|
|
18698
|
+
if (_colKey3) {
|
|
18699
|
+
hasVisible = 1;
|
|
18700
|
+
visibleData[_colKey3] = true;
|
|
18875
18701
|
}
|
|
18876
18702
|
}
|
|
18877
18703
|
}
|
|
18878
18704
|
});
|
|
18879
|
-
|
|
18880
|
-
|
|
18881
|
-
|
|
18882
|
-
|
|
18883
|
-
|
|
18884
|
-
|
|
18885
|
-
|
|
18886
|
-
|
|
18887
|
-
saveCustomResizable: function saveCustomResizable(isReset) {
|
|
18888
|
-
var id = this.id,
|
|
18889
|
-
collectColumn = this.collectColumn,
|
|
18890
|
-
customConfig = this.customConfig,
|
|
18891
|
-
customOpts = this.customOpts;
|
|
18892
|
-
var storage = customOpts.storage;
|
|
18893
|
-
var isAllStorage = storage === true;
|
|
18894
|
-
var storageOpts = isAllStorage ? {} : Object.assign({}, storage || {});
|
|
18895
|
-
var isResizable = isAllStorage || storageOpts.resizable;
|
|
18896
|
-
if (customConfig && isResizable) {
|
|
18897
|
-
var columnWidthStorageMap = getCustomStorageMap(resizableStorageKey);
|
|
18898
|
-
var columnWidthStorage;
|
|
18899
|
-
if (!id) {
|
|
18900
|
-
errLog('vxe.error.reqProp', ['id']);
|
|
18901
|
-
return;
|
|
18902
|
-
}
|
|
18903
|
-
if (!isReset) {
|
|
18904
|
-
columnWidthStorage = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isPlainObject(columnWidthStorageMap[id]) ? columnWidthStorageMap[id] : {};
|
|
18905
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, function (column) {
|
|
18906
|
-
if (column.resizeWidth) {
|
|
18907
|
-
var colKey = column.getKey();
|
|
18908
|
-
if (colKey) {
|
|
18909
|
-
columnWidthStorage[colKey] = column.renderWidth;
|
|
18910
|
-
}
|
|
18911
|
-
}
|
|
18912
|
-
});
|
|
18913
|
-
}
|
|
18914
|
-
columnWidthStorageMap[id] = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEmpty(columnWidthStorage) ? undefined : columnWidthStorage;
|
|
18915
|
-
localStorage.setItem(resizableStorageKey, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toJSONString(columnWidthStorageMap));
|
|
18705
|
+
if (hasResizable) {
|
|
18706
|
+
storeData.resizableData = resizableData;
|
|
18707
|
+
}
|
|
18708
|
+
if (hasSort) {
|
|
18709
|
+
storeData.sortData = sortData;
|
|
18710
|
+
}
|
|
18711
|
+
if (hasFixedt) {
|
|
18712
|
+
storeData.fixedData = fixedData;
|
|
18916
18713
|
}
|
|
18714
|
+
if (hasVisible) {
|
|
18715
|
+
storeData.visibleData = visibleData;
|
|
18716
|
+
}
|
|
18717
|
+
return storeData;
|
|
18917
18718
|
},
|
|
18918
|
-
|
|
18719
|
+
saveCustomStore: function saveCustomStore(type) {
|
|
18919
18720
|
var id = this.id,
|
|
18920
|
-
collectColumn = this.collectColumn,
|
|
18921
|
-
customConfig = this.customConfig,
|
|
18922
18721
|
customOpts = this.customOpts;
|
|
18923
|
-
var
|
|
18924
|
-
|
|
18925
|
-
var
|
|
18926
|
-
var
|
|
18927
|
-
|
|
18928
|
-
|
|
18929
|
-
|
|
18722
|
+
var updateStore = customOpts.updateStore,
|
|
18723
|
+
storage = customOpts.storage;
|
|
18724
|
+
var isAllCustom = storage === true;
|
|
18725
|
+
var storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
|
|
18726
|
+
var isCustomResizable = isAllCustom || storageOpts.resizable;
|
|
18727
|
+
var isCustomVisible = isAllCustom || storageOpts.visible;
|
|
18728
|
+
var isCustomFixed = isAllCustom || storageOpts.fixed;
|
|
18729
|
+
var isCustomSort = isAllCustom || storageOpts.sort;
|
|
18730
|
+
if (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort) {
|
|
18930
18731
|
if (!id) {
|
|
18931
18732
|
errLog('vxe.error.reqProp', ['id']);
|
|
18932
|
-
return;
|
|
18733
|
+
return this.$nextTick();
|
|
18933
18734
|
}
|
|
18934
|
-
|
|
18935
|
-
|
|
18936
|
-
|
|
18937
|
-
|
|
18938
|
-
|
|
18939
|
-
|
|
18940
|
-
|
|
18941
|
-
|
|
18735
|
+
var storeData = type === 'reset' ? {
|
|
18736
|
+
resizableData: {},
|
|
18737
|
+
sortData: {},
|
|
18738
|
+
visibleData: {},
|
|
18739
|
+
fixedData: {}
|
|
18740
|
+
} : this.getCustomStoreData();
|
|
18741
|
+
if (updateStore) {
|
|
18742
|
+
return updateStore({
|
|
18743
|
+
id: id,
|
|
18744
|
+
type: type,
|
|
18745
|
+
storeData: storeData
|
|
18942
18746
|
});
|
|
18747
|
+
} else {
|
|
18748
|
+
setCustomStorageMap(id, type === 'reset' ? null : storeData);
|
|
18943
18749
|
}
|
|
18944
|
-
columnSortStorageMap[id] = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEmpty(columnWidthStorage) ? undefined : columnWidthStorage;
|
|
18945
|
-
localStorage.setItem(sortStorageKey, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toJSONString(columnSortStorageMap));
|
|
18946
18750
|
}
|
|
18751
|
+
return this.$nextTick();
|
|
18947
18752
|
},
|
|
18948
18753
|
handleUpdateDataQueue: function handleUpdateDataQueue() {
|
|
18949
18754
|
this.upDataFlag++;
|
|
@@ -18955,7 +18760,7 @@ var Methods = {
|
|
|
18955
18760
|
* 刷新列配置
|
|
18956
18761
|
*/
|
|
18957
18762
|
refreshColumn: function refreshColumn(resiveOrder) {
|
|
18958
|
-
var
|
|
18763
|
+
var _this22 = this;
|
|
18959
18764
|
if (resiveOrder) {
|
|
18960
18765
|
var columnList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(this.collectColumn, 'renderSortNumber');
|
|
18961
18766
|
this.collectColumn = columnList;
|
|
@@ -18964,9 +18769,9 @@ var Methods = {
|
|
|
18964
18769
|
this.cacheColumnMap();
|
|
18965
18770
|
}
|
|
18966
18771
|
return this.parseColumns().then(function () {
|
|
18967
|
-
return
|
|
18772
|
+
return _this22.refreshScroll();
|
|
18968
18773
|
}).then(function () {
|
|
18969
|
-
return
|
|
18774
|
+
return _this22.recalculate();
|
|
18970
18775
|
});
|
|
18971
18776
|
},
|
|
18972
18777
|
/**
|
|
@@ -18974,7 +18779,7 @@ var Methods = {
|
|
|
18974
18779
|
* 将固定的列左边、右边分别靠边
|
|
18975
18780
|
*/
|
|
18976
18781
|
parseColumns: function parseColumns() {
|
|
18977
|
-
var
|
|
18782
|
+
var _this23 = this;
|
|
18978
18783
|
var leftList = [];
|
|
18979
18784
|
var centerList = [];
|
|
18980
18785
|
var rightList = [];
|
|
@@ -19067,10 +18872,10 @@ var Methods = {
|
|
|
19067
18872
|
this.visibleColumn = visibleColumn;
|
|
19068
18873
|
this.handleTableColumn();
|
|
19069
18874
|
return this.updateFooter().then(function () {
|
|
19070
|
-
return
|
|
18875
|
+
return _this23.recalculate();
|
|
19071
18876
|
}).then(function () {
|
|
19072
|
-
|
|
19073
|
-
return
|
|
18877
|
+
_this23.updateCellAreas();
|
|
18878
|
+
return _this23.recalculate();
|
|
19074
18879
|
});
|
|
19075
18880
|
},
|
|
19076
18881
|
/**
|
|
@@ -19122,7 +18927,7 @@ var Methods = {
|
|
|
19122
18927
|
* 刷新滚动操作,手动同步滚动相关位置(对于某些特殊的操作,比如滚动条错位、固定列不同步)
|
|
19123
18928
|
*/
|
|
19124
18929
|
refreshScroll: function refreshScroll() {
|
|
19125
|
-
var
|
|
18930
|
+
var _this24 = this;
|
|
19126
18931
|
var lastScrollLeft = this.lastScrollLeft,
|
|
19127
18932
|
lastScrollTop = this.lastScrollTop;
|
|
19128
18933
|
var $refs = this.$refs;
|
|
@@ -19137,7 +18942,7 @@ var Methods = {
|
|
|
19137
18942
|
return new Promise(function (resolve) {
|
|
19138
18943
|
// 还原滚动条位置
|
|
19139
18944
|
if (lastScrollLeft || lastScrollTop) {
|
|
19140
|
-
return restoreScrollLocation(
|
|
18945
|
+
return restoreScrollLocation(_this24, lastScrollLeft, lastScrollTop).then(function () {
|
|
19141
18946
|
// 存在滚动行为未结束情况
|
|
19142
18947
|
setTimeout(resolve, 30);
|
|
19143
18948
|
});
|
|
@@ -19156,7 +18961,7 @@ var Methods = {
|
|
|
19156
18961
|
* 支持 width=? width=?px width=?% min-width=? min-width=?px min-width=?%
|
|
19157
18962
|
*/
|
|
19158
18963
|
recalculate: function recalculate(refull) {
|
|
19159
|
-
var
|
|
18964
|
+
var _this25 = this;
|
|
19160
18965
|
var $refs = this.$refs;
|
|
19161
18966
|
var tableBody = $refs.tableBody,
|
|
19162
18967
|
tableHeader = $refs.tableHeader,
|
|
@@ -19169,8 +18974,8 @@ var Methods = {
|
|
|
19169
18974
|
if (refull === true) {
|
|
19170
18975
|
// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
|
|
19171
18976
|
return this.computeScrollLoad().then(function () {
|
|
19172
|
-
|
|
19173
|
-
return
|
|
18977
|
+
_this25.autoCellWidth(headerElem, bodyElem, footerElem);
|
|
18978
|
+
return _this25.computeScrollLoad();
|
|
19174
18979
|
});
|
|
19175
18980
|
}
|
|
19176
18981
|
}
|
|
@@ -19305,7 +19110,7 @@ var Methods = {
|
|
|
19305
19110
|
this.customMaxHeight = calcHeight(this, 'maxHeight');
|
|
19306
19111
|
},
|
|
19307
19112
|
updateStyle: function updateStyle() {
|
|
19308
|
-
var
|
|
19113
|
+
var _this26 = this;
|
|
19309
19114
|
var $refs = this.$refs,
|
|
19310
19115
|
isGroup = this.isGroup,
|
|
19311
19116
|
fullColumnIdData = this.fullColumnIdData,
|
|
@@ -19394,7 +19199,7 @@ var Methods = {
|
|
|
19394
19199
|
var listElem = elemStore["".concat(name, "-").concat(layout, "-list")];
|
|
19395
19200
|
if (isGroup && listElem) {
|
|
19396
19201
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(listElem.querySelectorAll('.col--group'), function (thElem) {
|
|
19397
|
-
var colNode =
|
|
19202
|
+
var colNode = _this26.getColumnNode(thElem);
|
|
19398
19203
|
if (colNode) {
|
|
19399
19204
|
var column = colNode.item;
|
|
19400
19205
|
var showHeaderOverflow = column.showHeaderOverflow;
|
|
@@ -19465,7 +19270,7 @@ var Methods = {
|
|
|
19465
19270
|
// 如果是使用优化模式
|
|
19466
19271
|
if (fixedType) {
|
|
19467
19272
|
// 如果存在展开行使用全量渲染
|
|
19468
|
-
if (!
|
|
19273
|
+
if (!_this26.expandColumn && (scrollXLoad || scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow))) {
|
|
19469
19274
|
if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
|
|
19470
19275
|
_renderColumnList = fixedColumn;
|
|
19471
19276
|
} else {
|
|
@@ -19493,7 +19298,7 @@ var Methods = {
|
|
|
19493
19298
|
// 如果是使用优化模式
|
|
19494
19299
|
if (fixedType) {
|
|
19495
19300
|
// 如果存在展开行使用全量渲染
|
|
19496
|
-
if (!
|
|
19301
|
+
if (!_this26.expandColumn && (scrollXLoad || allColumnFooterOverflow)) {
|
|
19497
19302
|
if (!mergeFooterList.length || !footerSpanMethod) {
|
|
19498
19303
|
_renderColumnList2 = fixedColumn;
|
|
19499
19304
|
} else {
|
|
@@ -19560,9 +19365,9 @@ var Methods = {
|
|
|
19560
19365
|
var colWidth = column.renderWidth;
|
|
19561
19366
|
if (cellElem) {
|
|
19562
19367
|
if (colspan > 1) {
|
|
19563
|
-
var columnIndex =
|
|
19368
|
+
var columnIndex = _this26.getColumnIndex(column);
|
|
19564
19369
|
for (var _index = 1; _index < colspan; _index++) {
|
|
19565
|
-
var nextColumn =
|
|
19370
|
+
var nextColumn = _this26.getColumns(columnIndex + _index);
|
|
19566
19371
|
if (nextColumn) {
|
|
19567
19372
|
colWidth += nextColumn.renderWidth;
|
|
19568
19373
|
}
|
|
@@ -19604,7 +19409,7 @@ var Methods = {
|
|
|
19604
19409
|
}
|
|
19605
19410
|
},
|
|
19606
19411
|
preventEvent: function preventEvent(evnt, type, args, next, end) {
|
|
19607
|
-
var
|
|
19412
|
+
var _this27 = this;
|
|
19608
19413
|
var evntList = v_x_e_table.interceptor.get(type);
|
|
19609
19414
|
|
|
19610
19415
|
// 兼容老版本
|
|
@@ -19617,8 +19422,8 @@ var Methods = {
|
|
|
19617
19422
|
var rest;
|
|
19618
19423
|
if (!evntList.some(function (func) {
|
|
19619
19424
|
return func(Object.assign({
|
|
19620
|
-
$grid:
|
|
19621
|
-
$table:
|
|
19425
|
+
$grid: _this27.$xegrid,
|
|
19426
|
+
$table: _this27,
|
|
19622
19427
|
$event: evnt
|
|
19623
19428
|
}, args)) === false;
|
|
19624
19429
|
})) {
|
|
@@ -19635,7 +19440,7 @@ var Methods = {
|
|
|
19635
19440
|
* 全局按下事件处理
|
|
19636
19441
|
*/
|
|
19637
19442
|
handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
|
|
19638
|
-
var
|
|
19443
|
+
var _this28 = this;
|
|
19639
19444
|
var $el = this.$el,
|
|
19640
19445
|
$refs = this.$refs,
|
|
19641
19446
|
$xegrid = this.$xegrid,
|
|
@@ -19676,7 +19481,7 @@ var Methods = {
|
|
|
19676
19481
|
} else {
|
|
19677
19482
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
19678
19483
|
this.preventEvent(evnt, 'event.clearCustom', {}, function () {
|
|
19679
|
-
return
|
|
19484
|
+
return _this28.closeCustom();
|
|
19680
19485
|
});
|
|
19681
19486
|
}
|
|
19682
19487
|
}
|
|
@@ -19712,7 +19517,7 @@ var Methods = {
|
|
|
19712
19517
|
isClear = getEventTargetNode(evnt, $el, 'vxe-footer--row').flag;
|
|
19713
19518
|
}
|
|
19714
19519
|
// 如果固定了高度且点击了行之外的空白处,则清除激活状态
|
|
19715
|
-
if (!isClear &&
|
|
19520
|
+
if (!isClear && _this28.height && !_this28.overflowY) {
|
|
19716
19521
|
var bodyWrapperElem = evnt.target;
|
|
19717
19522
|
if (methods_hasClass(bodyWrapperElem, 'vxe-table--body-wrapper')) {
|
|
19718
19523
|
isClear = evnt.offsetY < bodyWrapperElem.clientHeight;
|
|
@@ -19722,7 +19527,7 @@ var Methods = {
|
|
|
19722
19527
|
// 如果点击了当前表格之外
|
|
19723
19528
|
!getEventTargetNode(evnt, $el).flag) {
|
|
19724
19529
|
setTimeout(function () {
|
|
19725
|
-
return
|
|
19530
|
+
return _this28.clearEdit(evnt);
|
|
19726
19531
|
});
|
|
19727
19532
|
}
|
|
19728
19533
|
});
|
|
@@ -19736,10 +19541,14 @@ var Methods = {
|
|
|
19736
19541
|
this.clearSelected();
|
|
19737
19542
|
}
|
|
19738
19543
|
if (areaOpts.autoClear) {
|
|
19739
|
-
|
|
19544
|
+
var cellAreas = this.getCellAreas();
|
|
19545
|
+
if (cellAreas.length && !getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
|
|
19740
19546
|
this.preventEvent(evnt, 'event.clearAreas', {}, function () {
|
|
19741
|
-
|
|
19742
|
-
|
|
19547
|
+
_this28.clearCellAreas();
|
|
19548
|
+
_this28.clearCopyCellArea();
|
|
19549
|
+
_this28.emitEvent('clear-cell-area-selection', {
|
|
19550
|
+
cellAreas: cellAreas
|
|
19551
|
+
}, evnt);
|
|
19743
19552
|
});
|
|
19744
19553
|
}
|
|
19745
19554
|
}
|
|
@@ -19775,7 +19584,7 @@ var Methods = {
|
|
|
19775
19584
|
* 表格键盘事件
|
|
19776
19585
|
*/
|
|
19777
19586
|
keydownEvent: function keydownEvent(evnt) {
|
|
19778
|
-
var
|
|
19587
|
+
var _this29 = this;
|
|
19779
19588
|
var filterStore = this.filterStore,
|
|
19780
19589
|
ctxMenuStore = this.ctxMenuStore,
|
|
19781
19590
|
editStore = this.editStore,
|
|
@@ -19788,30 +19597,30 @@ var Methods = {
|
|
|
19788
19597
|
var isEsc = keyCode === 27;
|
|
19789
19598
|
if (isEsc) {
|
|
19790
19599
|
this.preventEvent(evnt, 'event.keydown', null, function () {
|
|
19791
|
-
|
|
19792
|
-
if (keyboardConfig && mouseConfig && mouseOpts.area &&
|
|
19793
|
-
|
|
19600
|
+
_this29.emitEvent('keydown-start', {}, evnt);
|
|
19601
|
+
if (keyboardConfig && mouseConfig && mouseOpts.area && _this29.handleKeyboardEvent) {
|
|
19602
|
+
_this29.handleKeyboardEvent(evnt);
|
|
19794
19603
|
} else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
|
|
19795
19604
|
evnt.stopPropagation();
|
|
19796
19605
|
// 如果按下了 Esc 键,关闭快捷菜单、筛选
|
|
19797
|
-
|
|
19798
|
-
|
|
19606
|
+
_this29.closeFilter();
|
|
19607
|
+
_this29.closeMenu();
|
|
19799
19608
|
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
19800
19609
|
// 如果是激活编辑状态,则取消编辑
|
|
19801
19610
|
if (actived.row) {
|
|
19802
19611
|
var params = actived.args;
|
|
19803
|
-
|
|
19612
|
+
_this29.clearEdit(evnt);
|
|
19804
19613
|
// 如果配置了选中功能,则为选中状态
|
|
19805
19614
|
if (mouseConfig && mouseOpts.selected) {
|
|
19806
|
-
|
|
19807
|
-
return
|
|
19615
|
+
_this29.$nextTick(function () {
|
|
19616
|
+
return _this29.handleSelected(params, evnt);
|
|
19808
19617
|
});
|
|
19809
19618
|
}
|
|
19810
19619
|
}
|
|
19811
19620
|
}
|
|
19812
19621
|
}
|
|
19813
|
-
|
|
19814
|
-
|
|
19622
|
+
_this29.emitEvent('keydown', {}, evnt);
|
|
19623
|
+
_this29.emitEvent('keydown-end', {}, evnt);
|
|
19815
19624
|
});
|
|
19816
19625
|
}
|
|
19817
19626
|
},
|
|
@@ -19819,26 +19628,26 @@ var Methods = {
|
|
|
19819
19628
|
* 全局键盘事件
|
|
19820
19629
|
*/
|
|
19821
19630
|
handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
|
|
19822
|
-
var
|
|
19631
|
+
var _this30 = this;
|
|
19823
19632
|
// 该行为只对当前激活的表格有效
|
|
19824
19633
|
if (this.isActivated) {
|
|
19825
19634
|
this.preventEvent(evnt, 'event.keydown', null, function () {
|
|
19826
|
-
var filterStore =
|
|
19827
|
-
isCtxMenu =
|
|
19828
|
-
ctxMenuStore =
|
|
19829
|
-
editStore =
|
|
19830
|
-
editOpts =
|
|
19831
|
-
editConfig =
|
|
19832
|
-
mouseConfig =
|
|
19833
|
-
mouseOpts =
|
|
19834
|
-
keyboardConfig =
|
|
19835
|
-
keyboardOpts =
|
|
19836
|
-
treeConfig =
|
|
19837
|
-
treeOpts =
|
|
19838
|
-
highlightCurrentRow =
|
|
19839
|
-
currentRow =
|
|
19840
|
-
bodyCtxMenu =
|
|
19841
|
-
rowOpts =
|
|
19635
|
+
var filterStore = _this30.filterStore,
|
|
19636
|
+
isCtxMenu = _this30.isCtxMenu,
|
|
19637
|
+
ctxMenuStore = _this30.ctxMenuStore,
|
|
19638
|
+
editStore = _this30.editStore,
|
|
19639
|
+
editOpts = _this30.editOpts,
|
|
19640
|
+
editConfig = _this30.editConfig,
|
|
19641
|
+
mouseConfig = _this30.mouseConfig,
|
|
19642
|
+
mouseOpts = _this30.mouseOpts,
|
|
19643
|
+
keyboardConfig = _this30.keyboardConfig,
|
|
19644
|
+
keyboardOpts = _this30.keyboardOpts,
|
|
19645
|
+
treeConfig = _this30.treeConfig,
|
|
19646
|
+
treeOpts = _this30.treeOpts,
|
|
19647
|
+
highlightCurrentRow = _this30.highlightCurrentRow,
|
|
19648
|
+
currentRow = _this30.currentRow,
|
|
19649
|
+
bodyCtxMenu = _this30.bodyCtxMenu,
|
|
19650
|
+
rowOpts = _this30.rowOpts;
|
|
19842
19651
|
var selected = editStore.selected,
|
|
19843
19652
|
actived = editStore.actived;
|
|
19844
19653
|
var keyCode = evnt.keyCode;
|
|
@@ -19865,7 +19674,7 @@ var Methods = {
|
|
|
19865
19674
|
var params;
|
|
19866
19675
|
if (filterStore.visible) {
|
|
19867
19676
|
if (isEsc) {
|
|
19868
|
-
|
|
19677
|
+
_this30.closeFilter();
|
|
19869
19678
|
}
|
|
19870
19679
|
return;
|
|
19871
19680
|
}
|
|
@@ -19873,19 +19682,19 @@ var Methods = {
|
|
|
19873
19682
|
// 如果配置了右键菜单; 支持方向键操作、回车
|
|
19874
19683
|
evnt.preventDefault();
|
|
19875
19684
|
if (ctxMenuStore.showChild && hasChildrenList(ctxMenuStore.selected)) {
|
|
19876
|
-
|
|
19685
|
+
_this30.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
|
|
19877
19686
|
} else {
|
|
19878
|
-
|
|
19687
|
+
_this30.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this30.ctxMenuList);
|
|
19879
19688
|
}
|
|
19880
|
-
} else if (keyboardConfig && mouseConfig && mouseOpts.area &&
|
|
19881
|
-
|
|
19689
|
+
} else if (keyboardConfig && mouseConfig && mouseOpts.area && _this30.handleKeyboardEvent) {
|
|
19690
|
+
_this30.handleKeyboardEvent(evnt);
|
|
19882
19691
|
} else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selected.row && selected.column && (selected.column.type === 'checkbox' || selected.column.type === 'radio')) {
|
|
19883
19692
|
// 空格键支持选中复选框
|
|
19884
19693
|
evnt.preventDefault();
|
|
19885
19694
|
if (selected.column.type === 'checkbox') {
|
|
19886
|
-
|
|
19695
|
+
_this30.handleToggleCheckRowEvent(evnt, selected.args);
|
|
19887
19696
|
} else {
|
|
19888
|
-
|
|
19697
|
+
_this30.triggerRadioRowEvent(evnt, selected.args);
|
|
19889
19698
|
}
|
|
19890
19699
|
} else if (isF2 && isEnableConf(editConfig)) {
|
|
19891
19700
|
if (!isEditStatus) {
|
|
@@ -19893,15 +19702,15 @@ var Methods = {
|
|
|
19893
19702
|
if (selected.row && selected.column) {
|
|
19894
19703
|
evnt.stopPropagation();
|
|
19895
19704
|
evnt.preventDefault();
|
|
19896
|
-
|
|
19705
|
+
_this30.handleActived(selected.args, evnt);
|
|
19897
19706
|
}
|
|
19898
19707
|
}
|
|
19899
19708
|
} else if (isContextMenu) {
|
|
19900
19709
|
// 如果按下上下文键
|
|
19901
|
-
|
|
19902
|
-
clearTimeout(
|
|
19903
|
-
|
|
19904
|
-
|
|
19710
|
+
_this30._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
|
|
19711
|
+
clearTimeout(_this30.keyCtxTimeout);
|
|
19712
|
+
_this30.keyCtxTimeout = setTimeout(function () {
|
|
19713
|
+
_this30._keyCtx = false;
|
|
19905
19714
|
}, 1000);
|
|
19906
19715
|
} else if (isEnter && !hasAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow)) {
|
|
19907
19716
|
// 退出选中
|
|
@@ -19909,11 +19718,11 @@ var Methods = {
|
|
|
19909
19718
|
// 如果是激活编辑状态,则取消编辑
|
|
19910
19719
|
if (actived.row) {
|
|
19911
19720
|
params = actived.args;
|
|
19912
|
-
|
|
19721
|
+
_this30.clearEdit(evnt);
|
|
19913
19722
|
// 如果配置了选中功能,则为选中状态
|
|
19914
19723
|
if (mouseConfig && mouseOpts.selected) {
|
|
19915
|
-
|
|
19916
|
-
return
|
|
19724
|
+
_this30.$nextTick(function () {
|
|
19725
|
+
return _this30.handleSelected(params, evnt);
|
|
19917
19726
|
});
|
|
19918
19727
|
}
|
|
19919
19728
|
}
|
|
@@ -19923,15 +19732,15 @@ var Methods = {
|
|
|
19923
19732
|
var targetArgs = selected.row ? selected.args : actived.args;
|
|
19924
19733
|
if (hasShiftKey) {
|
|
19925
19734
|
if (keyboardOpts.enterToTab) {
|
|
19926
|
-
|
|
19735
|
+
_this30.moveTabSelected(targetArgs, hasShiftKey, evnt);
|
|
19927
19736
|
} else {
|
|
19928
|
-
|
|
19737
|
+
_this30.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
|
|
19929
19738
|
}
|
|
19930
19739
|
} else {
|
|
19931
19740
|
if (keyboardOpts.enterToTab) {
|
|
19932
|
-
|
|
19741
|
+
_this30.moveTabSelected(targetArgs, hasShiftKey, evnt);
|
|
19933
19742
|
} else {
|
|
19934
|
-
|
|
19743
|
+
_this30.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
|
|
19935
19744
|
}
|
|
19936
19745
|
}
|
|
19937
19746
|
} else if (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
@@ -19941,13 +19750,13 @@ var Methods = {
|
|
|
19941
19750
|
evnt.preventDefault();
|
|
19942
19751
|
var targetRow = childrens[0];
|
|
19943
19752
|
params = {
|
|
19944
|
-
$table:
|
|
19753
|
+
$table: _this30,
|
|
19945
19754
|
row: targetRow
|
|
19946
19755
|
};
|
|
19947
|
-
|
|
19948
|
-
return
|
|
19756
|
+
_this30.setTreeExpand(currentRow, true).then(function () {
|
|
19757
|
+
return _this30.scrollToRow(targetRow);
|
|
19949
19758
|
}).then(function () {
|
|
19950
|
-
return
|
|
19759
|
+
return _this30.triggerCurrentRowEvent(evnt, params);
|
|
19951
19760
|
});
|
|
19952
19761
|
}
|
|
19953
19762
|
}
|
|
@@ -19956,18 +19765,18 @@ var Methods = {
|
|
|
19956
19765
|
if (!isEditStatus) {
|
|
19957
19766
|
// 如果按下了方向键
|
|
19958
19767
|
if (selected.row && selected.column) {
|
|
19959
|
-
|
|
19768
|
+
_this30.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
|
|
19960
19769
|
} else if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
|
|
19961
19770
|
// 当前行按键上下移动
|
|
19962
|
-
|
|
19771
|
+
_this30.moveCurrentRow(isUpArrow, isDwArrow, evnt);
|
|
19963
19772
|
}
|
|
19964
19773
|
}
|
|
19965
19774
|
} else if (isTab && keyboardConfig && keyboardOpts.isTab) {
|
|
19966
19775
|
// 如果按下了 Tab 键切换
|
|
19967
19776
|
if (selected.row || selected.column) {
|
|
19968
|
-
|
|
19777
|
+
_this30.moveTabSelected(selected.args, hasShiftKey, evnt);
|
|
19969
19778
|
} else if (actived.row || actived.column) {
|
|
19970
|
-
|
|
19779
|
+
_this30.moveTabSelected(actived.args, hasShiftKey, evnt);
|
|
19971
19780
|
}
|
|
19972
19781
|
} else if (keyboardConfig && (treeConfig || isEnableConf(editConfig)) && (isDel || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow ? hasBackspaceKey && keyboardOpts.isArrow : hasBackspaceKey))) {
|
|
19973
19782
|
if (!isEditStatus) {
|
|
@@ -19977,10 +19786,10 @@ var Methods = {
|
|
|
19977
19786
|
if (keyboardOpts.isDel && isEnableConf(editConfig) && (selected.row || selected.column)) {
|
|
19978
19787
|
var delPaqrams = {
|
|
19979
19788
|
row: selected.row,
|
|
19980
|
-
rowIndex:
|
|
19789
|
+
rowIndex: _this30.getRowIndex(selected.row),
|
|
19981
19790
|
column: selected.column,
|
|
19982
|
-
columnIndex:
|
|
19983
|
-
$table:
|
|
19791
|
+
columnIndex: _this30.getColumnIndex(selected.column),
|
|
19792
|
+
$table: _this30
|
|
19984
19793
|
};
|
|
19985
19794
|
if (delMethod) {
|
|
19986
19795
|
delMethod(delPaqrams);
|
|
@@ -19991,22 +19800,22 @@ var Methods = {
|
|
|
19991
19800
|
if (backMethod) {
|
|
19992
19801
|
backMethod({
|
|
19993
19802
|
row: selected.row,
|
|
19994
|
-
rowIndex:
|
|
19803
|
+
rowIndex: _this30.getRowIndex(selected.row),
|
|
19995
19804
|
column: selected.column,
|
|
19996
|
-
columnIndex:
|
|
19997
|
-
$table:
|
|
19805
|
+
columnIndex: _this30.getColumnIndex(selected.column),
|
|
19806
|
+
$table: _this30
|
|
19998
19807
|
});
|
|
19999
19808
|
} else {
|
|
20000
|
-
|
|
19809
|
+
_this30.handleActived(selected.args, evnt);
|
|
20001
19810
|
}
|
|
20002
19811
|
} else if (isDel) {
|
|
20003
19812
|
// 如果按下 del 键,更新表尾数据
|
|
20004
|
-
|
|
19813
|
+
_this30.updateFooter();
|
|
20005
19814
|
}
|
|
20006
|
-
|
|
19815
|
+
_this30.emitEvent('cell-delete-value', delPaqrams, evnt);
|
|
20007
19816
|
} else if (hasBackspaceKey && keyboardOpts.isArrow && treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
20008
19817
|
// 如果树形表格回退键关闭当前行返回父节点
|
|
20009
|
-
var _XEUtils$findTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(
|
|
19818
|
+
var _XEUtils$findTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(_this30.afterFullData, function (item) {
|
|
20010
19819
|
return item === currentRow;
|
|
20011
19820
|
}, {
|
|
20012
19821
|
children: childrenField
|
|
@@ -20015,13 +19824,13 @@ var Methods = {
|
|
|
20015
19824
|
if (parentRow) {
|
|
20016
19825
|
evnt.preventDefault();
|
|
20017
19826
|
params = {
|
|
20018
|
-
$table:
|
|
19827
|
+
$table: _this30,
|
|
20019
19828
|
row: parentRow
|
|
20020
19829
|
};
|
|
20021
|
-
|
|
20022
|
-
return
|
|
19830
|
+
_this30.setTreeExpand(parentRow, false).then(function () {
|
|
19831
|
+
return _this30.scrollToRow(parentRow);
|
|
20023
19832
|
}).then(function () {
|
|
20024
|
-
return
|
|
19833
|
+
return _this30.triggerCurrentRowEvent(evnt, params);
|
|
20025
19834
|
});
|
|
20026
19835
|
}
|
|
20027
19836
|
}
|
|
@@ -20036,39 +19845,39 @@ var Methods = {
|
|
|
20036
19845
|
if (selected.column && selected.row && isEnableConf(selected.column.editRender)) {
|
|
20037
19846
|
var beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
20038
19847
|
if (!beforeEditMethod || beforeEditMethod(_objectSpread2(_objectSpread2({}, selected.args), {}, {
|
|
20039
|
-
$table:
|
|
20040
|
-
$grid:
|
|
19848
|
+
$table: _this30,
|
|
19849
|
+
$grid: _this30.$xegrid
|
|
20041
19850
|
}))) {
|
|
20042
19851
|
if (editMethod) {
|
|
20043
19852
|
editMethod({
|
|
20044
19853
|
row: selected.row,
|
|
20045
|
-
rowIndex:
|
|
19854
|
+
rowIndex: _this30.getRowIndex(selected.row),
|
|
20046
19855
|
column: selected.column,
|
|
20047
|
-
columnIndex:
|
|
20048
|
-
$table:
|
|
20049
|
-
$grid:
|
|
19856
|
+
columnIndex: _this30.getColumnIndex(selected.column),
|
|
19857
|
+
$table: _this30,
|
|
19858
|
+
$grid: _this30.$xegrid
|
|
20050
19859
|
});
|
|
20051
19860
|
} else {
|
|
20052
19861
|
setCellValue(selected.row, selected.column, null);
|
|
20053
|
-
|
|
19862
|
+
_this30.handleActived(selected.args, evnt);
|
|
20054
19863
|
}
|
|
20055
19864
|
var afterEditMethod = editOpts.afterEditMethod;
|
|
20056
19865
|
if (afterEditMethod) {
|
|
20057
|
-
|
|
19866
|
+
_this30.$nextTick(function () {
|
|
20058
19867
|
afterEditMethod({
|
|
20059
19868
|
row: selected.row,
|
|
20060
|
-
rowIndex:
|
|
19869
|
+
rowIndex: _this30.getRowIndex(selected.row),
|
|
20061
19870
|
column: selected.column,
|
|
20062
|
-
columnIndex:
|
|
20063
|
-
$table:
|
|
20064
|
-
$grid:
|
|
19871
|
+
columnIndex: _this30.getColumnIndex(selected.column),
|
|
19872
|
+
$table: _this30,
|
|
19873
|
+
$grid: _this30.$xegrid
|
|
20065
19874
|
});
|
|
20066
19875
|
});
|
|
20067
19876
|
}
|
|
20068
19877
|
}
|
|
20069
19878
|
}
|
|
20070
19879
|
}
|
|
20071
|
-
|
|
19880
|
+
_this30.emitEvent('keydown', {}, evnt);
|
|
20072
19881
|
});
|
|
20073
19882
|
}
|
|
20074
19883
|
},
|
|
@@ -20143,7 +19952,7 @@ var Methods = {
|
|
|
20143
19952
|
}
|
|
20144
19953
|
},
|
|
20145
19954
|
handleTargetLeaveEvent: function handleTargetLeaveEvent() {
|
|
20146
|
-
var
|
|
19955
|
+
var _this31 = this;
|
|
20147
19956
|
var tooltipOpts = this.tooltipOpts;
|
|
20148
19957
|
var $tooltip = this.$refs.tooltip;
|
|
20149
19958
|
if ($tooltip) {
|
|
@@ -20151,9 +19960,9 @@ var Methods = {
|
|
|
20151
19960
|
}
|
|
20152
19961
|
if (tooltipOpts.enterable) {
|
|
20153
19962
|
this.tooltipTimeout = setTimeout(function () {
|
|
20154
|
-
$tooltip =
|
|
19963
|
+
$tooltip = _this31.$refs.tooltip;
|
|
20155
19964
|
if ($tooltip && !$tooltip.isActived()) {
|
|
20156
|
-
|
|
19965
|
+
_this31.closeTooltip();
|
|
20157
19966
|
}
|
|
20158
19967
|
}, tooltipOpts.leaveDelay);
|
|
20159
19968
|
} else {
|
|
@@ -20371,12 +20180,12 @@ var Methods = {
|
|
|
20371
20180
|
}
|
|
20372
20181
|
},
|
|
20373
20182
|
handleCheckedCheckboxRow: function handleCheckedCheckboxRow(rows, value, isForce) {
|
|
20374
|
-
var
|
|
20183
|
+
var _this32 = this;
|
|
20375
20184
|
if (rows && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)) {
|
|
20376
20185
|
rows = [rows];
|
|
20377
20186
|
}
|
|
20378
20187
|
rows.forEach(function (row) {
|
|
20379
|
-
return
|
|
20188
|
+
return _this32.handleSelectRow({
|
|
20380
20189
|
row: row
|
|
20381
20190
|
}, !!value, isForce);
|
|
20382
20191
|
});
|
|
@@ -20406,9 +20215,9 @@ var Methods = {
|
|
|
20406
20215
|
* 多选,行选中事件
|
|
20407
20216
|
* value 选中true 不选false 半选-1
|
|
20408
20217
|
*/
|
|
20409
|
-
handleSelectRow: function handleSelectRow(
|
|
20410
|
-
var
|
|
20411
|
-
var row =
|
|
20218
|
+
handleSelectRow: function handleSelectRow(_ref5, value, isForce) {
|
|
20219
|
+
var _this33 = this;
|
|
20220
|
+
var row = _ref5.row;
|
|
20412
20221
|
var selectCheckboxMaps = this.selectCheckboxMaps,
|
|
20413
20222
|
afterFullData = this.afterFullData,
|
|
20414
20223
|
treeConfig = this.treeConfig,
|
|
@@ -20435,15 +20244,15 @@ var Methods = {
|
|
|
20435
20244
|
} else {
|
|
20436
20245
|
// 更新子节点状态
|
|
20437
20246
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([row], function (item) {
|
|
20438
|
-
if (
|
|
20247
|
+
if (_this33.eqRow(item, row) || isForce || !checkMethod || checkMethod({
|
|
20439
20248
|
row: item
|
|
20440
20249
|
})) {
|
|
20441
20250
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(item, checkField, value);
|
|
20442
20251
|
if (indeterminateField) {
|
|
20443
20252
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, indeterminateField, false);
|
|
20444
20253
|
}
|
|
20445
|
-
delete treeIndeterminateMaps[getRowid(
|
|
20446
|
-
|
|
20254
|
+
delete treeIndeterminateMaps[getRowid(_this33, item)];
|
|
20255
|
+
_this33.handleCheckboxReserveRow(row, value);
|
|
20447
20256
|
}
|
|
20448
20257
|
}, {
|
|
20449
20258
|
children: childrenField
|
|
@@ -20451,7 +20260,7 @@ var Methods = {
|
|
|
20451
20260
|
}
|
|
20452
20261
|
// 如果存在父节点,更新父节点状态
|
|
20453
20262
|
var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(afterFullData, function (item) {
|
|
20454
|
-
return
|
|
20263
|
+
return _this33.eqRow(item, row);
|
|
20455
20264
|
}, {
|
|
20456
20265
|
children: childrenField
|
|
20457
20266
|
});
|
|
@@ -20464,20 +20273,20 @@ var Methods = {
|
|
|
20464
20273
|
if (checkMethod({
|
|
20465
20274
|
row: item
|
|
20466
20275
|
})) {
|
|
20467
|
-
var itemRid = getRowid(
|
|
20276
|
+
var itemRid = getRowid(_this33, item);
|
|
20468
20277
|
vItemMaps[itemRid] = item;
|
|
20469
20278
|
vItems.push(item);
|
|
20470
20279
|
}
|
|
20471
20280
|
});
|
|
20472
20281
|
} else {
|
|
20473
20282
|
matchObj.items.forEach(function (item) {
|
|
20474
|
-
var itemRid = getRowid(
|
|
20283
|
+
var itemRid = getRowid(_this33, item);
|
|
20475
20284
|
vItemMaps[itemRid] = item;
|
|
20476
20285
|
vItems.push(item);
|
|
20477
20286
|
});
|
|
20478
20287
|
}
|
|
20479
20288
|
var indeterminatesItem = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().find(matchObj.items, function (item) {
|
|
20480
|
-
return !!treeIndeterminateMaps[getRowid(
|
|
20289
|
+
return !!treeIndeterminateMaps[getRowid(_this33, item)];
|
|
20481
20290
|
});
|
|
20482
20291
|
if (indeterminatesItem) {
|
|
20483
20292
|
parentStatus = -1;
|
|
@@ -20489,7 +20298,7 @@ var Methods = {
|
|
|
20489
20298
|
}
|
|
20490
20299
|
});
|
|
20491
20300
|
parentStatus = selectItems.filter(function (item) {
|
|
20492
|
-
return vItemMaps[getRowid(
|
|
20301
|
+
return vItemMaps[getRowid(_this33, item)];
|
|
20493
20302
|
}).length === vItems.length ? true : selectItems.length || value === -1 ? -1 : false;
|
|
20494
20303
|
}
|
|
20495
20304
|
this.selectCheckboxMaps = selectRowMaps;
|
|
@@ -20520,8 +20329,8 @@ var Methods = {
|
|
|
20520
20329
|
} else {
|
|
20521
20330
|
// 更新子节点状态
|
|
20522
20331
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([row], function (item) {
|
|
20523
|
-
var itemRid = getRowid(
|
|
20524
|
-
if (
|
|
20332
|
+
var itemRid = getRowid(_this33, item);
|
|
20333
|
+
if (_this33.eqRow(item, row) || isForce || !checkMethod || checkMethod({
|
|
20525
20334
|
row: item
|
|
20526
20335
|
})) {
|
|
20527
20336
|
if (value) {
|
|
@@ -20534,8 +20343,8 @@ var Methods = {
|
|
|
20534
20343
|
if (indeterminateField) {
|
|
20535
20344
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, indeterminateField, false);
|
|
20536
20345
|
}
|
|
20537
|
-
delete treeIndeterminateMaps[getRowid(
|
|
20538
|
-
|
|
20346
|
+
delete treeIndeterminateMaps[getRowid(_this33, item)];
|
|
20347
|
+
_this33.handleCheckboxReserveRow(row, value);
|
|
20539
20348
|
}
|
|
20540
20349
|
}, {
|
|
20541
20350
|
children: childrenField
|
|
@@ -20543,7 +20352,7 @@ var Methods = {
|
|
|
20543
20352
|
}
|
|
20544
20353
|
// 如果存在父节点,更新父节点状态
|
|
20545
20354
|
var _matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(afterFullData, function (item) {
|
|
20546
|
-
return
|
|
20355
|
+
return _this33.eqRow(item, row);
|
|
20547
20356
|
}, {
|
|
20548
20357
|
children: childrenField
|
|
20549
20358
|
});
|
|
@@ -20556,33 +20365,33 @@ var Methods = {
|
|
|
20556
20365
|
if (checkMethod({
|
|
20557
20366
|
row: item
|
|
20558
20367
|
})) {
|
|
20559
|
-
var itemRid = getRowid(
|
|
20368
|
+
var itemRid = getRowid(_this33, item);
|
|
20560
20369
|
_vItemMaps[itemRid] = item;
|
|
20561
20370
|
_vItems.push(item);
|
|
20562
20371
|
}
|
|
20563
20372
|
});
|
|
20564
20373
|
} else {
|
|
20565
20374
|
_matchObj.items.forEach(function (item) {
|
|
20566
|
-
var itemRid = getRowid(
|
|
20375
|
+
var itemRid = getRowid(_this33, item);
|
|
20567
20376
|
_vItemMaps[itemRid] = item;
|
|
20568
20377
|
_vItems.push(item);
|
|
20569
20378
|
});
|
|
20570
20379
|
}
|
|
20571
20380
|
var _indeterminatesItem = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().find(_matchObj.items, function (item) {
|
|
20572
|
-
return !!treeIndeterminateMaps[getRowid(
|
|
20381
|
+
return !!treeIndeterminateMaps[getRowid(_this33, item)];
|
|
20573
20382
|
});
|
|
20574
20383
|
if (_indeterminatesItem) {
|
|
20575
20384
|
_parentStatus = -1;
|
|
20576
20385
|
} else {
|
|
20577
20386
|
var _selectItems = [];
|
|
20578
20387
|
_matchObj.items.forEach(function (item) {
|
|
20579
|
-
var itemRid = getRowid(
|
|
20388
|
+
var itemRid = getRowid(_this33, item);
|
|
20580
20389
|
if (selectRowMaps[itemRid]) {
|
|
20581
20390
|
_selectItems.push(item);
|
|
20582
20391
|
}
|
|
20583
20392
|
});
|
|
20584
20393
|
_parentStatus = _selectItems.filter(function (item) {
|
|
20585
|
-
return _vItemMaps[getRowid(
|
|
20394
|
+
return _vItemMaps[getRowid(_this33, item)];
|
|
20586
20395
|
}).length === _vItems.length ? true : _selectItems.length || value === -1 ? -1 : false;
|
|
20587
20396
|
}
|
|
20588
20397
|
this.selectCheckboxMaps = selectRowMaps;
|
|
@@ -20684,7 +20493,7 @@ var Methods = {
|
|
|
20684
20493
|
return this.$nextTick();
|
|
20685
20494
|
},
|
|
20686
20495
|
handleCheckedAllCheckboxRow: function handleCheckedAllCheckboxRow(value, isForce) {
|
|
20687
|
-
var
|
|
20496
|
+
var _this34 = this;
|
|
20688
20497
|
var afterFullData = this.afterFullData,
|
|
20689
20498
|
treeConfig = this.treeConfig,
|
|
20690
20499
|
treeOpts = this.treeOpts,
|
|
@@ -20723,7 +20532,7 @@ var Methods = {
|
|
|
20723
20532
|
row: row
|
|
20724
20533
|
})) {
|
|
20725
20534
|
if (value) {
|
|
20726
|
-
selectRowMaps[getRowid(
|
|
20535
|
+
selectRowMaps[getRowid(_this34, row)] = row;
|
|
20727
20536
|
}
|
|
20728
20537
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, checkField, value);
|
|
20729
20538
|
}
|
|
@@ -20755,7 +20564,7 @@ var Methods = {
|
|
|
20755
20564
|
if (isForce || !checkMethod || checkMethod({
|
|
20756
20565
|
row: row
|
|
20757
20566
|
})) {
|
|
20758
|
-
selectRowMaps[getRowid(
|
|
20567
|
+
selectRowMaps[getRowid(_this34, row)] = row;
|
|
20759
20568
|
}
|
|
20760
20569
|
}, {
|
|
20761
20570
|
children: childrenField
|
|
@@ -20767,7 +20576,7 @@ var Methods = {
|
|
|
20767
20576
|
*/
|
|
20768
20577
|
if (!isForce && checkMethod) {
|
|
20769
20578
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterFullData, function (row) {
|
|
20770
|
-
var rowid = getRowid(
|
|
20579
|
+
var rowid = getRowid(_this34, row);
|
|
20771
20580
|
if (checkMethod({
|
|
20772
20581
|
row: row
|
|
20773
20582
|
}) ? 0 : selectCheckboxMaps[rowid]) {
|
|
@@ -20787,7 +20596,7 @@ var Methods = {
|
|
|
20787
20596
|
*/
|
|
20788
20597
|
if (!isForce && checkMethod) {
|
|
20789
20598
|
afterFullData.forEach(function (row) {
|
|
20790
|
-
var rowid = getRowid(
|
|
20599
|
+
var rowid = getRowid(_this34, row);
|
|
20791
20600
|
if (selectCheckboxMaps[rowid] || checkMethod({
|
|
20792
20601
|
row: row
|
|
20793
20602
|
})) {
|
|
@@ -20796,7 +20605,7 @@ var Methods = {
|
|
|
20796
20605
|
});
|
|
20797
20606
|
} else {
|
|
20798
20607
|
afterFullData.forEach(function (row) {
|
|
20799
|
-
selectRowMaps[getRowid(
|
|
20608
|
+
selectRowMaps[getRowid(_this34, row)] = row;
|
|
20800
20609
|
});
|
|
20801
20610
|
}
|
|
20802
20611
|
} else {
|
|
@@ -20807,7 +20616,7 @@ var Methods = {
|
|
|
20807
20616
|
*/
|
|
20808
20617
|
if (!isForce && checkMethod) {
|
|
20809
20618
|
afterFullData.forEach(function (row) {
|
|
20810
|
-
var rowid = getRowid(
|
|
20619
|
+
var rowid = getRowid(_this34, row);
|
|
20811
20620
|
if (checkMethod({
|
|
20812
20621
|
row: row
|
|
20813
20622
|
}) ? 0 : selectCheckboxMaps[rowid]) {
|
|
@@ -20825,7 +20634,7 @@ var Methods = {
|
|
|
20825
20634
|
});
|
|
20826
20635
|
} else {
|
|
20827
20636
|
afterFullData.forEach(function (row) {
|
|
20828
|
-
return
|
|
20637
|
+
return _this34.handleCheckboxReserveRow(row, false);
|
|
20829
20638
|
});
|
|
20830
20639
|
}
|
|
20831
20640
|
}
|
|
@@ -20844,7 +20653,7 @@ var Methods = {
|
|
|
20844
20653
|
return this.handleCheckedAllCheckboxRow(value, true);
|
|
20845
20654
|
},
|
|
20846
20655
|
checkSelectionStatus: function checkSelectionStatus() {
|
|
20847
|
-
var
|
|
20656
|
+
var _this35 = this;
|
|
20848
20657
|
var afterFullData = this.afterFullData,
|
|
20849
20658
|
selectCheckboxMaps = this.selectCheckboxMaps,
|
|
20850
20659
|
treeIndeterminateMaps = this.treeIndeterminateMaps,
|
|
@@ -20880,11 +20689,11 @@ var Methods = {
|
|
|
20880
20689
|
if (treeConfig) {
|
|
20881
20690
|
if (indeterminateField) {
|
|
20882
20691
|
isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
|
|
20883
|
-
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, indeterminateField) || !!treeIndeterminateMaps[getRowid(
|
|
20692
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, indeterminateField) || !!treeIndeterminateMaps[getRowid(_this35, row)];
|
|
20884
20693
|
});
|
|
20885
20694
|
} else {
|
|
20886
20695
|
isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
|
|
20887
|
-
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) || !!treeIndeterminateMaps[getRowid(
|
|
20696
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) || !!treeIndeterminateMaps[getRowid(_this35, row)];
|
|
20888
20697
|
});
|
|
20889
20698
|
}
|
|
20890
20699
|
} else {
|
|
@@ -20906,23 +20715,23 @@ var Methods = {
|
|
|
20906
20715
|
disableRows.push(row);
|
|
20907
20716
|
return true;
|
|
20908
20717
|
}
|
|
20909
|
-
if (selectCheckboxMaps[getRowid(
|
|
20718
|
+
if (selectCheckboxMaps[getRowid(_this35, row)]) {
|
|
20910
20719
|
checkRows.push(row);
|
|
20911
20720
|
return true;
|
|
20912
20721
|
}
|
|
20913
20722
|
return false;
|
|
20914
20723
|
} : function (row) {
|
|
20915
|
-
return selectCheckboxMaps[getRowid(
|
|
20724
|
+
return selectCheckboxMaps[getRowid(_this35, row)];
|
|
20916
20725
|
});
|
|
20917
20726
|
isAllSelected = isAllResolve && afterFullData.length !== disableRows.length;
|
|
20918
20727
|
if (treeConfig) {
|
|
20919
20728
|
isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
|
|
20920
|
-
var itemRid = getRowid(
|
|
20729
|
+
var itemRid = getRowid(_this35, row);
|
|
20921
20730
|
return treeIndeterminateMaps[itemRid] || selectCheckboxMaps[itemRid];
|
|
20922
20731
|
});
|
|
20923
20732
|
} else {
|
|
20924
20733
|
isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
|
|
20925
|
-
return selectCheckboxMaps[getRowid(
|
|
20734
|
+
return selectCheckboxMaps[getRowid(_this35, row)];
|
|
20926
20735
|
});
|
|
20927
20736
|
}
|
|
20928
20737
|
}
|
|
@@ -21031,7 +20840,7 @@ var Methods = {
|
|
|
21031
20840
|
* 获取复选框保留选中的行
|
|
21032
20841
|
*/
|
|
21033
20842
|
getCheckboxReserveRecords: function getCheckboxReserveRecords(isFull) {
|
|
21034
|
-
var
|
|
20843
|
+
var _this36 = this;
|
|
21035
20844
|
var fullDataRowIdData = this.fullDataRowIdData,
|
|
21036
20845
|
afterFullData = this.afterFullData,
|
|
21037
20846
|
checkboxReserveRowMap = this.checkboxReserveRowMap,
|
|
@@ -21044,13 +20853,13 @@ var Methods = {
|
|
|
21044
20853
|
var afterFullIdMaps = {};
|
|
21045
20854
|
if (treeConfig) {
|
|
21046
20855
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterFullData, function (row) {
|
|
21047
|
-
afterFullIdMaps[getRowid(
|
|
20856
|
+
afterFullIdMaps[getRowid(_this36, row)] = 1;
|
|
21048
20857
|
}, {
|
|
21049
20858
|
children: childrenField
|
|
21050
20859
|
});
|
|
21051
20860
|
} else {
|
|
21052
20861
|
afterFullData.forEach(function (row) {
|
|
21053
|
-
afterFullIdMaps[getRowid(
|
|
20862
|
+
afterFullIdMaps[getRowid(_this36, row)] = 1;
|
|
21054
20863
|
});
|
|
21055
20864
|
}
|
|
21056
20865
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(checkboxReserveRowMap, function (oldRow, oldRowid) {
|
|
@@ -21122,7 +20931,7 @@ var Methods = {
|
|
|
21122
20931
|
* 清空行为不管是否被禁用还是保留记录,都将彻底清空选中状态
|
|
21123
20932
|
*/
|
|
21124
20933
|
clearCheckboxRow: function clearCheckboxRow() {
|
|
21125
|
-
var
|
|
20934
|
+
var _this37 = this;
|
|
21126
20935
|
var tableFullData = this.tableFullData,
|
|
21127
20936
|
treeConfig = this.treeConfig,
|
|
21128
20937
|
treeOpts = this.treeOpts,
|
|
@@ -21148,7 +20957,7 @@ var Methods = {
|
|
|
21148
20957
|
}
|
|
21149
20958
|
if (reserve) {
|
|
21150
20959
|
tableFullData.forEach(function (row) {
|
|
21151
|
-
return
|
|
20960
|
+
return _this37.handleCheckboxReserveRow(row, false);
|
|
21152
20961
|
});
|
|
21153
20962
|
}
|
|
21154
20963
|
this.isAllSelected = false;
|
|
@@ -21308,8 +21117,8 @@ var Methods = {
|
|
|
21308
21117
|
/**
|
|
21309
21118
|
* 行 hover 事件
|
|
21310
21119
|
*/
|
|
21311
|
-
triggerHoverEvent: function triggerHoverEvent(evnt,
|
|
21312
|
-
var row =
|
|
21120
|
+
triggerHoverEvent: function triggerHoverEvent(evnt, _ref6) {
|
|
21121
|
+
var row = _ref6.row;
|
|
21313
21122
|
this.setHoverRow(row);
|
|
21314
21123
|
},
|
|
21315
21124
|
setHoverRow: function setHoverRow(row) {
|
|
@@ -21393,12 +21202,12 @@ var Methods = {
|
|
|
21393
21202
|
* 如果存在规则,则校验
|
|
21394
21203
|
*/
|
|
21395
21204
|
handleChangeCell: function handleChangeCell(evnt, params) {
|
|
21396
|
-
var
|
|
21205
|
+
var _this38 = this;
|
|
21397
21206
|
this.checkValidate('blur').catch(function (e) {
|
|
21398
21207
|
return e;
|
|
21399
21208
|
}).then(function () {
|
|
21400
|
-
|
|
21401
|
-
return
|
|
21209
|
+
_this38.handleActived(params, evnt).then(function () {
|
|
21210
|
+
return _this38.checkValidate('change');
|
|
21402
21211
|
}).catch(function (e) {
|
|
21403
21212
|
return e;
|
|
21404
21213
|
});
|
|
@@ -21499,7 +21308,7 @@ var Methods = {
|
|
|
21499
21308
|
* 如果是双击模式,则激活为编辑状态
|
|
21500
21309
|
*/
|
|
21501
21310
|
triggerCellDblclickEvent: function triggerCellDblclickEvent(evnt, params) {
|
|
21502
|
-
var
|
|
21311
|
+
var _this39 = this;
|
|
21503
21312
|
var editStore = this.editStore,
|
|
21504
21313
|
editConfig = this.editConfig,
|
|
21505
21314
|
editOpts = this.editOpts;
|
|
@@ -21512,15 +21321,15 @@ var Methods = {
|
|
|
21512
21321
|
this.checkValidate('blur').catch(function (e) {
|
|
21513
21322
|
return e;
|
|
21514
21323
|
}).then(function () {
|
|
21515
|
-
|
|
21516
|
-
return
|
|
21324
|
+
_this39.handleActived(params, evnt).then(function () {
|
|
21325
|
+
return _this39.checkValidate('change');
|
|
21517
21326
|
}).catch(function (e) {
|
|
21518
21327
|
return e;
|
|
21519
21328
|
});
|
|
21520
21329
|
});
|
|
21521
21330
|
} else if (editOpts.mode === 'cell') {
|
|
21522
21331
|
this.handleActived(params, evnt).then(function () {
|
|
21523
|
-
return
|
|
21332
|
+
return _this39.checkValidate('change');
|
|
21524
21333
|
}).catch(function (e) {
|
|
21525
21334
|
return e;
|
|
21526
21335
|
});
|
|
@@ -21530,7 +21339,7 @@ var Methods = {
|
|
|
21530
21339
|
this.emitEvent('cell-dblclick', params, evnt);
|
|
21531
21340
|
},
|
|
21532
21341
|
handleDefaultSort: function handleDefaultSort() {
|
|
21533
|
-
var
|
|
21342
|
+
var _this40 = this;
|
|
21534
21343
|
var sortConfig = this.sortConfig,
|
|
21535
21344
|
sortOpts = this.sortOpts;
|
|
21536
21345
|
var defaultSort = sortOpts.defaultSort;
|
|
@@ -21543,7 +21352,7 @@ var Methods = {
|
|
|
21543
21352
|
var field = item.field,
|
|
21544
21353
|
order = item.order;
|
|
21545
21354
|
if (field && order) {
|
|
21546
|
-
var column =
|
|
21355
|
+
var column = _this40.getColumnByField(field);
|
|
21547
21356
|
if (column && column.sortable) {
|
|
21548
21357
|
column.order = order;
|
|
21549
21358
|
column.sortTime = Date.now() + index;
|
|
@@ -21590,7 +21399,7 @@ var Methods = {
|
|
|
21590
21399
|
}
|
|
21591
21400
|
},
|
|
21592
21401
|
setPendingRow: function setPendingRow(rows, status) {
|
|
21593
|
-
var
|
|
21402
|
+
var _this41 = this;
|
|
21594
21403
|
var pendingMaps = _objectSpread2({}, this.pendingRowMaps);
|
|
21595
21404
|
var pendingList = _toConsumableArray(this.pendingRowList);
|
|
21596
21405
|
if (rows && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)) {
|
|
@@ -21598,7 +21407,7 @@ var Methods = {
|
|
|
21598
21407
|
}
|
|
21599
21408
|
if (status) {
|
|
21600
21409
|
rows.forEach(function (row) {
|
|
21601
|
-
var rowid = getRowid(
|
|
21410
|
+
var rowid = getRowid(_this41, row);
|
|
21602
21411
|
if (rowid && !pendingMaps[rowid]) {
|
|
21603
21412
|
pendingList.push(row);
|
|
21604
21413
|
pendingMaps[rowid] = row;
|
|
@@ -21606,9 +21415,9 @@ var Methods = {
|
|
|
21606
21415
|
});
|
|
21607
21416
|
} else {
|
|
21608
21417
|
rows.forEach(function (row) {
|
|
21609
|
-
var rowid = getRowid(
|
|
21418
|
+
var rowid = getRowid(_this41, row);
|
|
21610
21419
|
if (rowid && pendingMaps[rowid]) {
|
|
21611
|
-
var pendingIndex =
|
|
21420
|
+
var pendingIndex = _this41.findRowIndexOf(pendingList, row);
|
|
21612
21421
|
if (pendingIndex > -1) {
|
|
21613
21422
|
pendingList.splice(pendingIndex, 1);
|
|
21614
21423
|
}
|
|
@@ -21621,17 +21430,17 @@ var Methods = {
|
|
|
21621
21430
|
return this.$nextTick();
|
|
21622
21431
|
},
|
|
21623
21432
|
togglePendingRow: function togglePendingRow(rows) {
|
|
21624
|
-
var
|
|
21433
|
+
var _this42 = this;
|
|
21625
21434
|
var pendingMaps = _objectSpread2({}, this.pendingRowMaps);
|
|
21626
21435
|
var pendingList = _toConsumableArray(this.pendingRowList);
|
|
21627
21436
|
if (rows && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)) {
|
|
21628
21437
|
rows = [rows];
|
|
21629
21438
|
}
|
|
21630
21439
|
rows.forEach(function (row) {
|
|
21631
|
-
var rowid = getRowid(
|
|
21440
|
+
var rowid = getRowid(_this42, row);
|
|
21632
21441
|
if (rowid) {
|
|
21633
21442
|
if (pendingMaps[rowid]) {
|
|
21634
|
-
var pendingIndex =
|
|
21443
|
+
var pendingIndex = _this42.findRowIndexOf(pendingList, row);
|
|
21635
21444
|
if (pendingIndex > -1) {
|
|
21636
21445
|
pendingList.splice(pendingIndex, 1);
|
|
21637
21446
|
}
|
|
@@ -21660,7 +21469,7 @@ var Methods = {
|
|
|
21660
21469
|
return this.$nextTick();
|
|
21661
21470
|
},
|
|
21662
21471
|
sort: function sort(sortConfs, sortOrder) {
|
|
21663
|
-
var
|
|
21472
|
+
var _this43 = this;
|
|
21664
21473
|
var sortOpts = this.sortOpts;
|
|
21665
21474
|
var multiple = sortOpts.multiple,
|
|
21666
21475
|
remote = sortOpts.remote,
|
|
@@ -21686,14 +21495,14 @@ var Methods = {
|
|
|
21686
21495
|
order = confs.order;
|
|
21687
21496
|
var column = field;
|
|
21688
21497
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(field)) {
|
|
21689
|
-
column =
|
|
21498
|
+
column = _this43.getColumnByField(field);
|
|
21690
21499
|
}
|
|
21691
21500
|
if (column && (column.sortable || column.remoteSort)) {
|
|
21692
21501
|
if (!firstSortColumn) {
|
|
21693
21502
|
firstSortColumn = column;
|
|
21694
21503
|
}
|
|
21695
21504
|
if (orders.indexOf(order) === -1) {
|
|
21696
|
-
order = getNextSortOrder(
|
|
21505
|
+
order = getNextSortOrder(_this43, column);
|
|
21697
21506
|
}
|
|
21698
21507
|
if (column.order !== order) {
|
|
21699
21508
|
column.order = order;
|
|
@@ -21706,8 +21515,8 @@ var Methods = {
|
|
|
21706
21515
|
this.handleTableData(true);
|
|
21707
21516
|
}
|
|
21708
21517
|
return this.$nextTick().then(function () {
|
|
21709
|
-
|
|
21710
|
-
return
|
|
21518
|
+
_this43.updateCellAreas();
|
|
21519
|
+
return _this43.updateStyle();
|
|
21711
21520
|
});
|
|
21712
21521
|
}
|
|
21713
21522
|
return this.$nextTick();
|
|
@@ -21841,14 +21650,14 @@ var Methods = {
|
|
|
21841
21650
|
* @param {Row} row 行对象
|
|
21842
21651
|
*/
|
|
21843
21652
|
reloadRowExpand: function reloadRowExpand(row) {
|
|
21844
|
-
var
|
|
21653
|
+
var _this44 = this;
|
|
21845
21654
|
var expandOpts = this.expandOpts,
|
|
21846
21655
|
rowExpandLazyLoadedMaps = this.rowExpandLazyLoadedMaps;
|
|
21847
21656
|
var lazy = expandOpts.lazy;
|
|
21848
21657
|
var rowid = getRowid(this, row);
|
|
21849
21658
|
if (lazy && !rowExpandLazyLoadedMaps[rowid]) {
|
|
21850
21659
|
this.clearRowExpandLoaded(row).then(function () {
|
|
21851
|
-
return
|
|
21660
|
+
return _this44.handleAsyncRowExpand(row);
|
|
21852
21661
|
});
|
|
21853
21662
|
}
|
|
21854
21663
|
return this.$nextTick();
|
|
@@ -21938,39 +21747,39 @@ var Methods = {
|
|
|
21938
21747
|
return this.setRowExpand(expandedRows, expanded);
|
|
21939
21748
|
},
|
|
21940
21749
|
handleAsyncRowExpand: function handleAsyncRowExpand(row) {
|
|
21941
|
-
var
|
|
21750
|
+
var _this45 = this;
|
|
21942
21751
|
var fullAllDataRowMap = this.fullAllDataRowMap,
|
|
21943
21752
|
expandOpts = this.expandOpts;
|
|
21944
21753
|
var rest = fullAllDataRowMap.get(row);
|
|
21945
21754
|
return new Promise(function (resolve) {
|
|
21946
21755
|
var loadMethod = expandOpts.loadMethod;
|
|
21947
21756
|
if (loadMethod) {
|
|
21948
|
-
var rowExpandLazyLoadedMaps =
|
|
21757
|
+
var rowExpandLazyLoadedMaps = _this45.rowExpandLazyLoadedMaps;
|
|
21949
21758
|
var rowTempExpandLazyLoadedMaps = _objectSpread2({}, rowExpandLazyLoadedMaps);
|
|
21950
|
-
var rowid = getRowid(
|
|
21759
|
+
var rowid = getRowid(_this45, row);
|
|
21951
21760
|
rowTempExpandLazyLoadedMaps[rowid] = row;
|
|
21952
|
-
|
|
21761
|
+
_this45.rowExpandLazyLoadedMaps = rowTempExpandLazyLoadedMaps;
|
|
21953
21762
|
loadMethod({
|
|
21954
|
-
$table:
|
|
21763
|
+
$table: _this45,
|
|
21955
21764
|
row: row,
|
|
21956
|
-
rowIndex:
|
|
21957
|
-
$rowIndex:
|
|
21765
|
+
rowIndex: _this45.getRowIndex(row),
|
|
21766
|
+
$rowIndex: _this45.getVMRowIndex(row)
|
|
21958
21767
|
}).then(function () {
|
|
21959
21768
|
rest.expandLoaded = true;
|
|
21960
|
-
var rowExpandedMaps =
|
|
21769
|
+
var rowExpandedMaps = _this45.rowExpandedMaps;
|
|
21961
21770
|
var rowTempExpandedMaps = _objectSpread2({}, rowExpandedMaps);
|
|
21962
21771
|
rowTempExpandedMaps[rowid] = row;
|
|
21963
|
-
|
|
21772
|
+
_this45.rowExpandedMaps = rowTempExpandedMaps;
|
|
21964
21773
|
}).catch(function () {
|
|
21965
21774
|
rest.expandLoaded = false;
|
|
21966
21775
|
}).finally(function () {
|
|
21967
|
-
var rowExpandLazyLoadedMaps =
|
|
21776
|
+
var rowExpandLazyLoadedMaps = _this45.rowExpandLazyLoadedMaps;
|
|
21968
21777
|
var rowTempExpandLazyLoadedMaps = _objectSpread2({}, rowExpandLazyLoadedMaps);
|
|
21969
21778
|
if (rowTempExpandLazyLoadedMaps[rowid]) {
|
|
21970
21779
|
delete rowTempExpandLazyLoadedMaps[rowid];
|
|
21971
21780
|
}
|
|
21972
|
-
|
|
21973
|
-
resolve(
|
|
21781
|
+
_this45.rowExpandLazyLoadedMaps = rowTempExpandLazyLoadedMaps;
|
|
21782
|
+
resolve(_this45.$nextTick().then(_this45.recalculate));
|
|
21974
21783
|
});
|
|
21975
21784
|
} else {
|
|
21976
21785
|
resolve();
|
|
@@ -21985,7 +21794,7 @@ var Methods = {
|
|
|
21985
21794
|
* @param {Boolean} expanded 是否展开
|
|
21986
21795
|
*/
|
|
21987
21796
|
setRowExpand: function setRowExpand(rows, expanded) {
|
|
21988
|
-
var
|
|
21797
|
+
var _this46 = this;
|
|
21989
21798
|
var rowExpandedMaps = this.rowExpandedMaps,
|
|
21990
21799
|
fullAllDataRowIdData = this.fullAllDataRowIdData,
|
|
21991
21800
|
rowExpandLazyLoadedMaps = this.rowExpandLazyLoadedMaps,
|
|
@@ -22015,18 +21824,18 @@ var Methods = {
|
|
|
22015
21824
|
columnIndex: columnIndex,
|
|
22016
21825
|
$columnIndex: $columnIndex,
|
|
22017
21826
|
row: row,
|
|
22018
|
-
rowIndex:
|
|
22019
|
-
$rowIndex:
|
|
21827
|
+
rowIndex: _this46.getRowIndex(row),
|
|
21828
|
+
$rowIndex: _this46.getVMRowIndex(row)
|
|
22020
21829
|
});
|
|
22021
21830
|
}) : rows;
|
|
22022
21831
|
if (expanded) {
|
|
22023
21832
|
validRows.forEach(function (row) {
|
|
22024
|
-
var rowid = getRowid(
|
|
21833
|
+
var rowid = getRowid(_this46, row);
|
|
22025
21834
|
if (!rExpandedMaps[rowid]) {
|
|
22026
21835
|
var rest = fullAllDataRowIdData[rowid];
|
|
22027
21836
|
var isLoad = lazy && !rest.expandLoaded && !rowExpandLazyLoadedMaps[rowid];
|
|
22028
21837
|
if (isLoad) {
|
|
22029
|
-
lazyRests.push(
|
|
21838
|
+
lazyRests.push(_this46.handleAsyncRowExpand(row));
|
|
22030
21839
|
} else {
|
|
22031
21840
|
rExpandedMaps[rowid] = row;
|
|
22032
21841
|
}
|
|
@@ -22034,7 +21843,7 @@ var Methods = {
|
|
|
22034
21843
|
});
|
|
22035
21844
|
} else {
|
|
22036
21845
|
validRows.forEach(function (item) {
|
|
22037
|
-
var rowid = getRowid(
|
|
21846
|
+
var rowid = getRowid(_this46, item);
|
|
22038
21847
|
if (rExpandedMaps[rowid]) {
|
|
22039
21848
|
delete rExpandedMaps[rowid];
|
|
22040
21849
|
}
|
|
@@ -22042,7 +21851,7 @@ var Methods = {
|
|
|
22042
21851
|
}
|
|
22043
21852
|
if (reserve) {
|
|
22044
21853
|
validRows.forEach(function (row) {
|
|
22045
|
-
return
|
|
21854
|
+
return _this46.handleRowExpandReserve(row, expanded);
|
|
22046
21855
|
});
|
|
22047
21856
|
}
|
|
22048
21857
|
}
|
|
@@ -22067,7 +21876,7 @@ var Methods = {
|
|
|
22067
21876
|
* 手动清空展开行状态,数据会恢复成未展开的状态
|
|
22068
21877
|
*/
|
|
22069
21878
|
clearRowExpand: function clearRowExpand() {
|
|
22070
|
-
var
|
|
21879
|
+
var _this47 = this;
|
|
22071
21880
|
var expandOpts = this.expandOpts,
|
|
22072
21881
|
tableFullData = this.tableFullData;
|
|
22073
21882
|
var reserve = expandOpts.reserve;
|
|
@@ -22075,12 +21884,12 @@ var Methods = {
|
|
|
22075
21884
|
this.rowExpandedMaps = {};
|
|
22076
21885
|
if (reserve) {
|
|
22077
21886
|
tableFullData.forEach(function (row) {
|
|
22078
|
-
return
|
|
21887
|
+
return _this47.handleRowExpandReserve(row, false);
|
|
22079
21888
|
});
|
|
22080
21889
|
}
|
|
22081
21890
|
return this.$nextTick().then(function () {
|
|
22082
21891
|
if (expList.length) {
|
|
22083
|
-
|
|
21892
|
+
_this47.recalculate();
|
|
22084
21893
|
}
|
|
22085
21894
|
});
|
|
22086
21895
|
},
|
|
@@ -22163,7 +21972,7 @@ var Methods = {
|
|
|
22163
21972
|
* @param {Row} row 行对象
|
|
22164
21973
|
*/
|
|
22165
21974
|
reloadTreeExpand: function reloadTreeExpand(row) {
|
|
22166
|
-
var
|
|
21975
|
+
var _this48 = this;
|
|
22167
21976
|
var treeOpts = this.treeOpts,
|
|
22168
21977
|
treeExpandLazyLoadedMaps = this.treeExpandLazyLoadedMaps;
|
|
22169
21978
|
var transform = treeOpts.transform,
|
|
@@ -22172,14 +21981,14 @@ var Methods = {
|
|
|
22172
21981
|
var rowid = getRowid(this, row);
|
|
22173
21982
|
if (lazy && row[hasChildField] && !treeExpandLazyLoadedMaps[rowid]) {
|
|
22174
21983
|
this.clearTreeExpandLoaded(row).then(function () {
|
|
22175
|
-
return
|
|
21984
|
+
return _this48.handleAsyncTreeExpandChilds(row);
|
|
22176
21985
|
}).then(function () {
|
|
22177
21986
|
if (transform) {
|
|
22178
|
-
|
|
22179
|
-
return
|
|
21987
|
+
_this48.handleVirtualTreeToList();
|
|
21988
|
+
return _this48.handleTableData();
|
|
22180
21989
|
}
|
|
22181
21990
|
}).then(function () {
|
|
22182
|
-
return
|
|
21991
|
+
return _this48.recalculate();
|
|
22183
21992
|
});
|
|
22184
21993
|
}
|
|
22185
21994
|
return this.$nextTick();
|
|
@@ -22255,7 +22064,7 @@ var Methods = {
|
|
|
22255
22064
|
}
|
|
22256
22065
|
},
|
|
22257
22066
|
handleAsyncTreeExpandChilds: function handleAsyncTreeExpandChilds(row) {
|
|
22258
|
-
var
|
|
22067
|
+
var _this49 = this;
|
|
22259
22068
|
var treeOpts = this.treeOpts,
|
|
22260
22069
|
checkboxOpts = this.checkboxOpts;
|
|
22261
22070
|
var transform = treeOpts.transform,
|
|
@@ -22263,13 +22072,13 @@ var Methods = {
|
|
|
22263
22072
|
var checkStrictly = checkboxOpts.checkStrictly;
|
|
22264
22073
|
return new Promise(function (resolve) {
|
|
22265
22074
|
if (loadMethod) {
|
|
22266
|
-
var fullAllDataRowMap =
|
|
22267
|
-
treeExpandLazyLoadedMaps =
|
|
22268
|
-
var rowid = getRowid(
|
|
22075
|
+
var fullAllDataRowMap = _this49.fullAllDataRowMap,
|
|
22076
|
+
treeExpandLazyLoadedMaps = _this49.treeExpandLazyLoadedMaps;
|
|
22077
|
+
var rowid = getRowid(_this49, row);
|
|
22269
22078
|
var rest = fullAllDataRowMap.get(row);
|
|
22270
22079
|
treeExpandLazyLoadedMaps[rowid] = row;
|
|
22271
22080
|
loadMethod({
|
|
22272
|
-
$table:
|
|
22081
|
+
$table: _this49,
|
|
22273
22082
|
row: row
|
|
22274
22083
|
}).then(function (childRecords) {
|
|
22275
22084
|
// 响应成功后则展开行,并将子节点挂载到该节点下
|
|
@@ -22281,20 +22090,20 @@ var Methods = {
|
|
|
22281
22090
|
childRecords = [];
|
|
22282
22091
|
}
|
|
22283
22092
|
if (childRecords) {
|
|
22284
|
-
return
|
|
22285
|
-
var treeExpandedMaps =
|
|
22093
|
+
return _this49.loadTreeChildren(row, childRecords).then(function (childRows) {
|
|
22094
|
+
var treeExpandedMaps = _this49.treeExpandedMaps;
|
|
22286
22095
|
var treeTempExpandedMaps = _objectSpread2({}, treeExpandedMaps);
|
|
22287
22096
|
if (childRows.length && !treeTempExpandedMaps[rowid]) {
|
|
22288
22097
|
treeTempExpandedMaps[rowid] = row;
|
|
22289
|
-
|
|
22098
|
+
_this49.treeExpandedMaps = treeTempExpandedMaps;
|
|
22290
22099
|
}
|
|
22291
22100
|
// 如果当前节点已选中,则展开后子节点也被选中
|
|
22292
|
-
if (!checkStrictly &&
|
|
22293
|
-
|
|
22101
|
+
if (!checkStrictly && _this49.isCheckedByCheckboxRow(row)) {
|
|
22102
|
+
_this49.handleCheckedCheckboxRow(childRows, true, true);
|
|
22294
22103
|
}
|
|
22295
|
-
return
|
|
22104
|
+
return _this49.$nextTick().then(function () {
|
|
22296
22105
|
if (transform) {
|
|
22297
|
-
return
|
|
22106
|
+
return _this49.handleTableData();
|
|
22298
22107
|
}
|
|
22299
22108
|
});
|
|
22300
22109
|
});
|
|
@@ -22302,13 +22111,13 @@ var Methods = {
|
|
|
22302
22111
|
}).catch(function () {
|
|
22303
22112
|
// 如果响应异常,则不展开,再次点击后将重新触发懒加载
|
|
22304
22113
|
rest.treeLoaded = false;
|
|
22305
|
-
var treeExpandLazyLoadedMaps =
|
|
22114
|
+
var treeExpandLazyLoadedMaps = _this49.treeExpandLazyLoadedMaps;
|
|
22306
22115
|
if (treeExpandLazyLoadedMaps[rowid]) {
|
|
22307
22116
|
treeExpandLazyLoadedMaps[rowid] = null;
|
|
22308
22117
|
}
|
|
22309
22118
|
}).finally(function () {
|
|
22310
|
-
|
|
22311
|
-
return
|
|
22119
|
+
_this49.$nextTick().then(function () {
|
|
22120
|
+
return _this49.recalculate();
|
|
22312
22121
|
}).then(function () {
|
|
22313
22122
|
return resolve();
|
|
22314
22123
|
});
|
|
@@ -22345,7 +22154,7 @@ var Methods = {
|
|
|
22345
22154
|
* @returns
|
|
22346
22155
|
*/
|
|
22347
22156
|
handleBaseTreeExpand: function handleBaseTreeExpand(rows, expanded) {
|
|
22348
|
-
var
|
|
22157
|
+
var _this50 = this;
|
|
22349
22158
|
var fullAllDataRowMap = this.fullAllDataRowMap,
|
|
22350
22159
|
tableFullData = this.tableFullData,
|
|
22351
22160
|
treeExpandedMaps = this.treeExpandedMaps,
|
|
@@ -22381,7 +22190,7 @@ var Methods = {
|
|
|
22381
22190
|
});
|
|
22382
22191
|
if (matchObj) {
|
|
22383
22192
|
matchObj.items.forEach(function (item) {
|
|
22384
|
-
var rowid = getRowid(
|
|
22193
|
+
var rowid = getRowid(_this50, item);
|
|
22385
22194
|
if (treeTempExpandedMaps[rowid]) {
|
|
22386
22195
|
delete treeTempExpandedMaps[rowid];
|
|
22387
22196
|
}
|
|
@@ -22390,13 +22199,13 @@ var Methods = {
|
|
|
22390
22199
|
}
|
|
22391
22200
|
if (expanded) {
|
|
22392
22201
|
validRows.forEach(function (row) {
|
|
22393
|
-
var rowid = getRowid(
|
|
22202
|
+
var rowid = getRowid(_this50, row);
|
|
22394
22203
|
if (!treeTempExpandedMaps[rowid]) {
|
|
22395
22204
|
var rest = fullAllDataRowMap.get(row);
|
|
22396
22205
|
var isLoad = lazy && row[hasChildField] && !rest.treeLoaded && !treeExpandLazyLoadedMaps[rowid];
|
|
22397
22206
|
// 是否使用懒加载
|
|
22398
22207
|
if (isLoad) {
|
|
22399
|
-
result.push(
|
|
22208
|
+
result.push(_this50.handleAsyncTreeExpandChilds(row));
|
|
22400
22209
|
} else {
|
|
22401
22210
|
if (row[childrenField] && row[childrenField].length) {
|
|
22402
22211
|
treeTempExpandedMaps[rowid] = row;
|
|
@@ -22406,7 +22215,7 @@ var Methods = {
|
|
|
22406
22215
|
});
|
|
22407
22216
|
} else {
|
|
22408
22217
|
validRows.forEach(function (item) {
|
|
22409
|
-
var rowid = getRowid(
|
|
22218
|
+
var rowid = getRowid(_this50, item);
|
|
22410
22219
|
if (treeTempExpandedMaps[rowid]) {
|
|
22411
22220
|
delete treeTempExpandedMaps[rowid];
|
|
22412
22221
|
}
|
|
@@ -22414,7 +22223,7 @@ var Methods = {
|
|
|
22414
22223
|
}
|
|
22415
22224
|
if (reserve) {
|
|
22416
22225
|
validRows.forEach(function (row) {
|
|
22417
|
-
return
|
|
22226
|
+
return _this50.handleTreeExpandReserve(row, expanded);
|
|
22418
22227
|
});
|
|
22419
22228
|
}
|
|
22420
22229
|
this.treeExpandedMaps = treeTempExpandedMaps;
|
|
@@ -22427,12 +22236,12 @@ var Methods = {
|
|
|
22427
22236
|
* @returns
|
|
22428
22237
|
*/
|
|
22429
22238
|
handleVirtualTreeExpand: function handleVirtualTreeExpand(rows, expanded) {
|
|
22430
|
-
var
|
|
22239
|
+
var _this51 = this;
|
|
22431
22240
|
return this.handleBaseTreeExpand(rows, expanded).then(function () {
|
|
22432
|
-
|
|
22433
|
-
return
|
|
22241
|
+
_this51.handleVirtualTreeToList();
|
|
22242
|
+
return _this51.handleTableData();
|
|
22434
22243
|
}).then(function () {
|
|
22435
|
-
return
|
|
22244
|
+
return _this51.recalculate();
|
|
22436
22245
|
});
|
|
22437
22246
|
},
|
|
22438
22247
|
/**
|
|
@@ -22472,7 +22281,7 @@ var Methods = {
|
|
|
22472
22281
|
* 手动清空树形节点的展开状态,数据会恢复成未展开的状态
|
|
22473
22282
|
*/
|
|
22474
22283
|
clearTreeExpand: function clearTreeExpand() {
|
|
22475
|
-
var
|
|
22284
|
+
var _this52 = this;
|
|
22476
22285
|
var treeOpts = this.treeOpts,
|
|
22477
22286
|
tableFullData = this.tableFullData;
|
|
22478
22287
|
var transform = treeOpts.transform,
|
|
@@ -22482,19 +22291,19 @@ var Methods = {
|
|
|
22482
22291
|
this.treeExpandedMaps = {};
|
|
22483
22292
|
if (reserve) {
|
|
22484
22293
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullData, function (row) {
|
|
22485
|
-
return
|
|
22294
|
+
return _this52.handleTreeExpandReserve(row, false);
|
|
22486
22295
|
}, {
|
|
22487
22296
|
children: childrenField
|
|
22488
22297
|
});
|
|
22489
22298
|
}
|
|
22490
22299
|
return this.handleTableData().then(function () {
|
|
22491
22300
|
if (transform) {
|
|
22492
|
-
|
|
22493
|
-
return
|
|
22301
|
+
_this52.handleVirtualTreeToList();
|
|
22302
|
+
return _this52.handleTableData();
|
|
22494
22303
|
}
|
|
22495
22304
|
}).then(function () {
|
|
22496
22305
|
if (expList.length) {
|
|
22497
|
-
|
|
22306
|
+
_this52.recalculate();
|
|
22498
22307
|
}
|
|
22499
22308
|
});
|
|
22500
22309
|
},
|
|
@@ -22613,28 +22422,28 @@ var Methods = {
|
|
|
22613
22422
|
},
|
|
22614
22423
|
// 计算可视渲染相关数据
|
|
22615
22424
|
computeScrollLoad: function computeScrollLoad() {
|
|
22616
|
-
var
|
|
22425
|
+
var _this53 = this;
|
|
22617
22426
|
return this.$nextTick().then(function () {
|
|
22618
|
-
var sYOpts =
|
|
22619
|
-
sXOpts =
|
|
22620
|
-
scrollXLoad =
|
|
22621
|
-
scrollYLoad =
|
|
22622
|
-
scrollXStore =
|
|
22623
|
-
scrollYStore =
|
|
22427
|
+
var sYOpts = _this53.sYOpts,
|
|
22428
|
+
sXOpts = _this53.sXOpts,
|
|
22429
|
+
scrollXLoad = _this53.scrollXLoad,
|
|
22430
|
+
scrollYLoad = _this53.scrollYLoad,
|
|
22431
|
+
scrollXStore = _this53.scrollXStore,
|
|
22432
|
+
scrollYStore = _this53.scrollYStore;
|
|
22624
22433
|
// 计算 X 逻辑
|
|
22625
22434
|
if (scrollXLoad) {
|
|
22626
|
-
var _computeVirtualX3 = computeVirtualX(
|
|
22435
|
+
var _computeVirtualX3 = computeVirtualX(_this53),
|
|
22627
22436
|
visibleXSize = _computeVirtualX3.visibleSize;
|
|
22628
22437
|
var offsetXSize = sXOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sXOpts.oSize) : browse.msie ? 10 : browse.edge ? 5 : 0;
|
|
22629
22438
|
scrollXStore.offsetSize = offsetXSize;
|
|
22630
22439
|
scrollXStore.visibleSize = visibleXSize;
|
|
22631
22440
|
scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
|
|
22632
|
-
|
|
22441
|
+
_this53.updateScrollXData();
|
|
22633
22442
|
} else {
|
|
22634
|
-
|
|
22443
|
+
_this53.updateScrollXSpace();
|
|
22635
22444
|
}
|
|
22636
22445
|
// 计算 Y 逻辑
|
|
22637
|
-
var _computeVirtualY = computeVirtualY(
|
|
22446
|
+
var _computeVirtualY = computeVirtualY(_this53),
|
|
22638
22447
|
rowHeight = _computeVirtualY.rowHeight,
|
|
22639
22448
|
visibleYSize = _computeVirtualY.visibleSize;
|
|
22640
22449
|
scrollYStore.rowHeight = rowHeight;
|
|
@@ -22643,12 +22452,12 @@ var Methods = {
|
|
|
22643
22452
|
scrollYStore.offsetSize = offsetYSize;
|
|
22644
22453
|
scrollYStore.visibleSize = visibleYSize;
|
|
22645
22454
|
scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
|
|
22646
|
-
|
|
22455
|
+
_this53.updateScrollYData();
|
|
22647
22456
|
} else {
|
|
22648
|
-
|
|
22457
|
+
_this53.updateScrollYSpace();
|
|
22649
22458
|
}
|
|
22650
|
-
|
|
22651
|
-
|
|
22459
|
+
_this53.rowHeight = rowHeight;
|
|
22460
|
+
_this53.$nextTick(_this53.updateStyle);
|
|
22652
22461
|
});
|
|
22653
22462
|
},
|
|
22654
22463
|
handleTableColumn: function handleTableColumn() {
|
|
@@ -22658,11 +22467,11 @@ var Methods = {
|
|
|
22658
22467
|
this.tableColumn = scrollXLoad ? visibleColumn.slice(scrollXStore.startIndex, scrollXStore.endIndex) : visibleColumn.slice(0);
|
|
22659
22468
|
},
|
|
22660
22469
|
updateScrollXData: function updateScrollXData() {
|
|
22661
|
-
var
|
|
22470
|
+
var _this54 = this;
|
|
22662
22471
|
// this.tableColumn = []
|
|
22663
22472
|
this.$nextTick(function () {
|
|
22664
|
-
|
|
22665
|
-
|
|
22473
|
+
_this54.handleTableColumn();
|
|
22474
|
+
_this54.updateScrollXSpace();
|
|
22666
22475
|
});
|
|
22667
22476
|
},
|
|
22668
22477
|
// 更新横向 X 可视渲染上下剩余空间大小
|
|
@@ -22713,11 +22522,11 @@ var Methods = {
|
|
|
22713
22522
|
}
|
|
22714
22523
|
},
|
|
22715
22524
|
updateScrollYData: function updateScrollYData() {
|
|
22716
|
-
var
|
|
22525
|
+
var _this55 = this;
|
|
22717
22526
|
// this.tableData = []
|
|
22718
22527
|
this.$nextTick(function () {
|
|
22719
|
-
|
|
22720
|
-
|
|
22528
|
+
_this55.handleTableData();
|
|
22529
|
+
_this55.updateScrollYSpace();
|
|
22721
22530
|
});
|
|
22722
22531
|
},
|
|
22723
22532
|
// 更新纵向 Y 可视渲染上下剩余空间大小
|
|
@@ -22758,7 +22567,7 @@ var Methods = {
|
|
|
22758
22567
|
* @param {Number} scrollTop 上距离
|
|
22759
22568
|
*/
|
|
22760
22569
|
scrollTo: function scrollTo(scrollLeft, scrollTop) {
|
|
22761
|
-
var
|
|
22570
|
+
var _this56 = this;
|
|
22762
22571
|
var $refs = this.$refs;
|
|
22763
22572
|
var tableBody = $refs.tableBody,
|
|
22764
22573
|
rightBody = $refs.rightBody,
|
|
@@ -22775,7 +22584,7 @@ var Methods = {
|
|
|
22775
22584
|
if (this.scrollXLoad || this.scrollYLoad) {
|
|
22776
22585
|
return new Promise(function (resolve) {
|
|
22777
22586
|
return setTimeout(function () {
|
|
22778
|
-
return resolve(
|
|
22587
|
+
return resolve(_this56.$nextTick());
|
|
22779
22588
|
}, 50);
|
|
22780
22589
|
});
|
|
22781
22590
|
}
|
|
@@ -22817,7 +22626,7 @@ var Methods = {
|
|
|
22817
22626
|
* @param {Row} row 行对象
|
|
22818
22627
|
*/
|
|
22819
22628
|
scrollToTreeRow: function scrollToTreeRow(row) {
|
|
22820
|
-
var
|
|
22629
|
+
var _this57 = this;
|
|
22821
22630
|
var tableFullData = this.tableFullData,
|
|
22822
22631
|
treeConfig = this.treeConfig,
|
|
22823
22632
|
treeOpts = this.treeOpts;
|
|
@@ -22832,14 +22641,14 @@ var Methods = {
|
|
|
22832
22641
|
if (matchObj) {
|
|
22833
22642
|
var nodes = matchObj.nodes;
|
|
22834
22643
|
nodes.forEach(function (row, index) {
|
|
22835
|
-
if (index < nodes.length - 1 && !
|
|
22836
|
-
rests.push(
|
|
22644
|
+
if (index < nodes.length - 1 && !_this57.isTreeExpandByRow(row)) {
|
|
22645
|
+
rests.push(_this57.setTreeExpand(row, true));
|
|
22837
22646
|
}
|
|
22838
22647
|
});
|
|
22839
22648
|
}
|
|
22840
22649
|
}
|
|
22841
22650
|
return Promise.all(rests).then(function () {
|
|
22842
|
-
return rowToVisible(
|
|
22651
|
+
return rowToVisible(_this57, row);
|
|
22843
22652
|
});
|
|
22844
22653
|
},
|
|
22845
22654
|
/**
|
|
@@ -22899,32 +22708,32 @@ var Methods = {
|
|
|
22899
22708
|
* 如果单元格配置了校验规则,则会进行校验
|
|
22900
22709
|
*/
|
|
22901
22710
|
updateStatus: function updateStatus(slotParams, cellValue) {
|
|
22902
|
-
var
|
|
22711
|
+
var _this58 = this;
|
|
22903
22712
|
var customVal = !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(cellValue);
|
|
22904
22713
|
return this.$nextTick().then(function () {
|
|
22905
|
-
var $refs =
|
|
22906
|
-
editRules =
|
|
22907
|
-
validStore =
|
|
22714
|
+
var $refs = _this58.$refs,
|
|
22715
|
+
editRules = _this58.editRules,
|
|
22716
|
+
validStore = _this58.validStore;
|
|
22908
22717
|
var tableBody = $refs.tableBody;
|
|
22909
22718
|
if (slotParams && tableBody && editRules) {
|
|
22910
22719
|
var row = slotParams.row,
|
|
22911
22720
|
column = slotParams.column;
|
|
22912
22721
|
var type = 'change';
|
|
22913
|
-
if (
|
|
22914
|
-
if (
|
|
22915
|
-
var cell =
|
|
22722
|
+
if (_this58.hasCellRules) {
|
|
22723
|
+
if (_this58.hasCellRules(type, row, column)) {
|
|
22724
|
+
var cell = _this58.getCellElement(row, column);
|
|
22916
22725
|
if (cell) {
|
|
22917
|
-
return
|
|
22726
|
+
return _this58.validCellRules(type, row, column, cellValue).then(function () {
|
|
22918
22727
|
if (customVal && validStore.visible) {
|
|
22919
22728
|
setCellValue(row, column, cellValue);
|
|
22920
22729
|
}
|
|
22921
|
-
|
|
22922
|
-
}).catch(function (
|
|
22923
|
-
var rule =
|
|
22730
|
+
_this58.clearValidate(row, column);
|
|
22731
|
+
}).catch(function (_ref7) {
|
|
22732
|
+
var rule = _ref7.rule;
|
|
22924
22733
|
if (customVal) {
|
|
22925
22734
|
setCellValue(row, column, cellValue);
|
|
22926
22735
|
}
|
|
22927
|
-
|
|
22736
|
+
_this58.showValidTooltip({
|
|
22928
22737
|
rule: rule,
|
|
22929
22738
|
row: row,
|
|
22930
22739
|
column: column,
|
|
@@ -22945,14 +22754,14 @@ var Methods = {
|
|
|
22945
22754
|
* @param {TableMergeConfig[]} merges { row: Row|number, column: ColumnInfo|number, rowspan: number, colspan: number }
|
|
22946
22755
|
*/
|
|
22947
22756
|
setMergeCells: function setMergeCells(merges) {
|
|
22948
|
-
var
|
|
22757
|
+
var _this59 = this;
|
|
22949
22758
|
if (this.spanMethod) {
|
|
22950
22759
|
errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
|
|
22951
22760
|
}
|
|
22952
22761
|
setMerges(this, merges, this.mergeList, this.afterFullData);
|
|
22953
22762
|
return this.$nextTick().then(function () {
|
|
22954
|
-
|
|
22955
|
-
return
|
|
22763
|
+
_this59.updateCellAreas();
|
|
22764
|
+
return _this59.updateStyle();
|
|
22956
22765
|
});
|
|
22957
22766
|
},
|
|
22958
22767
|
/**
|
|
@@ -22960,14 +22769,14 @@ var Methods = {
|
|
|
22960
22769
|
* @param {TableMergeConfig[]} merges 多个或数组 [{row:Row|number, col:ColumnInfo|number}]
|
|
22961
22770
|
*/
|
|
22962
22771
|
removeMergeCells: function removeMergeCells(merges) {
|
|
22963
|
-
var
|
|
22772
|
+
var _this60 = this;
|
|
22964
22773
|
if (this.spanMethod) {
|
|
22965
22774
|
errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
|
|
22966
22775
|
}
|
|
22967
22776
|
var rest = removeMerges(this, merges, this.mergeList, this.afterFullData);
|
|
22968
22777
|
return this.$nextTick().then(function () {
|
|
22969
|
-
|
|
22970
|
-
|
|
22778
|
+
_this60.updateCellAreas();
|
|
22779
|
+
_this60.updateStyle();
|
|
22971
22780
|
return rest;
|
|
22972
22781
|
});
|
|
22973
22782
|
},
|
|
@@ -22981,35 +22790,35 @@ var Methods = {
|
|
|
22981
22790
|
* 清除所有单元格合并
|
|
22982
22791
|
*/
|
|
22983
22792
|
clearMergeCells: function clearMergeCells() {
|
|
22984
|
-
var
|
|
22793
|
+
var _this61 = this;
|
|
22985
22794
|
this.mergeList = [];
|
|
22986
22795
|
return this.$nextTick().then(function () {
|
|
22987
|
-
return
|
|
22796
|
+
return _this61.updateStyle();
|
|
22988
22797
|
});
|
|
22989
22798
|
},
|
|
22990
22799
|
handleDefaultMergeFooterItems: function handleDefaultMergeFooterItems() {
|
|
22991
22800
|
this.setMergeFooterItems(this.mergeFooterItems);
|
|
22992
22801
|
},
|
|
22993
22802
|
setMergeFooterItems: function setMergeFooterItems(merges) {
|
|
22994
|
-
var
|
|
22803
|
+
var _this62 = this;
|
|
22995
22804
|
if (this.footerSpanMethod) {
|
|
22996
22805
|
errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
|
|
22997
22806
|
}
|
|
22998
22807
|
setMerges(this, merges, this.mergeFooterList, null);
|
|
22999
22808
|
return this.$nextTick().then(function () {
|
|
23000
|
-
|
|
23001
|
-
return
|
|
22809
|
+
_this62.updateCellAreas();
|
|
22810
|
+
return _this62.updateStyle();
|
|
23002
22811
|
});
|
|
23003
22812
|
},
|
|
23004
22813
|
removeMergeFooterItems: function removeMergeFooterItems(merges) {
|
|
23005
|
-
var
|
|
22814
|
+
var _this63 = this;
|
|
23006
22815
|
if (this.footerSpanMethod) {
|
|
23007
22816
|
errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
|
|
23008
22817
|
}
|
|
23009
22818
|
var rest = removeMerges(this, merges, this.mergeFooterList, null);
|
|
23010
22819
|
return this.$nextTick().then(function () {
|
|
23011
|
-
|
|
23012
|
-
|
|
22820
|
+
_this63.updateCellAreas();
|
|
22821
|
+
_this63.updateStyle();
|
|
23013
22822
|
return rest;
|
|
23014
22823
|
});
|
|
23015
22824
|
},
|
|
@@ -23023,10 +22832,10 @@ var Methods = {
|
|
|
23023
22832
|
* 清除所有表尾合并
|
|
23024
22833
|
*/
|
|
23025
22834
|
clearMergeFooterItems: function clearMergeFooterItems() {
|
|
23026
|
-
var
|
|
22835
|
+
var _this64 = this;
|
|
23027
22836
|
this.mergeFooterList = [];
|
|
23028
22837
|
return this.$nextTick().then(function () {
|
|
23029
|
-
return
|
|
22838
|
+
return _this64.updateStyle();
|
|
23030
22839
|
});
|
|
23031
22840
|
},
|
|
23032
22841
|
updateZindex: function updateZindex() {
|
|
@@ -23081,9 +22890,9 @@ var Methods = {
|
|
|
23081
22890
|
return this.getCellElement(row, column);
|
|
23082
22891
|
},
|
|
23083
22892
|
findRowIndexOf: function findRowIndexOf(list, row) {
|
|
23084
|
-
var
|
|
22893
|
+
var _this65 = this;
|
|
23085
22894
|
return row ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(list, function (item) {
|
|
23086
|
-
return
|
|
22895
|
+
return _this65.eqRow(item, row);
|
|
23087
22896
|
}) : -1;
|
|
23088
22897
|
},
|
|
23089
22898
|
eqRow: function eqRow(row1, row2) {
|
|
@@ -23789,7 +23598,8 @@ function handleUupdateResize(_vm) {
|
|
|
23789
23598
|
message: true,
|
|
23790
23599
|
isHeader: false,
|
|
23791
23600
|
isFooter: false
|
|
23792
|
-
}
|
|
23601
|
+
},
|
|
23602
|
+
_isLoading: false
|
|
23793
23603
|
};
|
|
23794
23604
|
},
|
|
23795
23605
|
computed: {
|
|
@@ -24281,8 +24091,9 @@ function handleUupdateResize(_vm) {
|
|
|
24281
24091
|
editRules = this.editRules;
|
|
24282
24092
|
var leftList = columnStore.leftList,
|
|
24283
24093
|
rightList = columnStore.rightList;
|
|
24094
|
+
var currLoading = this._isLoading || loading;
|
|
24284
24095
|
return h('div', {
|
|
24285
|
-
class: ['vxe-table', 'vxe-table--render-default', "tid_".concat(tId), vSize ? "size--".concat(vSize) : '', "border--".concat(tableBorder), (_ref = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, "valid-msg--".concat(validOpts.msgMode), !!editRules), 'vxe-editable', !!editConfig), 'old-cell-valid', editRules && conf.cellVaildMode === 'obsolete'), 'cell--highlight', highlightCell), 'cell--selected', mouseConfig && mouseOpts.selected), 'cell--area', mouseConfig && mouseOpts.area), 'row--highlight', rowOpts.isHover || highlightHoverRow), 'column--highlight', columnOpts.isHover || highlightHoverColumn), 'is--header', showHeader), 'is--footer', showFooter), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, 'is--group', isGroup), 'is--tree-line', treeConfig && (treeOpts.showLine || treeOpts.line)), 'is--fixed-left', leftList.length), 'is--fixed-right', rightList.length), 'is--animat', !!this.animat), 'is--round', this.round), 'is--stripe', !treeConfig && stripe), 'is--loading',
|
|
24096
|
+
class: ['vxe-table', 'vxe-table--render-default', "tid_".concat(tId), vSize ? "size--".concat(vSize) : '', "border--".concat(tableBorder), (_ref = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, "valid-msg--".concat(validOpts.msgMode), !!editRules), 'vxe-editable', !!editConfig), 'old-cell-valid', editRules && conf.cellVaildMode === 'obsolete'), 'cell--highlight', highlightCell), 'cell--selected', mouseConfig && mouseOpts.selected), 'cell--area', mouseConfig && mouseOpts.area), 'row--highlight', rowOpts.isHover || highlightHoverRow), 'column--highlight', columnOpts.isHover || highlightHoverColumn), 'is--header', showHeader), 'is--footer', showFooter), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, 'is--group', isGroup), 'is--tree-line', treeConfig && (treeOpts.showLine || treeOpts.line)), 'is--fixed-left', leftList.length), 'is--fixed-right', rightList.length), 'is--animat', !!this.animat), 'is--round', this.round), 'is--stripe', !treeConfig && stripe), 'is--loading', currLoading), 'is--empty', !currLoading && !tableData.length), 'is--scroll-y', overflowY), _defineProperty(_defineProperty(_defineProperty(_ref, 'is--scroll-x', overflowX), 'is--virtual-x', scrollXLoad), 'is--virtual-y', scrollYLoad))],
|
|
24286
24097
|
on: {
|
|
24287
24098
|
keydown: this.keydownEvent
|
|
24288
24099
|
}
|
|
@@ -24373,7 +24184,7 @@ function handleUupdateResize(_vm) {
|
|
|
24373
24184
|
h(packages_loading, {
|
|
24374
24185
|
class: 'vxe-table--loading',
|
|
24375
24186
|
props: {
|
|
24376
|
-
value:
|
|
24187
|
+
value: currLoading,
|
|
24377
24188
|
icon: loadingOpts.icon,
|
|
24378
24189
|
text: loadingOpts.text
|
|
24379
24190
|
}
|
|
@@ -26427,6 +26238,59 @@ var VxeTableEditModule = {
|
|
|
26427
26238
|
};
|
|
26428
26239
|
var Edit = VxeTableEditModule;
|
|
26429
26240
|
/* harmony default export */ var edit = ((/* unused pure expression or super */ null && (VxeTableEditModule)));
|
|
26241
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
|
26242
|
+
function _arrayWithHoles(arr) {
|
|
26243
|
+
if (Array.isArray(arr)) return arr;
|
|
26244
|
+
}
|
|
26245
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
|
26246
|
+
|
|
26247
|
+
|
|
26248
|
+
|
|
26249
|
+
|
|
26250
|
+
|
|
26251
|
+
|
|
26252
|
+
|
|
26253
|
+
|
|
26254
|
+
function _iterableToArrayLimit(r, l) {
|
|
26255
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
26256
|
+
if (null != t) {
|
|
26257
|
+
var e,
|
|
26258
|
+
n,
|
|
26259
|
+
i,
|
|
26260
|
+
u,
|
|
26261
|
+
a = [],
|
|
26262
|
+
f = !0,
|
|
26263
|
+
o = !1;
|
|
26264
|
+
try {
|
|
26265
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
26266
|
+
if (Object(t) !== t) return;
|
|
26267
|
+
f = !1;
|
|
26268
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
26269
|
+
} catch (r) {
|
|
26270
|
+
o = !0, n = r;
|
|
26271
|
+
} finally {
|
|
26272
|
+
try {
|
|
26273
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
26274
|
+
} finally {
|
|
26275
|
+
if (o) throw n;
|
|
26276
|
+
}
|
|
26277
|
+
}
|
|
26278
|
+
return a;
|
|
26279
|
+
}
|
|
26280
|
+
}
|
|
26281
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
|
26282
|
+
|
|
26283
|
+
function _nonIterableRest() {
|
|
26284
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
26285
|
+
}
|
|
26286
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
|
|
26287
|
+
|
|
26288
|
+
|
|
26289
|
+
|
|
26290
|
+
|
|
26291
|
+
function _slicedToArray(arr, i) {
|
|
26292
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
26293
|
+
}
|
|
26430
26294
|
;// CONCATENATED MODULE: ./packages/modal/src/modal.js
|
|
26431
26295
|
|
|
26432
26296
|
|
|
@@ -35440,20 +35304,6 @@ var renderPopupPanel = function renderPopupPanel(h, _vm) {
|
|
|
35440
35304
|
getStoreData: function getStoreData() {
|
|
35441
35305
|
return {};
|
|
35442
35306
|
},
|
|
35443
|
-
handleSaveStore: function handleSaveStore(type) {
|
|
35444
|
-
var $xetable = this.$xetable;
|
|
35445
|
-
var id = $xetable.id,
|
|
35446
|
-
customOpts = $xetable.customOpts;
|
|
35447
|
-
var storage = customOpts.storage,
|
|
35448
|
-
updateStore = customOpts.updateStore;
|
|
35449
|
-
if (storage && id && updateStore) {
|
|
35450
|
-
updateStore({
|
|
35451
|
-
id: id,
|
|
35452
|
-
type: type,
|
|
35453
|
-
storeData: $xetable.getCustomStoreData()
|
|
35454
|
-
});
|
|
35455
|
-
}
|
|
35456
|
-
},
|
|
35457
35307
|
confirmCustomEvent: function confirmCustomEvent(evnt) {
|
|
35458
35308
|
var $xetable = this.$xetable;
|
|
35459
35309
|
var customOpts = $xetable.customOpts,
|
|
@@ -35486,7 +35336,7 @@ var renderPopupPanel = function renderPopupPanel(h, _vm) {
|
|
|
35486
35336
|
});
|
|
35487
35337
|
$xetable.closeCustom();
|
|
35488
35338
|
$xetable.emitCustomEvent('confirm', evnt);
|
|
35489
|
-
|
|
35339
|
+
$xetable.saveCustomStore('confirm');
|
|
35490
35340
|
},
|
|
35491
35341
|
cancelCustomEvent: function cancelCustomEvent(evnt) {
|
|
35492
35342
|
var $xetable = this.$xetable;
|
|
@@ -35529,7 +35379,6 @@ var renderPopupPanel = function renderPopupPanel(h, _vm) {
|
|
|
35529
35379
|
$xetable.resetColumn(true);
|
|
35530
35380
|
$xetable.closeCustom();
|
|
35531
35381
|
$xetable.emitCustomEvent('reset', evnt);
|
|
35532
|
-
this.handleSaveStore('reset');
|
|
35533
35382
|
},
|
|
35534
35383
|
resetCustomEvent: function resetCustomEvent(evnt) {
|
|
35535
35384
|
var _this = this;
|
|
@@ -35593,6 +35442,7 @@ var renderPopupPanel = function renderPopupPanel(h, _vm) {
|
|
|
35593
35442
|
this.handleOptionCheck(column);
|
|
35594
35443
|
if (customOpts.immediate) {
|
|
35595
35444
|
$xetable.handleCustom();
|
|
35445
|
+
$xetable.saveCustomStore('update:visible');
|
|
35596
35446
|
}
|
|
35597
35447
|
$xetable.checkCustomStatus();
|
|
35598
35448
|
},
|
|
@@ -39060,6 +38910,7 @@ var Textarea = VxeTextarea;
|
|
|
39060
38910
|
|
|
39061
38911
|
|
|
39062
38912
|
|
|
38913
|
+
|
|
39063
38914
|
// import { warnLog } from '../../tools/log'
|
|
39064
38915
|
|
|
39065
38916
|
/* harmony default export */ var button_src_button = ({
|
|
@@ -39084,6 +38935,12 @@ var Textarea = VxeTextarea;
|
|
|
39084
38935
|
title: String,
|
|
39085
38936
|
disabled: Boolean,
|
|
39086
38937
|
loading: Boolean,
|
|
38938
|
+
trigger: {
|
|
38939
|
+
type: String,
|
|
38940
|
+
default: function _default() {
|
|
38941
|
+
return conf.button.trigger;
|
|
38942
|
+
}
|
|
38943
|
+
},
|
|
39087
38944
|
destroyOnClose: Boolean,
|
|
39088
38945
|
className: [String, Function],
|
|
39089
38946
|
popupClassName: [String, Function],
|
|
@@ -39102,8 +38959,9 @@ var Textarea = VxeTextarea;
|
|
|
39102
38959
|
data: function data() {
|
|
39103
38960
|
return {
|
|
39104
38961
|
inited: false,
|
|
39105
|
-
|
|
38962
|
+
visiblePanel: false,
|
|
39106
38963
|
animatVisible: false,
|
|
38964
|
+
isActivated: false,
|
|
39107
38965
|
panelIndex: 0,
|
|
39108
38966
|
panelStyle: null,
|
|
39109
38967
|
panelPlacement: null
|
|
@@ -39168,6 +39026,7 @@ var Textarea = VxeTextarea;
|
|
|
39168
39026
|
// }
|
|
39169
39027
|
|
|
39170
39028
|
GlobalEvent.on(this, 'mousewheel', this.handleGlobalMousewheelEvent);
|
|
39029
|
+
GlobalEvent.on(this, 'mousedown', this.handleGlobalMousedownEvent);
|
|
39171
39030
|
},
|
|
39172
39031
|
beforeDestroy: function beforeDestroy() {
|
|
39173
39032
|
var panelElem = this.$refs.panel;
|
|
@@ -39177,11 +39036,13 @@ var Textarea = VxeTextarea;
|
|
|
39177
39036
|
},
|
|
39178
39037
|
destroyed: function destroyed() {
|
|
39179
39038
|
GlobalEvent.off(this, 'mousewheel');
|
|
39039
|
+
GlobalEvent.off(this, 'mousedown');
|
|
39180
39040
|
},
|
|
39181
39041
|
render: function render(h) {
|
|
39182
39042
|
var $scopedSlots = this.$scopedSlots,
|
|
39183
39043
|
className = this.className,
|
|
39184
39044
|
popupClassName = this.popupClassName,
|
|
39045
|
+
trigger = this.trigger,
|
|
39185
39046
|
title = this.title,
|
|
39186
39047
|
inited = this.inited,
|
|
39187
39048
|
type = this.type,
|
|
@@ -39195,14 +39056,23 @@ var Textarea = VxeTextarea;
|
|
|
39195
39056
|
name = this.name,
|
|
39196
39057
|
disabled = this.disabled,
|
|
39197
39058
|
loading = this.loading,
|
|
39198
|
-
|
|
39059
|
+
visiblePanel = this.visiblePanel,
|
|
39199
39060
|
animatVisible = this.animatVisible,
|
|
39200
39061
|
panelPlacement = this.panelPlacement;
|
|
39201
39062
|
var downsSlot = $scopedSlots.dropdowns;
|
|
39063
|
+
var btnOns = {};
|
|
39064
|
+
var panelOns = {};
|
|
39065
|
+
if (downsSlot && trigger === 'hover') {
|
|
39066
|
+
// hover 触发
|
|
39067
|
+
btnOns.mouseenter = this.mouseenterTargetEvent;
|
|
39068
|
+
btnOns.mouseleave = this.mouseleaveTargetEvent;
|
|
39069
|
+
panelOns.onMouseenter = this.mouseenterDropdownEvent;
|
|
39070
|
+
panelOns.onMouseleave = this.mouseleaveDropdownEvent;
|
|
39071
|
+
}
|
|
39202
39072
|
return downsSlot ? h('div', {
|
|
39203
39073
|
class: ['vxe-button--dropdown', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
|
|
39204
39074
|
$button: this
|
|
39205
|
-
}) : className : '', _defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--active',
|
|
39075
|
+
}) : className : '', _defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--active', visiblePanel)]
|
|
39206
39076
|
}, [h('button', {
|
|
39207
39077
|
ref: 'xBtn',
|
|
39208
39078
|
class: ['vxe-button', "type--".concat(btnMode), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(btnStatus), btnStatus), 'is--round', btnRound), 'is--circle', btnCircle), 'is--disabled', disabled || loading), 'is--loading', loading)],
|
|
@@ -39212,31 +39082,27 @@ var Textarea = VxeTextarea;
|
|
|
39212
39082
|
type: isFormBtn ? type : 'button',
|
|
39213
39083
|
disabled: disabled || loading
|
|
39214
39084
|
},
|
|
39215
|
-
on: {
|
|
39216
|
-
|
|
39217
|
-
|
|
39218
|
-
click: this.clickEvent
|
|
39219
|
-
}
|
|
39085
|
+
on: _objectSpread2({
|
|
39086
|
+
click: this.clickTargetEvent
|
|
39087
|
+
}, btnOns)
|
|
39220
39088
|
}, this.renderContent(h).concat([h('i', {
|
|
39221
39089
|
class: "vxe-button--dropdown-arrow ".concat(conf.icon.BUTTON_DROPDOWN)
|
|
39222
39090
|
})])), h('div', {
|
|
39223
39091
|
ref: 'panel',
|
|
39224
39092
|
class: ['vxe-button--dropdown-panel', popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
|
|
39225
39093
|
$button: this
|
|
39226
|
-
}) : popupClassName : '', _defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'animat--leave', animatVisible), 'animat--enter',
|
|
39094
|
+
}) : popupClassName : '', _defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'animat--leave', animatVisible), 'animat--enter', visiblePanel)],
|
|
39227
39095
|
attrs: {
|
|
39228
39096
|
placement: panelPlacement
|
|
39229
39097
|
},
|
|
39230
39098
|
style: this.panelStyle
|
|
39231
39099
|
}, inited ? [h('div', {
|
|
39232
39100
|
class: 'vxe-button--dropdown-wrapper',
|
|
39233
|
-
on: {
|
|
39101
|
+
on: _objectSpread2({
|
|
39234
39102
|
mousedown: this.mousedownDropdownEvent,
|
|
39235
|
-
click: this.clickDropdownEvent
|
|
39236
|
-
|
|
39237
|
-
|
|
39238
|
-
}
|
|
39239
|
-
}, destroyOnClose && !showPanel ? [] : downsSlot.call(this, {}, h))] : null)]) : h('button', {
|
|
39103
|
+
click: this.clickDropdownEvent
|
|
39104
|
+
}, panelOns)
|
|
39105
|
+
}, destroyOnClose && !visiblePanel ? [] : downsSlot.call(this, {}, h))] : null)]) : h('button', {
|
|
39240
39106
|
ref: 'xBtn',
|
|
39241
39107
|
class: ['vxe-button', "type--".concat(btnMode), className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
|
|
39242
39108
|
$button: this
|
|
@@ -39286,10 +39152,22 @@ var Textarea = VxeTextarea;
|
|
|
39286
39152
|
return contents;
|
|
39287
39153
|
},
|
|
39288
39154
|
handleGlobalMousewheelEvent: function handleGlobalMousewheelEvent(evnt) {
|
|
39289
|
-
if (this.
|
|
39155
|
+
if (this.visiblePanel && !dom.getEventTargetNode(evnt, this.$refs.panel).flag) {
|
|
39290
39156
|
this.closePanel();
|
|
39291
39157
|
}
|
|
39292
39158
|
},
|
|
39159
|
+
handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
|
|
39160
|
+
var disabled = this.disabled,
|
|
39161
|
+
visiblePanel = this.visiblePanel;
|
|
39162
|
+
if (!disabled) {
|
|
39163
|
+
var el = this.$refs.$el;
|
|
39164
|
+
var panelElem = this.$refs.panel;
|
|
39165
|
+
this.isActivated = dom.getEventTargetNode(evnt, el).flag || dom.getEventTargetNode(evnt, panelElem).flag;
|
|
39166
|
+
if (visiblePanel && !this.isActivated) {
|
|
39167
|
+
this.closePanel();
|
|
39168
|
+
}
|
|
39169
|
+
}
|
|
39170
|
+
},
|
|
39293
39171
|
updateZindex: function updateZindex() {
|
|
39294
39172
|
if (this.panelIndex < utils.getLastZIndex()) {
|
|
39295
39173
|
this.panelIndex = utils.nextZIndex();
|
|
@@ -39324,7 +39202,7 @@ var Textarea = VxeTextarea;
|
|
|
39324
39202
|
if (panelElem) {
|
|
39325
39203
|
panelElem.dataset.active = 'N';
|
|
39326
39204
|
}
|
|
39327
|
-
this.
|
|
39205
|
+
this.visiblePanel = false;
|
|
39328
39206
|
setTimeout(function () {
|
|
39329
39207
|
if (!panelElem || panelElem.dataset.active !== 'Y') {
|
|
39330
39208
|
_this.animatVisible = false;
|
|
@@ -39351,39 +39229,24 @@ var Textarea = VxeTextarea;
|
|
|
39351
39229
|
});
|
|
39352
39230
|
},
|
|
39353
39231
|
mouseenterTargetEvent: function mouseenterTargetEvent(evnt) {
|
|
39354
|
-
|
|
39355
|
-
var panelElem = this.$refs.panel;
|
|
39356
|
-
panelElem.dataset.active = 'Y';
|
|
39357
|
-
if (!this.inited) {
|
|
39358
|
-
this.inited = true;
|
|
39359
|
-
if (this.transfer) {
|
|
39360
|
-
document.body.appendChild(panelElem);
|
|
39361
|
-
}
|
|
39362
|
-
}
|
|
39363
|
-
this.showTime = setTimeout(function () {
|
|
39364
|
-
if (panelElem.dataset.active === 'Y') {
|
|
39365
|
-
_this2.mouseenterDropdownEvent();
|
|
39366
|
-
} else {
|
|
39367
|
-
_this2.animatVisible = false;
|
|
39368
|
-
}
|
|
39369
|
-
}, 250);
|
|
39232
|
+
this.openPanel();
|
|
39370
39233
|
this.$emit('mouseenter', {
|
|
39371
39234
|
$event: evnt
|
|
39372
39235
|
});
|
|
39373
39236
|
},
|
|
39374
39237
|
mouseenterDropdownEvent: function mouseenterDropdownEvent() {
|
|
39375
|
-
var
|
|
39238
|
+
var _this2 = this;
|
|
39376
39239
|
var panelElem = this.$refs.panel;
|
|
39377
39240
|
panelElem.dataset.active = 'Y';
|
|
39378
39241
|
this.animatVisible = true;
|
|
39379
39242
|
setTimeout(function () {
|
|
39380
39243
|
if (panelElem.dataset.active === 'Y') {
|
|
39381
|
-
|
|
39382
|
-
|
|
39383
|
-
|
|
39244
|
+
_this2.visiblePanel = true;
|
|
39245
|
+
_this2.updateZindex();
|
|
39246
|
+
_this2.updatePlacement();
|
|
39384
39247
|
setTimeout(function () {
|
|
39385
|
-
if (
|
|
39386
|
-
|
|
39248
|
+
if (_this2.visiblePanel) {
|
|
39249
|
+
_this2.updatePlacement();
|
|
39387
39250
|
}
|
|
39388
39251
|
}, 50);
|
|
39389
39252
|
}
|
|
@@ -39392,6 +39255,37 @@ var Textarea = VxeTextarea;
|
|
|
39392
39255
|
mouseleaveDropdownEvent: function mouseleaveDropdownEvent() {
|
|
39393
39256
|
this.closePanel();
|
|
39394
39257
|
},
|
|
39258
|
+
clickTargetEvent: function clickTargetEvent(evnt) {
|
|
39259
|
+
var trigger = this.trigger;
|
|
39260
|
+
if (trigger === 'click') {
|
|
39261
|
+
if (this.visiblePanel) {
|
|
39262
|
+
this.closePanel();
|
|
39263
|
+
} else {
|
|
39264
|
+
this.openPanel();
|
|
39265
|
+
}
|
|
39266
|
+
}
|
|
39267
|
+
this.clickEvent(evnt);
|
|
39268
|
+
},
|
|
39269
|
+
openPanel: function openPanel() {
|
|
39270
|
+
var _this3 = this;
|
|
39271
|
+
var trigger = this.trigger;
|
|
39272
|
+
var panelElem = this.$refs.panel;
|
|
39273
|
+
panelElem.dataset.active = 'Y';
|
|
39274
|
+
if (!this.inited) {
|
|
39275
|
+
this.inited = true;
|
|
39276
|
+
if (this.transfer) {
|
|
39277
|
+
document.body.appendChild(panelElem);
|
|
39278
|
+
}
|
|
39279
|
+
}
|
|
39280
|
+
this.showTime = setTimeout(function () {
|
|
39281
|
+
if (panelElem.dataset.active === 'Y') {
|
|
39282
|
+
_this3.mouseenterDropdownEvent();
|
|
39283
|
+
} else {
|
|
39284
|
+
_this3.animatVisible = false;
|
|
39285
|
+
}
|
|
39286
|
+
}, trigger === 'click' ? 50 : 250);
|
|
39287
|
+
return this.$nextTick();
|
|
39288
|
+
},
|
|
39395
39289
|
closePanel: function closePanel() {
|
|
39396
39290
|
var _this4 = this;
|
|
39397
39291
|
var panelElem = this.$refs.panel;
|
|
@@ -39400,7 +39294,7 @@ var Textarea = VxeTextarea;
|
|
|
39400
39294
|
panelElem.dataset.active = 'N';
|
|
39401
39295
|
setTimeout(function () {
|
|
39402
39296
|
if (panelElem.dataset.active !== 'Y') {
|
|
39403
|
-
_this4.
|
|
39297
|
+
_this4.visiblePanel = false;
|
|
39404
39298
|
setTimeout(function () {
|
|
39405
39299
|
if (panelElem.dataset.active !== 'Y') {
|
|
39406
39300
|
_this4.animatVisible = false;
|
|
@@ -39410,8 +39304,9 @@ var Textarea = VxeTextarea;
|
|
|
39410
39304
|
}, 100);
|
|
39411
39305
|
} else {
|
|
39412
39306
|
this.animatVisible = false;
|
|
39413
|
-
this.
|
|
39307
|
+
this.visiblePanel = false;
|
|
39414
39308
|
}
|
|
39309
|
+
return this.$nextTick();
|
|
39415
39310
|
},
|
|
39416
39311
|
updatePlacement: function updatePlacement() {
|
|
39417
39312
|
var _this5 = this;
|