vxe-table 3.8.17 → 3.8.18

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/index.umd.js CHANGED
@@ -11513,7 +11513,7 @@ var es_array_concat = __webpack_require__(8706);
11513
11513
 
11514
11514
 
11515
11515
  function getLog(message, params) {
11516
- return "[vxe-table v".concat("3.8.17", "] ").concat(conf.i18n(message, params));
11516
+ return "[vxe-table v".concat("3.8.18", "] ").concat(conf.i18n(message, params));
11517
11517
  }
11518
11518
  function outLog(type) {
11519
11519
  return function (message, params) {
@@ -13217,7 +13217,7 @@ function component(comp) {
13217
13217
  components[comp.name] = comp;
13218
13218
  }
13219
13219
  }
13220
- var version = "3.8.17";
13220
+ var version = "3.8.18";
13221
13221
  var tableVersion = version;
13222
13222
  var VxeUI = {
13223
13223
  v: v,
@@ -18622,7 +18622,6 @@ var Methods = {
18622
18622
  return this.refreshColumn(true);
18623
18623
  },
18624
18624
  handleCustomRestore: function handleCustomRestore(storeData) {
18625
- var tableFullColumn = this.tableFullColumn;
18626
18625
  var collectColumn = this.collectColumn;
18627
18626
  var resizableData = storeData.resizableData,
18628
18627
  sortData = storeData.sortData,
@@ -18631,7 +18630,7 @@ var Methods = {
18631
18630
  var hasCustomSort = false;
18632
18631
  // 处理还原
18633
18632
  if (resizableData || sortData || visibleData || fixedData) {
18634
- tableFullColumn.forEach(function (column) {
18633
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, function (column, index, items, path, parent) {
18635
18634
  var colKey = column.getKey();
18636
18635
  // 支持一级
18637
18636
  if (!parent) {
@@ -18663,7 +18662,7 @@ var Methods = {
18663
18662
  */
18664
18663
  restoreCustomStorage: function restoreCustomStorage() {
18665
18664
  var _this21 = this;
18666
- var id = this.id,
18665
+ var tableId = this.tableId,
18667
18666
  customConfig = this.customConfig,
18668
18667
  customOpts = this.customOpts;
18669
18668
  var storage = customOpts.storage,
@@ -18675,14 +18674,14 @@ var Methods = {
18675
18674
  var isCustomFixed = isAllCustom || storageOpts.fixed;
18676
18675
  var isCustomSort = isAllCustom || storageOpts.sort;
18677
18676
  if (customConfig && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
18678
- if (!id) {
18677
+ if (!tableId) {
18679
18678
  errLog('vxe.error.reqProp', ['id']);
18680
18679
  return;
18681
18680
  }
18682
- var storeData = getCustomStorageMap(id);
18681
+ var storeData = getCustomStorageMap(tableId);
18683
18682
  if (restoreStore) {
18684
18683
  return Promise.resolve(restoreStore({
18685
- id: id,
18684
+ id: tableId,
18686
18685
  type: 'restore',
18687
18686
  storeData: storeData
18688
18687
  })).then(function (storeData) {
@@ -18779,7 +18778,7 @@ var Methods = {
18779
18778
  return storeData;
18780
18779
  },
18781
18780
  saveCustomStore: function saveCustomStore(type) {
18782
- var id = this.id,
18781
+ var tableId = this.tableId,
18783
18782
  customOpts = this.customOpts;
18784
18783
  var updateStore = customOpts.updateStore,
18785
18784
  storage = customOpts.storage;
@@ -18790,7 +18789,7 @@ var Methods = {
18790
18789
  var isCustomFixed = isAllCustom || storageOpts.fixed;
18791
18790
  var isCustomSort = isAllCustom || storageOpts.sort;
18792
18791
  if (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort) {
18793
- if (!id) {
18792
+ if (!tableId) {
18794
18793
  errLog('vxe.error.reqProp', ['id']);
18795
18794
  return this.$nextTick();
18796
18795
  }
@@ -18802,12 +18801,12 @@ var Methods = {
18802
18801
  } : this.getCustomStoreData();
18803
18802
  if (updateStore) {
18804
18803
  return updateStore({
18805
- id: id,
18804
+ id: tableId,
18806
18805
  type: type,
18807
18806
  storeData: storeData
18808
18807
  });
18809
18808
  } else {
18810
- setCustomStorageMap(id, type === 'reset' ? null : storeData);
18809
+ setCustomStorageMap(tableId, type === 'reset' ? null : storeData);
18811
18810
  }
18812
18811
  }
18813
18812
  return this.$nextTick();
@@ -23207,7 +23206,7 @@ function handleUupdateResize(_vm) {
23207
23206
  mixins: [size],
23208
23207
  props: {
23209
23208
  /** 基本属性 */
23210
- id: String,
23209
+ id: [String, Function],
23211
23210
  // 数据
23212
23211
  data: Array,
23213
23212
  // 表格的高度
@@ -23723,6 +23722,18 @@ function handleUupdateResize(_vm) {
23723
23722
  };
23724
23723
  },
23725
23724
  computed: {
23725
+ tableId: function tableId() {
23726
+ var id = this.id;
23727
+ if (id) {
23728
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(id)) {
23729
+ return "".concat(id({
23730
+ $table: this
23731
+ }) || '');
23732
+ }
23733
+ return "".concat(id);
23734
+ }
23735
+ return '';
23736
+ },
23726
23737
  validOpts: function validOpts() {
23727
23738
  return Object.assign({
23728
23739
  message: 'default'
@@ -24362,7 +24373,7 @@ function handleUupdateResize(_vm) {
24362
24373
  ctxMenuStore: ctxMenuStore,
24363
24374
  ctxMenuOpts: ctxMenuOpts
24364
24375
  }
24365
- }) : _e(),
24376
+ }) : _e(), h('div', {}, [
24366
24377
  /**
24367
24378
  * 通用提示
24368
24379
  */
@@ -24389,7 +24400,7 @@ function handleUupdateResize(_vm) {
24389
24400
  'old-cell-valid': editRules && conf.cellVaildMode === 'obsolete'
24390
24401
  }, 'vxe-table--valid-error'],
24391
24402
  props: validOpts.message === 'tooltip' || tableData.length === 1 ? validTipOpts : null
24392
- }) : _e()]);
24403
+ }) : _e()])]);
24393
24404
  },
24394
24405
  methods: methods
24395
24406
  });