vxe-table 4.7.10 → 4.7.12

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.
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
+ var _tslib = require("tslib");
7
8
  var _vue = require("vue");
8
9
  var _xeUtils = _interopRequireDefault(require("xe-utils"));
9
10
  var _dom = require("../../ui/src/dom");
@@ -38,10 +39,7 @@ const {
38
39
  useFns
39
40
  } = _ui.VxeUI;
40
41
  const isWebkit = _dom.browse['-webkit'] && !_dom.browse.edge;
41
- const resizableStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_WIDTH';
42
- const visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
43
- const fixedStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_FIXED';
44
- const sortStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_SORT';
42
+ const customStorageKey = 'VXE_CUSTOM_STORE';
45
43
  var _default = exports.default = (0, _vue.defineComponent)({
46
44
  name: 'VxeTable',
47
45
  props: _props.default,
@@ -267,7 +265,8 @@ var _default = exports.default = (0, _vue.defineComponent)({
267
265
  isFooter: false
268
266
  },
269
267
  scrollVMLoading: false,
270
- _isResize: false
268
+ _isResize: false,
269
+ _isLoading: false
271
270
  });
272
271
  const internalData = {
273
272
  tZindex: 0,
@@ -665,12 +664,20 @@ var _default = exports.default = (0, _vue.defineComponent)({
665
664
  const oIndex = orders.indexOf(currOrder) + 1;
666
665
  return orders[oIndex < orders.length ? oIndex : 0];
667
666
  };
668
- const getCustomStorageMap = key => {
667
+ const getCustomStorageMap = id => {
669
668
  const version = getConfig().version;
670
- const rest = _xeUtils.default.toStringJSON(localStorage.getItem(key) || '');
671
- return rest && rest._v === version ? rest : {
669
+ const rest = _xeUtils.default.toStringJSON(localStorage.getItem(customStorageKey) || '');
670
+ const maps = rest && rest._v === version ? rest : {
672
671
  _v: version
673
672
  };
673
+ return (id ? maps[id] : maps) || {};
674
+ };
675
+ const setCustomStorageMap = (id, data) => {
676
+ const version = getConfig().version;
677
+ const maps = getCustomStorageMap();
678
+ maps[id] = data || undefined;
679
+ maps._v = version;
680
+ localStorage.setItem(customStorageKey, _xeUtils.default.toJSONString(maps));
674
681
  };
675
682
  const getRecoverRowMaps = keyMaps => {
676
683
  const {
@@ -909,11 +916,14 @@ var _default = exports.default = (0, _vue.defineComponent)({
909
916
  /**
910
917
  * 还原自定义列操作状态
911
918
  */
912
- const restoreCustomStorage = () => {
919
+ const restoreCustomStorage = () => (0, _tslib.__awaiter)(this, void 0, void 0, function* () {
913
920
  const {
914
921
  id,
915
922
  customConfig
916
923
  } = props;
924
+ const {
925
+ tableFullColumn
926
+ } = internalData;
917
927
  const customOpts = computeCustomOpts.value;
918
928
  const {
919
929
  storage,
@@ -925,131 +935,59 @@ var _default = exports.default = (0, _vue.defineComponent)({
925
935
  const isCustomVisible = isAllCustom || storageOpts.visible;
926
936
  const isCustomFixed = isAllCustom || storageOpts.fixed;
927
937
  const isCustomSort = isAllCustom || storageOpts.sort;
928
- if (storage && id && restoreStore) {
929
- restoreStore({
930
- id
931
- });
932
- }
933
938
  if (customConfig && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
934
- const customMap = {};
935
939
  if (!id) {
936
940
  (0, _log.errLog)('vxe.error.reqProp', ['id']);
937
941
  return;
938
942
  }
939
- // 自定义列宽
940
- if (isCustomResizable) {
941
- const columnWidthStorage = getCustomStorageMap(resizableStorageKey)[id];
942
- if (columnWidthStorage) {
943
- _xeUtils.default.each(columnWidthStorage, (resizeWidth, colKey) => {
944
- customMap[colKey] = {
945
- resizeWidth
946
- };
947
- });
948
- }
949
- }
950
- // 自定义固定列
951
- if (isCustomFixed) {
952
- const columnFixedStorage = getCustomStorageMap(fixedStorageKey)[id];
953
- if (columnFixedStorage) {
954
- const colFixeds = columnFixedStorage.split(',');
955
- colFixeds.forEach(fixConf => {
956
- const [colKey, fixed] = fixConf.split('|');
957
- if (customMap[colKey]) {
958
- customMap[colKey].fixed = fixed;
959
- } else {
960
- customMap[colKey] = {
961
- fixed
962
- };
963
- }
964
- });
965
- }
966
- }
967
- // 自定义顺序
968
- let hasCustomSort = false;
969
- if (isCustomSort) {
970
- const columnSortStorage = getCustomStorageMap(sortStorageKey)[id];
971
- if (columnSortStorage) {
972
- _xeUtils.default.each(columnSortStorage, (renderSortNumber, colKey) => {
973
- if (customMap[colKey]) {
974
- customMap[colKey].renderSortNumber = renderSortNumber;
975
- } else {
976
- customMap[colKey] = {
977
- renderSortNumber
978
- };
979
- }
980
- if (!hasCustomSort) {
981
- hasCustomSort = true;
982
- }
983
- });
984
- }
943
+ let storeData = getCustomStorageMap(id);
944
+ if (restoreStore) {
945
+ storeData = yield restoreStore({
946
+ id,
947
+ type: 'restore',
948
+ storeData
949
+ });
985
950
  }
986
- // 自定义隐藏列
987
- if (isCustomVisible) {
988
- const columnVisibleStorage = getCustomStorageMap(visibleStorageKey)[id];
989
- if (columnVisibleStorage) {
990
- const colVisibles = columnVisibleStorage.split('|');
991
- const colHides = colVisibles[0] ? colVisibles[0].split(',') : [];
992
- const colShows = colVisibles[1] ? colVisibles[1].split(',') : [];
993
- colHides.forEach(colKey => {
994
- if (customMap[colKey]) {
995
- customMap[colKey].visible = false;
996
- } else {
997
- customMap[colKey] = {
998
- visible: false
999
- };
1000
- }
1001
- });
1002
- colShows.forEach(colKey => {
1003
- if (customMap[colKey]) {
1004
- customMap[colKey].visible = true;
1005
- } else {
1006
- customMap[colKey] = {
1007
- visible: true
1008
- };
1009
- }
1010
- });
1011
- }
951
+ if (!storeData) {
952
+ return;
1012
953
  }
1013
954
  let {
1014
955
  collectColumn
1015
956
  } = internalData;
1016
- const keyMap = {};
1017
- _xeUtils.default.eachTree(collectColumn, column => {
1018
- const colKey = column.getKey();
1019
- if (colKey) {
1020
- keyMap[colKey] = column;
1021
- }
1022
- });
1023
- _xeUtils.default.each(customMap, ({
1024
- visible,
1025
- resizeWidth,
1026
- fixed,
1027
- renderSortNumber
1028
- }, colKey) => {
1029
- const column = keyMap[colKey];
1030
- if (column) {
1031
- if (_xeUtils.default.isNumber(resizeWidth)) {
1032
- column.resizeWidth = resizeWidth;
957
+ const {
958
+ resizableData,
959
+ sortData,
960
+ visibleData,
961
+ fixedData
962
+ } = storeData;
963
+ let hasCustomSort = false;
964
+ // 处理还原
965
+ if (resizableData || sortData || visibleData || fixedData) {
966
+ tableFullColumn.forEach(column => {
967
+ const colKey = column.getKey();
968
+ if (resizableData && _xeUtils.default.isNumber(resizableData[colKey])) {
969
+ column.resizeWidth = resizableData[colKey];
1033
970
  }
1034
- if (_xeUtils.default.isBoolean(visible)) {
1035
- column.visible = visible;
971
+ if (visibleData && _xeUtils.default.isBoolean(visibleData[colKey])) {
972
+ column.visible = visibleData[colKey];
1036
973
  }
1037
- if (fixed) {
1038
- column.fixed = fixed;
974
+ if (fixedData && fixedData[colKey]) {
975
+ column.fixed = fixedData[colKey];
1039
976
  }
1040
- if (renderSortNumber) {
1041
- column.renderSortNumber = Number(renderSortNumber);
977
+ if (sortData && _xeUtils.default.isNumber(sortData[colKey])) {
978
+ hasCustomSort = true;
979
+ column.renderSortNumber = sortData[colKey];
1042
980
  }
981
+ });
982
+ // 如果自定义了顺序
983
+ if (hasCustomSort) {
984
+ collectColumn = _xeUtils.default.orderBy(collectColumn, 'renderSortNumber');
985
+ internalData.collectColumn = collectColumn;
986
+ internalData.tableFullColumn = getColumnList(collectColumn);
1043
987
  }
1044
- });
1045
- // 如果自定义了顺序
1046
- if (hasCustomSort) {
1047
- collectColumn = _xeUtils.default.orderBy(collectColumn, 'renderSortNumber');
1048
- internalData.collectColumn = collectColumn;
1049
- internalData.tableFullColumn = getColumnList(collectColumn);
1050
988
  }
1051
989
  }
1052
- };
990
+ });
1053
991
  /**
1054
992
  * 更新数据列的 Map
1055
993
  * 牺牲数据组装的耗时,用来换取使用过程中的流畅
@@ -2912,30 +2850,33 @@ var _default = exports.default = (0, _vue.defineComponent)({
2912
2850
  internalData.collectColumn = collectColumn;
2913
2851
  const tableFullColumn = getColumnList(collectColumn);
2914
2852
  internalData.tableFullColumn = tableFullColumn;
2853
+ reactData._isLoading = true;
2915
2854
  initColumnSort();
2916
- restoreCustomStorage();
2917
- cacheColumnMap();
2918
- parseColumns().then(() => {
2919
- if (reactData.scrollXLoad) {
2920
- loadScrollXData();
2921
- }
2922
- });
2923
- tableMethods.clearMergeCells();
2924
- tableMethods.clearMergeFooterItems();
2925
- tablePrivateMethods.handleTableData(true);
2926
- if (process.env.NODE_ENV === 'development') {
2927
- if ((reactData.scrollXLoad || reactData.scrollYLoad) && reactData.expandColumn) {
2928
- (0, _log.warnLog)('vxe.error.scrollErrProp', ['column.type=expand']);
2929
- }
2930
- }
2931
- return (0, _vue.nextTick)().then(() => {
2932
- if ($xeToolbar) {
2933
- $xeToolbar.syncUpdate({
2934
- collectColumn,
2935
- $table: $xeTable
2936
- });
2855
+ return restoreCustomStorage().then(() => {
2856
+ reactData._isLoading = false;
2857
+ cacheColumnMap();
2858
+ parseColumns().then(() => {
2859
+ if (reactData.scrollXLoad) {
2860
+ loadScrollXData();
2861
+ }
2862
+ });
2863
+ tableMethods.clearMergeCells();
2864
+ tableMethods.clearMergeFooterItems();
2865
+ tablePrivateMethods.handleTableData(true);
2866
+ if (process.env.NODE_ENV === 'development') {
2867
+ if ((reactData.scrollXLoad || reactData.scrollYLoad) && reactData.expandColumn) {
2868
+ (0, _log.warnLog)('vxe.error.scrollErrProp', ['column.type=expand']);
2869
+ }
2937
2870
  }
2938
- return tableMethods.recalculate();
2871
+ return (0, _vue.nextTick)().then(() => {
2872
+ if ($xeToolbar) {
2873
+ $xeToolbar.syncUpdate({
2874
+ collectColumn,
2875
+ $table: $xeTable
2876
+ });
2877
+ }
2878
+ return tableMethods.recalculate();
2879
+ });
2939
2880
  });
2940
2881
  };
2941
2882
  const updateScrollYStatus = fullData => {
@@ -3781,7 +3722,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
3781
3722
  _xeUtils.default.eachTree([targetColumn], column => {
3782
3723
  column.fixed = fixed;
3783
3724
  });
3784
- tablePrivateMethods.saveCustomFixed();
3725
+ tablePrivateMethods.saveCustomStore('update:fixed');
3785
3726
  return tableMethods.refreshColumn();
3786
3727
  }
3787
3728
  return (0, _vue.nextTick)();
@@ -3796,7 +3737,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
3796
3737
  _xeUtils.default.eachTree([targetColumn], column => {
3797
3738
  column.fixed = null;
3798
3739
  });
3799
- tablePrivateMethods.saveCustomFixed();
3740
+ tablePrivateMethods.saveCustomStore('update:fixed');
3800
3741
  return tableMethods.refreshColumn();
3801
3742
  }
3802
3743
  return (0, _vue.nextTick)();
@@ -3881,15 +3822,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
3881
3822
  }
3882
3823
  column.renderResizeWidth = column.renderWidth;
3883
3824
  });
3884
- if (opts.resizable) {
3885
- tablePrivateMethods.saveCustomResizable(true);
3886
- }
3887
- if (opts.sort) {
3888
- tablePrivateMethods.saveCustomSort(true);
3889
- }
3890
- if (opts.fixed) {
3891
- tablePrivateMethods.saveCustomFixed();
3892
- }
3825
+ $xeTable.saveCustomStore('reset');
3893
3826
  return tablePrivateMethods.handleCustom();
3894
3827
  },
3895
3828
  /**
@@ -5244,21 +5177,26 @@ var _default = exports.default = (0, _vue.defineComponent)({
5244
5177
  const visibleData = {};
5245
5178
  const fixedData = {};
5246
5179
  const storeData = {
5247
- resizableData,
5248
- sortData,
5249
- visibleData,
5250
- fixedData
5180
+ resizableData: undefined,
5181
+ sortData: undefined,
5182
+ visibleData: undefined,
5183
+ fixedData: undefined
5251
5184
  };
5252
5185
  if (!id) {
5253
5186
  (0, _log.errLog)('vxe.error.reqProp', ['id']);
5254
5187
  return storeData;
5255
5188
  }
5189
+ let hasResizable = 0;
5190
+ let hasSort = 0;
5191
+ let hasFixedt = 0;
5192
+ let hasVisible = 0;
5256
5193
  _xeUtils.default.eachTree(collectColumn, (column, index, items, path, parent) => {
5257
5194
  // 排序只支持一级
5258
5195
  if (!parent) {
5259
5196
  collectColumn.forEach(column => {
5260
5197
  const colKey = column.getKey();
5261
5198
  if (colKey) {
5199
+ hasSort = 1;
5262
5200
  sortData[colKey] = column.renderSortNumber;
5263
5201
  }
5264
5202
  });
@@ -5266,12 +5204,14 @@ var _default = exports.default = (0, _vue.defineComponent)({
5266
5204
  if (column.resizeWidth) {
5267
5205
  const colKey = column.getKey();
5268
5206
  if (colKey) {
5207
+ hasResizable = 1;
5269
5208
  resizableData[colKey] = column.renderWidth;
5270
5209
  }
5271
5210
  }
5272
5211
  if (column.fixed && column.fixed !== column.defaultFixed) {
5273
5212
  const colKey = column.getKey();
5274
5213
  if (colKey) {
5214
+ hasFixedt = 1;
5275
5215
  fixedData[colKey] = column.fixed;
5276
5216
  }
5277
5217
  }
@@ -5281,16 +5221,30 @@ var _default = exports.default = (0, _vue.defineComponent)({
5281
5221
  if (!column.visible && column.defaultVisible) {
5282
5222
  const colKey = column.getKey();
5283
5223
  if (colKey) {
5224
+ hasVisible = 1;
5284
5225
  visibleData[colKey] = false;
5285
5226
  }
5286
5227
  } else if (column.visible && !column.defaultVisible) {
5287
5228
  const colKey = column.getKey();
5288
5229
  if (colKey) {
5230
+ hasVisible = 1;
5289
5231
  visibleData[colKey] = true;
5290
5232
  }
5291
5233
  }
5292
5234
  }
5293
5235
  });
5236
+ if (hasResizable) {
5237
+ storeData.resizableData = resizableData;
5238
+ }
5239
+ if (hasSort) {
5240
+ storeData.sortData = sortData;
5241
+ }
5242
+ if (hasFixedt) {
5243
+ storeData.fixedData = fixedData;
5244
+ }
5245
+ if (hasVisible) {
5246
+ storeData.visibleData = visibleData;
5247
+ }
5294
5248
  return storeData;
5295
5249
  },
5296
5250
  focus() {
@@ -6194,157 +6148,43 @@ var _default = exports.default = (0, _vue.defineComponent)({
6194
6148
  autoList
6195
6149
  });
6196
6150
  },
6197
- saveCustomResizable(isReset) {
6198
- const {
6199
- id,
6200
- customConfig
6201
- } = props;
6202
- const customOpts = computeCustomOpts.value;
6203
- const {
6204
- collectColumn
6205
- } = internalData;
6206
- const {
6207
- storage
6208
- } = customOpts;
6209
- const isAllStorage = storage === true;
6210
- const storageOpts = isAllStorage ? {} : Object.assign({}, storage || {});
6211
- const isResizable = isAllStorage || storageOpts.resizable;
6212
- if (customConfig && isResizable) {
6213
- const columnWidthStorageMap = getCustomStorageMap(resizableStorageKey);
6214
- let columnWidthStorage;
6215
- if (!id) {
6216
- (0, _log.errLog)('vxe.error.reqProp', ['id']);
6217
- return;
6218
- }
6219
- if (!isReset) {
6220
- columnWidthStorage = _xeUtils.default.isPlainObject(columnWidthStorageMap[id]) ? columnWidthStorageMap[id] : {};
6221
- _xeUtils.default.eachTree(collectColumn, column => {
6222
- if (column.resizeWidth) {
6223
- const colKey = column.getKey();
6224
- if (colKey) {
6225
- columnWidthStorage[colKey] = column.renderWidth;
6226
- }
6227
- }
6228
- });
6229
- }
6230
- columnWidthStorageMap[id] = _xeUtils.default.isEmpty(columnWidthStorage) ? undefined : columnWidthStorage;
6231
- localStorage.setItem(resizableStorageKey, _xeUtils.default.toJSONString(columnWidthStorageMap));
6232
- }
6233
- },
6234
- saveCustomSort(isReset) {
6151
+ saveCustomStore(type) {
6235
6152
  const {
6236
- id,
6237
- customConfig
6153
+ id
6238
6154
  } = props;
6239
6155
  const customOpts = computeCustomOpts.value;
6240
6156
  const {
6241
- collectColumn
6242
- } = internalData;
6243
- const {
6157
+ updateStore,
6244
6158
  storage
6245
6159
  } = customOpts;
6246
- const isAllStorage = storage === true;
6247
- const storageOpts = isAllStorage ? {} : Object.assign({}, storage || {});
6248
- const isSort = isAllStorage || storageOpts.sort;
6249
- if (customConfig && isSort) {
6250
- const columnSortStorageMap = getCustomStorageMap(sortStorageKey);
6251
- let columnWidthStorage;
6160
+ const isAllCustom = storage === true;
6161
+ const storageOpts = isAllCustom ? {} : Object.assign({}, storage || {});
6162
+ const isCustomResizable = isAllCustom || storageOpts.resizable;
6163
+ const isCustomVisible = isAllCustom || storageOpts.visible;
6164
+ const isCustomFixed = isAllCustom || storageOpts.fixed;
6165
+ const isCustomSort = isAllCustom || storageOpts.sort;
6166
+ if (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort) {
6252
6167
  if (!id) {
6253
6168
  (0, _log.errLog)('vxe.error.reqProp', ['id']);
6254
- return;
6169
+ return (0, _vue.nextTick)();
6255
6170
  }
6256
- if (!isReset) {
6257
- columnWidthStorage = _xeUtils.default.isPlainObject(columnSortStorageMap[id]) ? columnSortStorageMap[id] : {};
6258
- // 排序只支持一级
6259
- collectColumn.forEach(column => {
6260
- const colKey = column.getKey();
6261
- if (colKey) {
6262
- columnWidthStorage[colKey] = column.renderSortNumber;
6263
- }
6171
+ const storeData = type === 'reset' ? {
6172
+ resizableData: {},
6173
+ sortData: {},
6174
+ visibleData: {},
6175
+ fixedData: {}
6176
+ } : tableMethods.getCustomStoreData();
6177
+ if (updateStore) {
6178
+ return updateStore({
6179
+ id,
6180
+ type,
6181
+ storeData
6264
6182
  });
6183
+ } else {
6184
+ setCustomStorageMap(id, type === 'reset' ? null : storeData);
6265
6185
  }
6266
- columnSortStorageMap[id] = _xeUtils.default.isEmpty(columnWidthStorage) ? undefined : columnWidthStorage;
6267
- localStorage.setItem(sortStorageKey, _xeUtils.default.toJSONString(columnSortStorageMap));
6268
- }
6269
- },
6270
- saveCustomFixed() {
6271
- const {
6272
- id,
6273
- customConfig
6274
- } = props;
6275
- const {
6276
- collectColumn
6277
- } = internalData;
6278
- const customOpts = computeCustomOpts.value;
6279
- const {
6280
- storage
6281
- } = customOpts;
6282
- const isAllStorage = storage === true;
6283
- const storageOpts = isAllStorage ? {} : Object.assign({}, storage || {});
6284
- const isCustomFixed = isAllStorage || storageOpts.fixed;
6285
- if (customConfig && isCustomFixed) {
6286
- const columnFixedStorageMap = getCustomStorageMap(fixedStorageKey);
6287
- const colFixeds = [];
6288
- if (!id) {
6289
- (0, _log.errLog)('vxe.error.reqProp', ['id']);
6290
- return;
6291
- }
6292
- _xeUtils.default.eachTree(collectColumn, column => {
6293
- if (column.fixed && column.fixed !== column.defaultFixed) {
6294
- const colKey = column.getKey();
6295
- if (colKey) {
6296
- colFixeds.push(`${colKey}|${column.fixed}`);
6297
- }
6298
- }
6299
- });
6300
- columnFixedStorageMap[id] = colFixeds.join(',') || undefined;
6301
- localStorage.setItem(fixedStorageKey, _xeUtils.default.toJSONString(columnFixedStorageMap));
6302
- }
6303
- },
6304
- saveCustomVisible() {
6305
- const {
6306
- id,
6307
- customConfig
6308
- } = props;
6309
- const {
6310
- collectColumn
6311
- } = internalData;
6312
- const customOpts = computeCustomOpts.value;
6313
- const {
6314
- checkMethod,
6315
- storage
6316
- } = customOpts;
6317
- const isAllStorage = storage === true;
6318
- const storageOpts = isAllStorage ? {} : Object.assign({}, storage || {});
6319
- const isCustomVisible = isAllStorage || storageOpts.visible;
6320
- if (customConfig && isCustomVisible) {
6321
- const columnVisibleStorageMap = getCustomStorageMap(visibleStorageKey);
6322
- const colHides = [];
6323
- const colShows = [];
6324
- if (!id) {
6325
- (0, _log.errLog)('vxe.error.reqProp', ['id']);
6326
- return;
6327
- }
6328
- _xeUtils.default.eachTree(collectColumn, column => {
6329
- if (!checkMethod || checkMethod({
6330
- column
6331
- })) {
6332
- if (!column.visible && column.defaultVisible) {
6333
- const colKey = column.getKey();
6334
- if (colKey) {
6335
- colHides.push(colKey);
6336
- }
6337
- } else if (column.visible && !column.defaultVisible) {
6338
- const colKey = column.getKey();
6339
- if (colKey) {
6340
- colShows.push(colKey);
6341
- }
6342
- }
6343
- }
6344
- });
6345
- columnVisibleStorageMap[id] = [colHides.join(',')].concat(colShows.length ? [colShows.join(',')] : []).join('|') || undefined;
6346
- localStorage.setItem(visibleStorageKey, _xeUtils.default.toJSONString(columnVisibleStorageMap));
6347
6186
  }
6187
+ return (0, _vue.nextTick)();
6348
6188
  },
6349
6189
  handleCustom() {
6350
6190
  const {
@@ -6359,8 +6199,6 @@ var _default = exports.default = (0, _vue.defineComponent)({
6359
6199
  $xeTable.clearCopyCellArea();
6360
6200
  }
6361
6201
  }
6362
- tablePrivateMethods.saveCustomVisible();
6363
- tablePrivateMethods.saveCustomSort();
6364
6202
  tablePrivateMethods.analyColumnWidth();
6365
6203
  return tableMethods.refreshColumn(true);
6366
6204
  },
@@ -8000,6 +7838,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
8000
7838
  const validTipOpts = computeValidTipOpts.value;
8001
7839
  const loadingOpts = computeLoadingOpts.value;
8002
7840
  const isMenu = computeIsMenu.value;
7841
+ const currLoading = reactData._isLoading || loading;
8003
7842
  return (0, _vue.h)('div', {
8004
7843
  ref: refElem,
8005
7844
  class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, {
@@ -8021,8 +7860,8 @@ var _default = exports.default = (0, _vue.defineComponent)({
8021
7860
  'is--animat': !!props.animat,
8022
7861
  'is--round': props.round,
8023
7862
  'is--stripe': !treeConfig && stripe,
8024
- 'is--loading': loading,
8025
- 'is--empty': !loading && !tableData.length,
7863
+ 'is--loading': currLoading,
7864
+ 'is--empty': !currLoading && !tableData.length,
8026
7865
  'is--scroll-y': overflowY,
8027
7866
  'is--scroll-x': overflowX,
8028
7867
  'is--virtual-x': scrollXLoad,
@@ -8105,7 +7944,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
8105
7944
  */
8106
7945
  (0, _vue.h)((0, _vue.resolveComponent)('vxe-loading'), {
8107
7946
  class: 'vxe-table--loading',
8108
- modelValue: loading,
7947
+ modelValue: currLoading,
8109
7948
  icon: loadingOpts.icon,
8110
7949
  text: loadingOpts.text
8111
7950
  }, loadingSlot ? {