vxe-table 3.5.0-beta.1 → 3.5.0-beta.4

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
@@ -8430,7 +8430,7 @@ var iconPrefix = 'vxe-icon--';
8430
8430
  // name: ''
8431
8431
  // },
8432
8432
  // rowConfig: {
8433
- // keyField: '_X_ID' // 行数据的唯一主键字段名
8433
+ // keyField: '_X_ROW_KEY' // 行数据的唯一主键字段名
8434
8434
  // },
8435
8435
  radioConfig: {
8436
8436
  // trigger: 'default'
@@ -8471,7 +8471,7 @@ var iconPrefix = 'vxe-icon--';
8471
8471
  parentField: 'parentId',
8472
8472
  children: 'children',
8473
8473
  hasChild: 'hasChild',
8474
- mapChildren: '_X_CHILD',
8474
+ mapChildren: '_X_ROW_CHILD',
8475
8475
  indent: 20,
8476
8476
  showIcon: true
8477
8477
  },
@@ -8671,6 +8671,9 @@ var iconPrefix = 'vxe-icon--';
8671
8671
  select: {
8672
8672
  // size: null,
8673
8673
  // transfer: false,
8674
+ // optionConfig: {
8675
+ // keyField: '_X_OPTION_KEY'
8676
+ // },
8674
8677
  multiCharOverflow: 8
8675
8678
  },
8676
8679
  toolbar: {// size: null,
@@ -8753,7 +8756,7 @@ var es_array_concat = __webpack_require__("99af");
8753
8756
 
8754
8757
 
8755
8758
  function getLog(message, params) {
8756
- return "[vxe-table v".concat("3.5.0-beta.1", "] ").concat(conf.i18n(message, params));
8759
+ return "[vxe-table v".concat("3.5.0-beta.4", "] ").concat(conf.i18n(message, params));
8757
8760
  }
8758
8761
 
8759
8762
  function outLog(type) {
@@ -8959,10 +8962,6 @@ function eqEmptyValue(cellValue) {
8959
8962
  }
8960
8963
  function getFuncText(content) {
8961
8964
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(content) ? content() : conf.translate ? conf.translate(content) : content;
8962
- } // 行主键 key
8963
-
8964
- function getRowkey($xetable) {
8965
- return $xetable.rowOpts.keyField || $xetable.rowId || '_X_ID';
8966
8965
  } // 获取所有的列,排除分组
8967
8966
 
8968
8967
  function getColumnList(columns) {
@@ -8980,12 +8979,6 @@ var UtilTools = {
8980
8979
  getLastZIndex: function getLastZIndex() {
8981
8980
  return lastZindex;
8982
8981
  },
8983
- getRowkey: getRowkey,
8984
- // 行主键 value
8985
- getRowid: function getRowid($xetable, row) {
8986
- var rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, getRowkey($xetable));
8987
- return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eqNull(rowid) ? '' : encodeURIComponent(rowid);
8988
- },
8989
8982
  getColumnList: getColumnList,
8990
8983
  getClass: function getClass(property, params) {
8991
8984
  return property ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(property) ? property(params) : property : '';
@@ -10032,7 +10025,7 @@ function _t(key, args) {
10032
10025
  var v = 'v3';
10033
10026
  var VXETable = {
10034
10027
  v: v,
10035
- version: "3.5.0-beta.1",
10028
+ version: "3.5.0-beta.4",
10036
10029
  reg: reg,
10037
10030
  use: use,
10038
10031
  setup: setup,
@@ -10291,7 +10284,7 @@ var es_promise = __webpack_require__("e6cf");
10291
10284
 
10292
10285
 
10293
10286
 
10294
- var dom_getRowid = utils.getRowid;
10287
+ var getRowid = utils.getRowid;
10295
10288
  var browse = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.browse();
10296
10289
  var reClsMap = {};
10297
10290
 
@@ -10406,7 +10399,7 @@ var DomTools = {
10406
10399
  var bodyElem = tableBody ? tableBody.$el : null;
10407
10400
 
10408
10401
  if (bodyElem) {
10409
- var trElem = bodyElem.querySelector("[rowid=\"".concat(dom_getRowid($xetable, row), "\"]"));
10402
+ var trElem = bodyElem.querySelector("[rowid=\"".concat(getRowid($xetable, row), "\"]"));
10410
10403
 
10411
10404
  if (trElem) {
10412
10405
  var bodyHeight = bodyElem.clientHeight;
@@ -10609,6 +10602,15 @@ function restoreScrollListener(scrollElem) {
10609
10602
  if (scrollElem && scrollElem._onscroll) {
10610
10603
  scrollElem.onscroll = scrollElem._onscroll;
10611
10604
  }
10605
+ } // 行主键 key
10606
+
10607
+ function getRowkey($xetable) {
10608
+ return $xetable.rowOpts.keyField || $xetable.rowId || '_X_ROW_KEY';
10609
+ } // 行主键 value
10610
+
10611
+ function util_getRowid($xetable, row) {
10612
+ var rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, getRowkey($xetable));
10613
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eqNull(rowid) ? '' : encodeURIComponent(rowid);
10612
10614
  }
10613
10615
 
10614
10616
  function getPaddingLeftRightSize(elem) {
@@ -10860,7 +10862,7 @@ function renderLine(h, _vm, $xetable, params) {
10860
10862
  fullAllDataRowIdData = $xetable.fullAllDataRowIdData;
10861
10863
  var slots = column.slots,
10862
10864
  treeNode = column.treeNode;
10863
- var rowid = utils.getRowid($xetable, row);
10865
+ var rowid = util_getRowid($xetable, row);
10864
10866
  var rest = fullAllDataRowIdData[rowid];
10865
10867
  var rLevel = 0;
10866
10868
  var rIndex = 0;
@@ -11208,7 +11210,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
11208
11210
  };
11209
11211
  }
11210
11212
 
11211
- var rowid = utils.getRowid($xetable, row);
11213
+ var rowid = util_getRowid($xetable, row);
11212
11214
  var rest = fullAllDataRowIdData[rowid];
11213
11215
  var rowLevel = rest ? rest.level : 0;
11214
11216
  var seq = rest ? rest.seq : -1;
@@ -12930,9 +12932,7 @@ var Cell = {
12930
12932
 
12931
12933
 
12932
12934
 
12933
- var methods_getRowid = utils.getRowid,
12934
- methods_getRowkey = utils.getRowkey,
12935
- methods_setCellValue = utils.setCellValue,
12935
+ var methods_setCellValue = utils.setCellValue,
12936
12936
  hasChildrenList = utils.hasChildrenList,
12937
12937
  methods_getColumnList = utils.getColumnList;
12938
12938
  var methods_calcHeight = dom.calcHeight,
@@ -12962,8 +12962,7 @@ function eqCellValue(row1, row2, field) {
12962
12962
  }
12963
12963
 
12964
12964
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(val1) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNumber(val1)) {
12965
- /* eslint-disable eqeqeq */
12966
- return val1 == val2;
12965
+ return '' + val1 === '' + val2;
12967
12966
  }
12968
12967
 
12969
12968
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isEqual(val1, val2);
@@ -13367,7 +13366,7 @@ var Methods = {
13367
13366
 
13368
13367
  var tableData = scrollYLoad ? fullList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullList.slice(0);
13369
13368
  tableData.forEach(function (row, $index) {
13370
- var rowid = methods_getRowid(_this3, row);
13369
+ var rowid = util_getRowid(_this3, row);
13371
13370
  var rest = fullDataRowIdData[rowid];
13372
13371
 
13373
13372
  if (rest) {
@@ -13644,11 +13643,11 @@ var Methods = {
13644
13643
  tableFullTreeData = this.tableFullTreeData;
13645
13644
  var fullDataRowIdData = this.fullDataRowIdData,
13646
13645
  fullAllDataRowIdData = this.fullAllDataRowIdData;
13647
- var rowkey = methods_getRowkey(this);
13646
+ var rowkey = getRowkey(this);
13648
13647
  var isLazy = treeConfig && treeOpts.lazy;
13649
13648
 
13650
13649
  var handleCache = function handleCache(row, index, items, path, parent, nodes) {
13651
- var rowid = methods_getRowid(_this10, row);
13650
+ var rowid = util_getRowid(_this10, row);
13652
13651
  var seq = treeConfig && path ? toTreePathSeq(path) : index + 1;
13653
13652
  var level = nodes ? nodes.length - 1 : 0;
13654
13653
 
@@ -13709,13 +13708,13 @@ var Methods = {
13709
13708
  var transform = treeOpts.transform,
13710
13709
  children = treeOpts.children,
13711
13710
  mapChildren = treeOpts.mapChildren;
13712
- var rest = fullAllDataRowIdData[methods_getRowid(this, row)];
13711
+ var rest = fullAllDataRowIdData[util_getRowid(this, row)];
13713
13712
  var parentLevel = rest ? rest.level : 0;
13714
13713
  return this.createData(childRecords).then(function (rows) {
13715
13714
  if (keepSource) {
13716
- var rowid = methods_getRowid(_this11, row);
13715
+ var rowid = util_getRowid(_this11, row);
13717
13716
  var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableSourceData, function (item) {
13718
- return rowid === methods_getRowid(_this11, item);
13717
+ return rowid === util_getRowid(_this11, item);
13719
13718
  }, treeOpts);
13720
13719
 
13721
13720
  if (matchObj) {
@@ -13724,7 +13723,7 @@ var Methods = {
13724
13723
  }
13725
13724
 
13726
13725
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(rows, function (childRow, index, items, path, parent, nodes) {
13727
- var rowid = methods_getRowid(_this11, childRow);
13726
+ var rowid = util_getRowid(_this11, childRow);
13728
13727
  var rest = {
13729
13728
  row: childRow,
13730
13729
  rowid: rowid,
@@ -13903,7 +13902,7 @@ var Methods = {
13903
13902
  var fullDataRowIdData = this.fullDataRowIdData;
13904
13903
 
13905
13904
  if (row) {
13906
- var rowid = methods_getRowid(this, row);
13905
+ var rowid = util_getRowid(this, row);
13907
13906
  var rest = fullDataRowIdData[rowid];
13908
13907
 
13909
13908
  if (rest) {
@@ -14004,7 +14003,7 @@ var Methods = {
14004
14003
  treeConfig = this.treeConfig,
14005
14004
  treeOpts = this.treeOpts,
14006
14005
  expandOpts = this.expandOpts;
14007
- var rowkey = methods_getRowkey(this);
14006
+ var rowkey = getRowkey(this);
14008
14007
  this.tableFullColumn.forEach(function (column) {
14009
14008
  var property = column.property,
14010
14009
  editRender = column.editRender;
@@ -14216,7 +14215,7 @@ var Methods = {
14216
14215
 
14217
14216
  if (keepSource) {
14218
14217
  var oRow, property;
14219
- var rowid = methods_getRowid(this, row); // 新增的数据不需要检测
14218
+ var rowid = util_getRowid(this, row); // 新增的数据不需要检测
14220
14219
 
14221
14220
  if (!fullDataRowIdData[rowid]) {
14222
14221
  return false;
@@ -14225,7 +14224,7 @@ var Methods = {
14225
14224
  if (treeConfig) {
14226
14225
  var children = treeOpts.children;
14227
14226
  var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableSourceData, function (item) {
14228
- return rowid === methods_getRowid(_this16, item);
14227
+ return rowid === util_getRowid(_this16, item);
14229
14228
  }, treeOpts);
14230
14229
  row = Object.assign({}, row, _defineProperty({}, children, null));
14231
14230
 
@@ -14615,7 +14614,7 @@ var Methods = {
14615
14614
 
14616
14615
  if (treeConfig) {
14617
14616
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(afterTreeFullData, function (row, index, items, path) {
14618
- var rowid = methods_getRowid(_this18, row);
14617
+ var rowid = util_getRowid(_this18, row);
14619
14618
  var allrest = fullAllDataRowIdData[rowid];
14620
14619
  var seq = path.map(function (num, i) {
14621
14620
  return i % 2 === 0 ? Number(num) + 1 : '.';
@@ -14644,7 +14643,7 @@ var Methods = {
14644
14643
  });
14645
14644
  } else {
14646
14645
  afterFullData.forEach(function (row, index) {
14647
- var rowid = methods_getRowid(_this18, row);
14646
+ var rowid = util_getRowid(_this18, row);
14648
14647
  var allrest = fullAllDataRowIdData[rowid];
14649
14648
  var seq = index + 1;
14650
14649
 
@@ -14683,7 +14682,7 @@ var Methods = {
14683
14682
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(rowOrRowid)) {
14684
14683
  rowid = rowOrRowid;
14685
14684
  } else {
14686
- rowid = methods_getRowid(this, rowOrRowid);
14685
+ rowid = util_getRowid(this, rowOrRowid);
14687
14686
  }
14688
14687
 
14689
14688
  if (rowid) {
@@ -16857,7 +16856,7 @@ var Methods = {
16857
16856
  if (reserve) {
16858
16857
  if (value) {
16859
16858
  selectRows.forEach(function (row) {
16860
- checkboxReserveRowMap[methods_getRowid(_this32, row)] = row;
16859
+ checkboxReserveRowMap[util_getRowid(_this32, row)] = row;
16861
16860
  });
16862
16861
  } else {
16863
16862
  afterFullData.forEach(function (row) {
@@ -16989,7 +16988,7 @@ var Methods = {
16989
16988
 
16990
16989
 
16991
16990
  if (radioOpts.reserve && radioReserveRow) {
16992
- var rowid = methods_getRowid(this, radioReserveRow);
16991
+ var rowid = util_getRowid(this, radioReserveRow);
16993
16992
 
16994
16993
  if (fullDataRowIdData[rowid]) {
16995
16994
  this.setRadioRow(fullDataRowIdData[rowid].row);
@@ -17036,14 +17035,14 @@ var Methods = {
17036
17035
  treeOpts = this.treeOpts;
17037
17036
 
17038
17037
  if (radioOpts.reserve && radioReserveRow) {
17039
- var rowid = methods_getRowid(this, radioReserveRow);
17038
+ var rowid = util_getRowid(this, radioReserveRow);
17040
17039
 
17041
17040
  if (isFull) {
17042
17041
  if (!fullDataRowIdData[rowid]) {
17043
17042
  return radioReserveRow;
17044
17043
  }
17045
17044
  } else {
17046
- var rowkey = methods_getRowkey(this);
17045
+ var rowkey = getRowkey(this);
17047
17046
 
17048
17047
  if (treeConfig) {
17049
17048
  var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(afterFullData, function (row) {
@@ -17096,11 +17095,11 @@ var Methods = {
17096
17095
 
17097
17096
  if (treeConfig) {
17098
17097
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(afterFullData, function (row) {
17099
- afterFullIdMaps[methods_getRowid(_this33, row)] = 1;
17098
+ afterFullIdMaps[util_getRowid(_this33, row)] = 1;
17100
17099
  }, treeOpts);
17101
17100
  } else {
17102
17101
  afterFullData.forEach(function (row) {
17103
- afterFullIdMaps[methods_getRowid(_this33, row)] = 1;
17102
+ afterFullIdMaps[util_getRowid(_this33, row)] = 1;
17104
17103
  });
17105
17104
  }
17106
17105
 
@@ -17130,7 +17129,7 @@ var Methods = {
17130
17129
  checkboxOpts = this.checkboxOpts;
17131
17130
 
17132
17131
  if (checkboxOpts.reserve) {
17133
- var rowid = methods_getRowid(this, row);
17132
+ var rowid = util_getRowid(this, row);
17134
17133
 
17135
17134
  if (checked) {
17136
17135
  checkboxReserveRowMap[rowid] = row;
@@ -17215,7 +17214,7 @@ var Methods = {
17215
17214
  }
17216
17215
 
17217
17216
  if (reserve) {
17218
- var rowkey = methods_getRowkey(this);
17217
+ var rowkey = getRowkey(this);
17219
17218
  this.radioReserveRow = _defineProperty({}, rowkey, rowid);
17220
17219
  }
17221
17220
  }
@@ -17276,7 +17275,7 @@ var Methods = {
17276
17275
 
17277
17276
  if (rowOpts.isCurrent || this.highlightCurrentRow) {
17278
17277
  if ($el) {
17279
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.arrayEach($el.querySelectorAll("[rowid=\"".concat(methods_getRowid(this, row), "\"]")), function (elem) {
17278
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.arrayEach($el.querySelectorAll("[rowid=\"".concat(util_getRowid(this, row), "\"]")), function (elem) {
17280
17279
  return addClass(elem, 'row--current');
17281
17280
  });
17282
17281
  }
@@ -17349,7 +17348,7 @@ var Methods = {
17349
17348
  afterFullData = this.afterFullData;
17350
17349
 
17351
17350
  if (selectRow) {
17352
- var rowid = methods_getRowid(this, selectRow);
17351
+ var rowid = util_getRowid(this, selectRow);
17353
17352
 
17354
17353
  if (isFull) {
17355
17354
  if (!fullDataRowIdData[rowid]) {
@@ -17357,7 +17356,7 @@ var Methods = {
17357
17356
  }
17358
17357
  } else {
17359
17358
  if (treeConfig) {
17360
- var rowkey = methods_getRowkey(this);
17359
+ var rowkey = getRowkey(this);
17361
17360
  var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(afterFullData, function (row) {
17362
17361
  return rowid === external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, rowkey);
17363
17362
  }, treeOpts);
@@ -17385,7 +17384,7 @@ var Methods = {
17385
17384
  },
17386
17385
  setHoverRow: function setHoverRow(row) {
17387
17386
  var $el = this.$el;
17388
- var rowid = methods_getRowid(this, row);
17387
+ var rowid = util_getRowid(this, row);
17389
17388
  this.clearHoverRow();
17390
17389
 
17391
17390
  if ($el) {
@@ -18104,7 +18103,7 @@ var Methods = {
18104
18103
  expandOpts = this.expandOpts;
18105
18104
 
18106
18105
  if (expandOpts.reserve) {
18107
- var rowid = methods_getRowid(this, row);
18106
+ var rowid = util_getRowid(this, row);
18108
18107
 
18109
18108
  if (expanded) {
18110
18109
  rowExpandedReserveRowMap[rowid] = row;
@@ -18249,7 +18248,7 @@ var Methods = {
18249
18248
  this.setAllTreeExpand(true);
18250
18249
  } else if (expandRowKeys) {
18251
18250
  var defExpandeds = [];
18252
- var rowkey = methods_getRowkey(this);
18251
+ var rowkey = getRowkey(this);
18253
18252
  expandRowKeys.forEach(function (rowid) {
18254
18253
  var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullData, function (item) {
18255
18254
  return rowid === external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(item, rowkey);
@@ -18518,7 +18517,7 @@ var Methods = {
18518
18517
  treeOpts = this.treeOpts;
18519
18518
 
18520
18519
  if (treeOpts.reserve) {
18521
- var rowid = methods_getRowid(this, row);
18520
+ var rowid = util_getRowid(this, row);
18522
18521
 
18523
18522
  if (expanded) {
18524
18523
  treeExpandedReserveRowMap[rowid] = row;
@@ -18689,8 +18688,14 @@ var Methods = {
18689
18688
  this.tableColumn = scrollXLoad ? visibleColumn.slice(scrollXStore.startIndex, scrollXStore.endIndex) : visibleColumn.slice(0);
18690
18689
  },
18691
18690
  updateScrollXData: function updateScrollXData() {
18692
- this.handleTableColumn();
18693
- this.updateScrollXSpace();
18691
+ var _this49 = this;
18692
+
18693
+ this.tableColumn = [];
18694
+ this.$nextTick(function () {
18695
+ _this49.handleTableColumn();
18696
+
18697
+ _this49.updateScrollXSpace();
18698
+ });
18694
18699
  },
18695
18700
  // 更新横向 X 可视渲染上下剩余空间大小
18696
18701
  updateScrollXSpace: function updateScrollXSpace() {
@@ -18746,8 +18751,14 @@ var Methods = {
18746
18751
  }
18747
18752
  },
18748
18753
  updateScrollYData: function updateScrollYData() {
18749
- this.handleTableData();
18750
- this.updateScrollYSpace();
18754
+ var _this50 = this;
18755
+
18756
+ this.tableData = [];
18757
+ this.$nextTick(function () {
18758
+ _this50.handleTableData();
18759
+
18760
+ _this50.updateScrollYSpace();
18761
+ });
18751
18762
  },
18752
18763
  // 更新纵向 Y 可视渲染上下剩余空间大小
18753
18764
  updateScrollYSpace: function updateScrollYSpace() {
@@ -18793,7 +18804,7 @@ var Methods = {
18793
18804
  * @param {Number} scrollTop 上距离
18794
18805
  */
18795
18806
  scrollTo: function scrollTo(scrollLeft, scrollTop) {
18796
- var _this49 = this;
18807
+ var _this51 = this;
18797
18808
 
18798
18809
  var $refs = this.$refs;
18799
18810
  var tableBody = $refs.tableBody,
@@ -18814,7 +18825,7 @@ var Methods = {
18814
18825
  if (this.scrollXLoad || this.scrollYLoad) {
18815
18826
  return new Promise(function (resolve) {
18816
18827
  return setTimeout(function () {
18817
- return resolve(_this49.$nextTick());
18828
+ return resolve(_this51.$nextTick());
18818
18829
  }, 50);
18819
18830
  });
18820
18831
  }
@@ -18865,7 +18876,7 @@ var Methods = {
18865
18876
  * @param {Row} row 行对象
18866
18877
  */
18867
18878
  scrollToTreeRow: function scrollToTreeRow(row) {
18868
- var _this50 = this;
18879
+ var _this52 = this;
18869
18880
 
18870
18881
  var tableFullData = this.tableFullData,
18871
18882
  treeConfig = this.treeConfig,
@@ -18880,15 +18891,15 @@ var Methods = {
18880
18891
  if (matchObj) {
18881
18892
  var nodes = matchObj.nodes;
18882
18893
  nodes.forEach(function (row, index) {
18883
- if (index < nodes.length - 1 && !_this50.isTreeExpandByRow(row)) {
18884
- rests.push(_this50.setTreeExpand(row, true));
18894
+ if (index < nodes.length - 1 && !_this52.isTreeExpandByRow(row)) {
18895
+ rests.push(_this52.setTreeExpand(row, true));
18885
18896
  }
18886
18897
  });
18887
18898
  }
18888
18899
  }
18889
18900
 
18890
18901
  return Promise.all(rests).then(function () {
18891
- return dom.rowToVisible(_this50, row);
18902
+ return dom.rowToVisible(_this52, row);
18892
18903
  });
18893
18904
  },
18894
18905
 
@@ -18952,29 +18963,29 @@ var Methods = {
18952
18963
  * 如果单元格配置了校验规则,则会进行校验
18953
18964
  */
18954
18965
  updateStatus: function updateStatus(scope, cellValue) {
18955
- var _this51 = this;
18966
+ var _this53 = this;
18956
18967
 
18957
18968
  var customVal = !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(cellValue);
18958
18969
  return this.$nextTick().then(function () {
18959
- var $refs = _this51.$refs,
18960
- editRules = _this51.editRules,
18961
- validStore = _this51.validStore;
18970
+ var $refs = _this53.$refs,
18971
+ editRules = _this53.editRules,
18972
+ validStore = _this53.validStore;
18962
18973
 
18963
18974
  if (scope && $refs.tableBody && editRules) {
18964
18975
  var row = scope.row,
18965
18976
  column = scope.column;
18966
18977
  var type = 'change';
18967
18978
 
18968
- if (_this51.hasCellRules(type, row, column)) {
18969
- var cell = _this51.getCell(row, column);
18979
+ if (_this53.hasCellRules(type, row, column)) {
18980
+ var cell = _this53.getCell(row, column);
18970
18981
 
18971
18982
  if (cell) {
18972
- return _this51.validCellRules(type, row, column, cellValue).then(function () {
18983
+ return _this53.validCellRules(type, row, column, cellValue).then(function () {
18973
18984
  if (customVal && validStore.visible) {
18974
18985
  methods_setCellValue(row, column, cellValue);
18975
18986
  }
18976
18987
 
18977
- _this51.clearValidate();
18988
+ _this53.clearValidate();
18978
18989
  }).catch(function (_ref8) {
18979
18990
  var rule = _ref8.rule;
18980
18991
 
@@ -18982,7 +18993,7 @@ var Methods = {
18982
18993
  methods_setCellValue(row, column, cellValue);
18983
18994
  }
18984
18995
 
18985
- _this51.showValidTooltip({
18996
+ _this53.showValidTooltip({
18986
18997
  rule: rule,
18987
18998
  row: row,
18988
18999
  column: column,
@@ -19003,7 +19014,7 @@ var Methods = {
19003
19014
  * @param {TableMergeConfig[]} merges { row: Row|number, column: ColumnInfo|number, rowspan: number, colspan: number }
19004
19015
  */
19005
19016
  setMergeCells: function setMergeCells(merges) {
19006
- var _this52 = this;
19017
+ var _this54 = this;
19007
19018
 
19008
19019
  if (this.spanMethod) {
19009
19020
  errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
@@ -19011,7 +19022,7 @@ var Methods = {
19011
19022
 
19012
19023
  setMerges(this, merges, this.mergeList, this.afterFullData);
19013
19024
  return this.$nextTick().then(function () {
19014
- return _this52.updateCellAreas();
19025
+ return _this54.updateCellAreas();
19015
19026
  });
19016
19027
  },
19017
19028
 
@@ -19020,7 +19031,7 @@ var Methods = {
19020
19031
  * @param {TableMergeConfig[]} merges 多个或数组 [{row:Row|number, col:ColumnInfo|number}]
19021
19032
  */
19022
19033
  removeMergeCells: function removeMergeCells(merges) {
19023
- var _this53 = this;
19034
+ var _this55 = this;
19024
19035
 
19025
19036
  if (this.spanMethod) {
19026
19037
  errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
@@ -19028,7 +19039,7 @@ var Methods = {
19028
19039
 
19029
19040
  var rest = removeMerges(this, merges, this.mergeList, this.afterFullData);
19030
19041
  return this.$nextTick().then(function () {
19031
- _this53.updateCellAreas();
19042
+ _this55.updateCellAreas();
19032
19043
 
19033
19044
  return rest;
19034
19045
  });
@@ -19052,7 +19063,7 @@ var Methods = {
19052
19063
  this.setMergeFooterItems(this.mergeFooterItems);
19053
19064
  },
19054
19065
  setMergeFooterItems: function setMergeFooterItems(merges) {
19055
- var _this54 = this;
19066
+ var _this56 = this;
19056
19067
 
19057
19068
  if (this.footerSpanMethod) {
19058
19069
  errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
@@ -19060,11 +19071,11 @@ var Methods = {
19060
19071
 
19061
19072
  setMerges(this, merges, this.mergeFooterList, null);
19062
19073
  return this.$nextTick().then(function () {
19063
- return _this54.updateCellAreas();
19074
+ return _this56.updateCellAreas();
19064
19075
  });
19065
19076
  },
19066
19077
  removeMergeFooterItems: function removeMergeFooterItems(merges) {
19067
- var _this55 = this;
19078
+ var _this57 = this;
19068
19079
 
19069
19080
  if (this.footerSpanMethod) {
19070
19081
  errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
@@ -19072,7 +19083,7 @@ var Methods = {
19072
19083
 
19073
19084
  var rest = removeMerges(this, merges, this.mergeFooterList, null);
19074
19085
  return this.$nextTick().then(function () {
19075
- _this55.updateCellAreas();
19086
+ _this57.updateCellAreas();
19076
19087
 
19077
19088
  return rest;
19078
19089
  });
@@ -19139,7 +19150,7 @@ var Methods = {
19139
19150
  *************************/
19140
19151
  getCell: function getCell(row, column) {
19141
19152
  var $refs = this.$refs;
19142
- var rowid = methods_getRowid(this, row);
19153
+ var rowid = util_getRowid(this, row);
19143
19154
  var bodyElem = $refs["".concat(column.fixed || 'table', "Body")] || $refs.tableBody;
19144
19155
 
19145
19156
  if (bodyElem && bodyElem.$el) {
@@ -19344,7 +19355,7 @@ function handleUupdateResize(_vm) {
19344
19355
  height: [Number, String],
19345
19356
  // 表格的最大高度
19346
19357
  maxHeight: [Number, String],
19347
- // (即将废弃)所有列是否允许拖动列宽调整大小
19358
+ // 已废弃,被 column-config.resizable 替换
19348
19359
  resizable: {
19349
19360
  type: Boolean,
19350
19361
  default: function _default() {
@@ -19416,35 +19427,35 @@ function handleUupdateResize(_vm) {
19416
19427
  return conf.table.showHeader;
19417
19428
  }
19418
19429
  },
19419
- // (即将废弃)是否要高亮当前选中行
19430
+ // 已废弃,被 row-config.isCurrent 替换
19420
19431
  highlightCurrentRow: {
19421
19432
  type: Boolean,
19422
19433
  default: function _default() {
19423
19434
  return conf.table.highlightCurrentRow;
19424
19435
  }
19425
19436
  },
19426
- // (即将废弃)鼠标移到行是否要高亮显示
19437
+ // 已废弃,被 row-config.isHover 替换
19427
19438
  highlightHoverRow: {
19428
19439
  type: Boolean,
19429
19440
  default: function _default() {
19430
19441
  return conf.table.highlightHoverRow;
19431
19442
  }
19432
19443
  },
19433
- // (即将废弃)是否要高亮当前选中列
19444
+ // 已废弃,被 column-config.isCurrent 替换
19434
19445
  highlightCurrentColumn: {
19435
19446
  type: Boolean,
19436
19447
  default: function _default() {
19437
19448
  return conf.table.highlightCurrentColumn;
19438
19449
  }
19439
19450
  },
19440
- // (即将废弃)鼠标移到列是否要高亮显示
19451
+ // 已废弃,被 column-config.isHover 替换
19441
19452
  highlightHoverColumn: {
19442
19453
  type: Boolean,
19443
19454
  default: function _default() {
19444
19455
  return conf.table.highlightHoverColumn;
19445
19456
  }
19446
19457
  },
19447
- // (即将废弃)激活单元格编辑时是否高亮显示
19458
+ // 已废弃,直接删除
19448
19459
  highlightCell: Boolean,
19449
19460
  // 是否显示表尾合计
19450
19461
  showFooter: Boolean,
@@ -26384,7 +26395,8 @@ function getOptUniqueId() {
26384
26395
  }
26385
26396
 
26386
26397
  function getOptkey(_vm) {
26387
- return _vm.optionId || '_X_ID';
26398
+ var optionOpts = _vm.optionOpts;
26399
+ return optionOpts.keyField || _vm.optionId || '_X_OPTION_KEY';
26388
26400
  }
26389
26401
 
26390
26402
  function getOptid(_vm, option) {
@@ -26528,7 +26540,9 @@ function renderOption(h, _vm, list, group) {
26528
26540
  optionKey = _vm.optionKey,
26529
26541
  value = _vm.value,
26530
26542
  multiple = _vm.multiple,
26531
- currentValue = _vm.currentValue;
26543
+ currentValue = _vm.currentValue,
26544
+ optionOpts = _vm.optionOpts;
26545
+ var useKey = optionOpts.useKey;
26532
26546
  return list.map(function (option, cIndex) {
26533
26547
  var slots = option.slots;
26534
26548
  var isVisible = !isGroup || isOptionVisible(option);
@@ -26537,7 +26551,7 @@ function renderOption(h, _vm, list, group) {
26537
26551
  var optid = getOptid(_vm, option);
26538
26552
  var defaultSlot = slots ? slots.default : null;
26539
26553
  return isVisible ? h('div', {
26540
- key: optionKey ? optid : cIndex,
26554
+ key: useKey || optionKey ? optid : cIndex,
26541
26555
  class: ['vxe-select-option', option.className, {
26542
26556
  'is--disabled': isDisabled,
26543
26557
  'is--selected': multiple ? value && value.indexOf(optionValue) > -1 : value === optionValue,
@@ -26569,14 +26583,16 @@ function renderOptgroup(h, _vm) {
26569
26583
  var optionKey = _vm.optionKey,
26570
26584
  visibleGroupList = _vm.visibleGroupList,
26571
26585
  groupLabelField = _vm.groupLabelField,
26572
- groupOptionsField = _vm.groupOptionsField;
26586
+ groupOptionsField = _vm.groupOptionsField,
26587
+ optionOpts = _vm.optionOpts;
26588
+ var useKey = optionOpts.useKey;
26573
26589
  return visibleGroupList.map(function (group, gIndex) {
26574
26590
  var slots = group.slots;
26575
26591
  var optid = getOptid(_vm, group);
26576
26592
  var isGroupDisabled = group.disabled;
26577
26593
  var defaultSlot = slots ? slots.default : null;
26578
26594
  return h('div', {
26579
- key: optionKey ? optid : gIndex,
26595
+ key: useKey || optionKey ? optid : gIndex,
26580
26596
  class: ['vxe-optgroup', group.className, {
26581
26597
  'is--disabled': isGroupDisabled
26582
26598
  }],
@@ -26636,6 +26652,7 @@ function select_renderOpts(h, _vm) {
26636
26652
  optionProps: Object,
26637
26653
  optionGroups: Array,
26638
26654
  optionGroupProps: Object,
26655
+ optionConfig: Object,
26639
26656
  className: [String, Function],
26640
26657
  size: {
26641
26658
  type: String,
@@ -26644,12 +26661,14 @@ function select_renderOpts(h, _vm) {
26644
26661
  }
26645
26662
  },
26646
26663
  emptyText: String,
26664
+ // 已废弃,被 option-config.keyField 替换
26647
26665
  optionId: {
26648
26666
  type: String,
26649
26667
  default: function _default() {
26650
26668
  return conf.select.optionId;
26651
26669
  }
26652
26670
  },
26671
+ // 已废弃,被 option-config.useKey 替换
26653
26672
  optionKey: Boolean,
26654
26673
  transfer: {
26655
26674
  type: Boolean,
@@ -26702,6 +26721,9 @@ function select_renderOpts(h, _vm) {
26702
26721
  groupOptionsField: function groupOptionsField() {
26703
26722
  return this.groupPropsOpts.options || 'options';
26704
26723
  },
26724
+ optionOpts: function optionOpts() {
26725
+ return Object.assign({}, conf.select.optionConfig, this.optionConfig);
26726
+ },
26705
26727
  isGroup: function isGroup() {
26706
26728
  return this.fullGroupList.some(function (item) {
26707
26729
  return item.options && item.options.length;
@@ -29321,7 +29343,7 @@ function handleFileImport($xetable, file, opts) {
29321
29343
  handleImport($xetable, e.target.result, options);
29322
29344
  };
29323
29345
 
29324
- reader.readAsText(file, 'UTF-8');
29346
+ reader.readAsText(file, options.encoding || 'UTF-8');
29325
29347
  });
29326
29348
  }
29327
29349
  } else {