vxe-table 3.6.10-beta.0 → 3.6.10

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.
Files changed (36) hide show
  1. package/lib/grid/src/grid.js +89 -22
  2. package/lib/grid/src/grid.min.js +1 -1
  3. package/lib/icon/style/{iconfont.1673016554584.ttf → iconfont.1676471822832.ttf} +0 -0
  4. package/lib/icon/style/{iconfont.1673016554584.woff → iconfont.1676471822832.woff} +0 -0
  5. package/lib/icon/style/{iconfont.1673016554584.woff2 → iconfont.1676471822832.woff2} +0 -0
  6. package/lib/icon/style/style.css +1 -1
  7. package/lib/icon/style/style.min.css +1 -1
  8. package/lib/{iconfont.1673016554584.ttf → iconfont.1676471822832.ttf} +0 -0
  9. package/lib/{iconfont.1673016554584.woff → iconfont.1676471822832.woff} +0 -0
  10. package/lib/{iconfont.1673016554584.woff2 → iconfont.1676471822832.woff2} +0 -0
  11. package/lib/index.css +1 -1
  12. package/lib/index.umd.js +194 -103
  13. package/lib/index.umd.min.js +1 -1
  14. package/lib/input/src/input.js +4 -4
  15. package/lib/input/src/input.min.js +1 -1
  16. package/lib/list/src/list.js +22 -16
  17. package/lib/list/src/list.min.js +1 -1
  18. package/lib/pager/src/pager.js +12 -11
  19. package/lib/pager/src/pager.min.js +1 -1
  20. package/lib/style.css +1 -1
  21. package/lib/style.min.css +1 -1
  22. package/lib/table/src/methods.js +59 -45
  23. package/lib/table/src/methods.min.js +1 -1
  24. package/lib/toolbar/src/toolbar.js +4 -2
  25. package/lib/toolbar/src/toolbar.min.js +1 -1
  26. package/lib/tools/log.js +1 -1
  27. package/lib/tools/log.min.js +1 -1
  28. package/lib/v-x-e-table/index.js +1 -1
  29. package/lib/v-x-e-table/index.min.js +1 -1
  30. package/package.json +2 -1
  31. package/packages/grid/src/grid.js +41 -15
  32. package/packages/input/src/input.js +4 -4
  33. package/packages/list/src/list.js +3 -0
  34. package/packages/pager/src/pager.js +8 -7
  35. package/packages/table/src/methods.js +54 -41
  36. package/packages/toolbar/src/toolbar.js +2 -2
package/lib/index.umd.js CHANGED
@@ -10572,7 +10572,7 @@ var es_array_concat = __webpack_require__(2222);
10572
10572
 
10573
10573
 
10574
10574
  function getLog(message, params) {
10575
- return "[vxe-table v".concat("3.6.9", "] ").concat(conf.i18n(message, params));
10575
+ return "[vxe-table v".concat("3.6.10", "] ").concat(conf.i18n(message, params));
10576
10576
  }
10577
10577
  function outLog(type) {
10578
10578
  return function (message, params) {
@@ -11742,7 +11742,7 @@ function _t(key, args) {
11742
11742
  var v = 'v3';
11743
11743
  var VXETable = {
11744
11744
  v: v,
11745
- version: "3.6.9",
11745
+ version: "3.6.10",
11746
11746
  reg: reg,
11747
11747
  use: use,
11748
11748
  setup: setup,
@@ -17959,7 +17959,7 @@ var Methods = {
17959
17959
  var checkAll = checkboxOpts.checkAll,
17960
17960
  checkRowKeys = checkboxOpts.checkRowKeys;
17961
17961
  if (checkAll) {
17962
- this.setAllCheckboxRow(true);
17962
+ this.handleCheckedAllCheckboxRow(true, true);
17963
17963
  } else if (checkRowKeys) {
17964
17964
  var defSelection = [];
17965
17965
  checkRowKeys.forEach(function (rowid) {
@@ -17967,15 +17967,10 @@ var Methods = {
17967
17967
  defSelection.push(fullDataRowIdData[rowid].row);
17968
17968
  }
17969
17969
  });
17970
- this.setCheckboxRow(defSelection, true);
17970
+ this.handleCheckedCheckboxRow(defSelection, true, true);
17971
17971
  }
17972
17972
  },
17973
- /**
17974
- * 用于多选行,设置行为选中状态,第二个参数为选中与否
17975
- * @param {Array/Row} rows 行数据
17976
- * @param {Boolean} value 是否选中
17977
- */
17978
- setCheckboxRow: function setCheckboxRow(rows, value) {
17973
+ handleCheckedCheckboxRow: function handleCheckedCheckboxRow(rows, value, isForce) {
17979
17974
  var _this32 = this;
17980
17975
  if (rows && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)) {
17981
17976
  rows = [rows];
@@ -17983,10 +17978,18 @@ var Methods = {
17983
17978
  rows.forEach(function (row) {
17984
17979
  return _this32.handleSelectRow({
17985
17980
  row: row
17986
- }, !!value);
17981
+ }, !!value, isForce);
17987
17982
  });
17988
17983
  return this.$nextTick();
17989
17984
  },
17985
+ /**
17986
+ * 用于多选行,设置行为选中状态,第二个参数为选中与否
17987
+ * @param {Array/Row} rows 行数据
17988
+ * @param {Boolean} value 是否选中
17989
+ */
17990
+ setCheckboxRow: function setCheckboxRow(rows, value) {
17991
+ return this.handleCheckedCheckboxRow(rows, value, true);
17992
+ },
17990
17993
  isCheckedByCheckboxRow: function isCheckedByCheckboxRow(row) {
17991
17994
  var selection = this.selection;
17992
17995
  var checkField = this.checkboxOpts.checkField;
@@ -18003,7 +18006,7 @@ var Methods = {
18003
18006
  * 多选,行选中事件
18004
18007
  * value 选中true 不选false 半选-1
18005
18008
  */
18006
- handleSelectRow: function handleSelectRow(_ref6, value) {
18009
+ handleSelectRow: function handleSelectRow(_ref6, value, isForce) {
18007
18010
  var _this33 = this;
18008
18011
  var row = _ref6.row;
18009
18012
  var selection = this.selection,
@@ -18025,7 +18028,7 @@ var Methods = {
18025
18028
  } else {
18026
18029
  // 更新子节点状态
18027
18030
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([row], function (item) {
18028
- if (_this33.eqRow(item, row) || !checkMethod || checkMethod({
18031
+ if (_this33.eqRow(item, row) || isForce || !checkMethod || checkMethod({
18029
18032
  row: item
18030
18033
  })) {
18031
18034
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(item, checkField, value);
@@ -18042,7 +18045,7 @@ var Methods = {
18042
18045
  }, treeOpts);
18043
18046
  if (matchObj && matchObj.parent) {
18044
18047
  var parentStatus;
18045
- var vItems = checkMethod ? matchObj.items.filter(function (item) {
18048
+ var vItems = !isForce && checkMethod ? matchObj.items.filter(function (item) {
18046
18049
  return checkMethod({
18047
18050
  row: item
18048
18051
  });
@@ -18062,10 +18065,10 @@ var Methods = {
18062
18065
  }
18063
18066
  return this.handleSelectRow({
18064
18067
  row: matchObj.parent
18065
- }, parentStatus);
18068
+ }, parentStatus, isForce);
18066
18069
  }
18067
18070
  } else {
18068
- if (!checkMethod || checkMethod({
18071
+ if (isForce || !checkMethod || checkMethod({
18069
18072
  row: row
18070
18073
  })) {
18071
18074
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, checkField, value);
@@ -18084,9 +18087,9 @@ var Methods = {
18084
18087
  } else {
18085
18088
  // 更新子节点状态
18086
18089
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([row], function (item) {
18087
- if (_this33.eqRow(item, row) || !checkMethod || checkMethod({
18090
+ if (_this33.eqRow(item, row) || isForce && (!checkMethod || checkMethod({
18088
18091
  row: item
18089
- })) {
18092
+ }))) {
18090
18093
  if (value) {
18091
18094
  selection.push(item);
18092
18095
  } else {
@@ -18107,7 +18110,7 @@ var Methods = {
18107
18110
  }, treeOpts);
18108
18111
  if (_matchObj && _matchObj.parent) {
18109
18112
  var _parentStatus;
18110
- var _vItems = checkMethod ? _matchObj.items.filter(function (item) {
18113
+ var _vItems = !isForce && checkMethod ? _matchObj.items.filter(function (item) {
18111
18114
  return checkMethod({
18112
18115
  row: item
18113
18116
  });
@@ -18127,10 +18130,10 @@ var Methods = {
18127
18130
  }
18128
18131
  return this.handleSelectRow({
18129
18132
  row: _matchObj.parent
18130
- }, _parentStatus);
18133
+ }, _parentStatus, isForce);
18131
18134
  }
18132
18135
  } else {
18133
- if (!checkMethod || checkMethod({
18136
+ if (isForce || !checkMethod || checkMethod({
18134
18137
  row: row
18135
18138
  })) {
18136
18139
  if (value) {
@@ -18178,16 +18181,16 @@ var Methods = {
18178
18181
  * 多选,切换某一行的选中状态
18179
18182
  */
18180
18183
  toggleCheckboxRow: function toggleCheckboxRow(row) {
18181
- this.handleToggleCheckRowEvent(null, {
18184
+ var selection = this.selection,
18185
+ checkboxOpts = this.checkboxOpts;
18186
+ var checkField = checkboxOpts.checkField;
18187
+ var value = checkField ? !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) : this.findRowIndexOf(selection, row) === -1;
18188
+ this.handleSelectRow({
18182
18189
  row: row
18183
- });
18190
+ }, value, true);
18184
18191
  return this.$nextTick();
18185
18192
  },
18186
- /**
18187
- * 用于多选行,设置所有行的选中状态
18188
- * @param {Boolean} value 是否选中
18189
- */
18190
- setAllCheckboxRow: function setAllCheckboxRow(value) {
18193
+ handleCheckedAllCheckboxRow: function handleCheckedAllCheckboxRow(value, isForce) {
18191
18194
  var _this34 = this;
18192
18195
  var afterFullData = this.afterFullData,
18193
18196
  treeConfig = this.treeConfig,
@@ -18212,7 +18215,7 @@ var Methods = {
18212
18215
  */
18213
18216
  if (checkField) {
18214
18217
  var checkValFn = function checkValFn(row) {
18215
- if (!checkMethod || checkMethod({
18218
+ if (isForce || !checkMethod || checkMethod({
18216
18219
  row: row
18217
18220
  })) {
18218
18221
  if (value) {
@@ -18240,7 +18243,7 @@ var Methods = {
18240
18243
  * 如果方法成立,则添加到临时集合中
18241
18244
  */
18242
18245
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterFullData, function (row) {
18243
- if (!checkMethod || checkMethod({
18246
+ if (isForce || !checkMethod || checkMethod({
18244
18247
  row: row
18245
18248
  })) {
18246
18249
  selectRows.push(row);
@@ -18251,7 +18254,7 @@ var Methods = {
18251
18254
  * 如果是树取消
18252
18255
  * 如果方法成立,则不添加到临时集合中
18253
18256
  */
18254
- if (checkMethod) {
18257
+ if (!isForce && checkMethod) {
18255
18258
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterFullData, function (row) {
18256
18259
  if (checkMethod({
18257
18260
  row: row
@@ -18268,7 +18271,7 @@ var Methods = {
18268
18271
  * 如果存在选中方法且成立或者本身已勾选,则添加到临时集合中
18269
18272
  * 如果不存在选中方法,则添加所有数据到临时集合中
18270
18273
  */
18271
- if (checkMethod) {
18274
+ if (!isForce && checkMethod) {
18272
18275
  selectRows = afterFullData.filter(function (row) {
18273
18276
  return _this34.findRowIndexOf(selection, row) > -1 || checkMethod({
18274
18277
  row: row
@@ -18283,7 +18286,7 @@ var Methods = {
18283
18286
  * 如果方法成立,则不添加到临时集合中;如果方法不成立则判断当前是否已勾选,如果已被勾选则添加到新集合中
18284
18287
  * 如果不存在选中方法,无需处理,临时集合默认为空
18285
18288
  */
18286
- if (checkMethod) {
18289
+ if (!isForce && checkMethod) {
18287
18290
  selectRows = afterFullData.filter(function (row) {
18288
18291
  return checkMethod({
18289
18292
  row: row
@@ -18308,6 +18311,14 @@ var Methods = {
18308
18311
  }
18309
18312
  this.treeIndeterminates = [];
18310
18313
  this.checkSelectionStatus();
18314
+ return this.$nextTick();
18315
+ },
18316
+ /**
18317
+ * 用于多选行,设置所有行的选中状态
18318
+ * @param {Boolean} value 是否选中
18319
+ */
18320
+ setAllCheckboxRow: function setAllCheckboxRow(value) {
18321
+ return this.handleCheckedAllCheckboxRow(value, true);
18311
18322
  },
18312
18323
  checkSelectionStatus: function checkSelectionStatus() {
18313
18324
  var _this35 = this;
@@ -18419,14 +18430,14 @@ var Methods = {
18419
18430
  if (radioOpts.reserve && radioReserveRow) {
18420
18431
  var rowid = getRowid(this, radioReserveRow);
18421
18432
  if (fullDataRowIdData[rowid]) {
18422
- this.setRadioRow(fullDataRowIdData[rowid].row);
18433
+ this.handleCheckedRadioRow(fullDataRowIdData[rowid].row, true);
18423
18434
  }
18424
18435
  }
18425
18436
  // 复选框
18426
18437
  this.selection = getRecoverRow(this, selection); // 刷新多选行状态
18427
18438
  // 还原保留选中状态
18428
18439
  if (checkboxOpts.reserve) {
18429
- this.setCheckboxRow(handleReserveRow(this, this.checkboxReserveRowMap), true);
18440
+ this.handleCheckedCheckboxRow(handleReserveRow(this, this.checkboxReserveRowMap), true, true);
18430
18441
  }
18431
18442
  if (currentRow && !fullAllDataRowMap.has(currentRow)) {
18432
18443
  this.currentRow = null; // 刷新当前行状态
@@ -18548,7 +18559,7 @@ var Methods = {
18548
18559
  * 多选,选中所有事件
18549
18560
  */
18550
18561
  triggerCheckAllEvent: function triggerCheckAllEvent(evnt, value) {
18551
- this.setAllCheckboxRow(value);
18562
+ this.handleCheckedAllCheckboxRow(value);
18552
18563
  this.emitEvent('checkbox-all', {
18553
18564
  records: this.getCheckboxRecords(),
18554
18565
  reserves: this.getCheckboxReserveRecords(),
@@ -18607,7 +18618,7 @@ var Methods = {
18607
18618
  reserve = radioOpts.reserve;
18608
18619
  if (rowid) {
18609
18620
  if (fullDataRowIdData[rowid]) {
18610
- this.setRadioRow(fullDataRowIdData[rowid].row);
18621
+ this.handleCheckedRadioRow(fullDataRowIdData[rowid].row, true);
18611
18622
  }
18612
18623
  if (reserve) {
18613
18624
  var rowkey = getRowkey(this);
@@ -18625,7 +18636,7 @@ var Methods = {
18625
18636
  var newValue = row;
18626
18637
  var isChange = oldValue !== newValue;
18627
18638
  if (isChange) {
18628
- this.setRadioRow(newValue);
18639
+ this.handleCheckedRadioRow(newValue);
18629
18640
  } else if (!radioOpts.strict) {
18630
18641
  isChange = oldValue === newValue;
18631
18642
  if (isChange) {
@@ -18660,7 +18671,7 @@ var Methods = {
18660
18671
  var $el = this.$el,
18661
18672
  rowOpts = this.rowOpts;
18662
18673
  this.clearCurrentRow();
18663
- this.clearCurrentColumn();
18674
+ // this.clearCurrentColumn()
18664
18675
  this.currentRow = row;
18665
18676
  if (rowOpts.isCurrent || this.highlightCurrentRow) {
18666
18677
  if ($el) {
@@ -18674,14 +18685,10 @@ var Methods = {
18674
18685
  isCheckedByRadioRow: function isCheckedByRadioRow(row) {
18675
18686
  return this.selectRow === row;
18676
18687
  },
18677
- /**
18678
- * 用于单选行,设置某一行为选中状态
18679
- * @param {Row} row 行对象
18680
- */
18681
- setRadioRow: function setRadioRow(row) {
18688
+ handleCheckedRadioRow: function handleCheckedRadioRow(row, isForce) {
18682
18689
  var radioOpts = this.radioOpts;
18683
18690
  var checkMethod = radioOpts.checkMethod;
18684
- if (row && (!checkMethod || checkMethod({
18691
+ if (row && (isForce || !checkMethod || checkMethod({
18685
18692
  row: row
18686
18693
  }))) {
18687
18694
  this.selectRow = row;
@@ -18689,6 +18696,13 @@ var Methods = {
18689
18696
  }
18690
18697
  return this.$nextTick();
18691
18698
  },
18699
+ /**
18700
+ * 用于单选行,设置某一行为选中状态
18701
+ * @param {Row} row 行对象
18702
+ */
18703
+ setRadioRow: function setRadioRow(row) {
18704
+ return this.handleCheckedRadioRow(row, true);
18705
+ },
18692
18706
  /**
18693
18707
  * 用于当前行,手动清空当前高亮的状态
18694
18708
  */
@@ -18813,7 +18827,7 @@ var Methods = {
18813
18827
  setCurrentColumn: function setCurrentColumn(fieldOrColumn) {
18814
18828
  var column = handleFieldOrColumn(this, fieldOrColumn);
18815
18829
  if (column) {
18816
- this.clearCurrentRow();
18830
+ // this.clearCurrentRow()
18817
18831
  this.clearCurrentColumn();
18818
18832
  this.currentColumn = column;
18819
18833
  }
@@ -19566,7 +19580,7 @@ var Methods = {
19566
19580
  }
19567
19581
  // 如果当前节点已选中,则展开后子节点也被选中
19568
19582
  if (!checkStrictly && _this48.isCheckedByCheckboxRow(row)) {
19569
- _this48.setCheckboxRow(childRows, true);
19583
+ _this48.handleCheckedCheckboxRow(childRows, true, true);
19570
19584
  }
19571
19585
  return _this48.$nextTick().then(function () {
19572
19586
  if (transform) {
@@ -26130,6 +26144,10 @@ function renderExtraSuffixIcon(h, _vm) {
26130
26144
  },
26131
26145
  focusEvent: function focusEvent(evnt) {
26132
26146
  this.isActivated = true;
26147
+ var isDatePickerType = this.isDatePickerType;
26148
+ if (isDatePickerType) {
26149
+ this.datePickerOpenEvent(evnt);
26150
+ }
26133
26151
  this.triggerEvent(evnt);
26134
26152
  },
26135
26153
  blurEvent: function blurEvent(evnt) {
@@ -26181,10 +26199,6 @@ function renderExtraSuffixIcon(h, _vm) {
26181
26199
  this.triggerEvent(evnt);
26182
26200
  },
26183
26201
  clickEvent: function clickEvent(evnt) {
26184
- var isDatePickerType = this.isDatePickerType;
26185
- if (isDatePickerType) {
26186
- this.datePickerOpenEvent(evnt);
26187
- }
26188
26202
  this.triggerEvent(evnt);
26189
26203
  },
26190
26204
  clickPrefixEvent: function clickPrefixEvent(evnt) {
@@ -32275,6 +32289,7 @@ var Colgroup = Object.assign(group, {
32275
32289
 
32276
32290
 
32277
32291
 
32292
+
32278
32293
 
32279
32294
 
32280
32295
  var grid_methods = {};
@@ -32754,8 +32769,14 @@ Object.keys(packages_table.methods).forEach(function (name) {
32754
32769
  }
32755
32770
  if (!proxyInited && proxyOpts.autoLoad !== false) {
32756
32771
  this.proxyInited = true;
32757
- this.$nextTick(function () {
32772
+ this.$nextTick().then(function () {
32758
32773
  return _this4.commitProxy('_init');
32774
+ }).then(function (rest) {
32775
+ _this4.$emit('proxy-query', _objectSpread2(_objectSpread2({}, rest), {}, {
32776
+ isInited: true,
32777
+ $grid: _this4,
32778
+ $event: new Event('init')
32779
+ }));
32759
32780
  });
32760
32781
  }
32761
32782
  }
@@ -32813,14 +32834,12 @@ Object.keys(packages_table.methods).forEach(function (name) {
32813
32834
  }
32814
32835
  switch (code) {
32815
32836
  case 'insert':
32816
- this.insert();
32817
- break;
32837
+ return this.insert();
32818
32838
  case 'insert_actived':
32819
- this.insert().then(function (_ref2) {
32839
+ return this.insert().then(function (_ref2) {
32820
32840
  var row = _ref2.row;
32821
32841
  return _this5.setActiveRow(row);
32822
32842
  });
32823
- break;
32824
32843
  case 'mark_cancel':
32825
32844
  this.triggerPendingEvent(code);
32826
32845
  break;
@@ -32891,6 +32910,8 @@ Object.keys(packages_table.methods).forEach(function (name) {
32891
32910
  var params = {
32892
32911
  code: code,
32893
32912
  button: button,
32913
+ isInited: isInited,
32914
+ isReload: isReload,
32894
32915
  $grid: this,
32895
32916
  page: pageParams,
32896
32917
  sort: sortList.length ? sortList[0] : {},
@@ -32903,9 +32924,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
32903
32924
  this.filterData = filterList;
32904
32925
  this.tableLoading = true;
32905
32926
  var applyArgs = [params].concat(args);
32906
- return Promise.resolve((beforeQuery || ajaxMethods).apply(void 0, _toConsumableArray(applyArgs))).catch(function (e) {
32907
- return e;
32908
- }).then(function (rest) {
32927
+ return Promise.resolve((beforeQuery || ajaxMethods).apply(void 0, _toConsumableArray(applyArgs))).then(function (rest) {
32909
32928
  _this5.tableLoading = false;
32910
32929
  if (rest) {
32911
32930
  if (isEnableConf(pagerConfig)) {
@@ -32926,6 +32945,13 @@ Object.keys(packages_table.methods).forEach(function (name) {
32926
32945
  if (afterQuery) {
32927
32946
  afterQuery.apply(void 0, _toConsumableArray(applyArgs));
32928
32947
  }
32948
+ return {
32949
+ status: true
32950
+ };
32951
+ }).catch(function () {
32952
+ return {
32953
+ status: false
32954
+ };
32929
32955
  });
32930
32956
  } else {
32931
32957
  if (false) {}
@@ -32974,6 +33000,9 @@ Object.keys(packages_table.methods).forEach(function (name) {
32974
33000
  } else {
32975
33001
  _this5.commitProxy('query');
32976
33002
  }
33003
+ return {
33004
+ status: true
33005
+ };
32977
33006
  }).catch(function (rest) {
32978
33007
  _this5.tableLoading = false;
32979
33008
  if (isMsg) {
@@ -32985,6 +33014,9 @@ Object.keys(packages_table.methods).forEach(function (name) {
32985
33014
  status: 'error'
32986
33015
  });
32987
33016
  }
33017
+ return {
33018
+ status: false
33019
+ };
32988
33020
  });
32989
33021
  });
32990
33022
  } else {
@@ -33061,6 +33093,9 @@ Object.keys(packages_table.methods).forEach(function (name) {
33061
33093
  } else {
33062
33094
  _this5.commitProxy('query');
33063
33095
  }
33096
+ return {
33097
+ status: true
33098
+ };
33064
33099
  }).catch(function (rest) {
33065
33100
  _this5.tableLoading = false;
33066
33101
  if (isMsg) {
@@ -33072,6 +33107,9 @@ Object.keys(packages_table.methods).forEach(function (name) {
33072
33107
  status: 'error'
33073
33108
  });
33074
33109
  }
33110
+ return {
33111
+ status: false
33112
+ };
33075
33113
  });
33076
33114
  } else {
33077
33115
  if (isMsg) {
@@ -33124,7 +33162,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
33124
33162
  escClosable: true
33125
33163
  }).then(function (type) {
33126
33164
  if (type === 'confirm') {
33127
- callback();
33165
+ return callback();
33128
33166
  }
33129
33167
  });
33130
33168
  } else {
@@ -33157,17 +33195,29 @@ Object.keys(packages_table.methods).forEach(function (name) {
33157
33195
  getPendingRecords: function getPendingRecords() {
33158
33196
  return this.pendingRecords;
33159
33197
  },
33198
+ triggerToolbarCommitEvent: function triggerToolbarCommitEvent(params, evnt) {
33199
+ var _this6 = this;
33200
+ var code = params.code;
33201
+ return this.commitProxy(params, evnt).then(function (rest) {
33202
+ if (code && rest && rest.status && ['query', 'reload', 'delete', 'save'].includes(code)) {
33203
+ _this6.$emit(code === 'delete' || code === 'save' ? "proxy-".concat(code) : 'proxy-query', _objectSpread2(_objectSpread2({}, rest), {}, {
33204
+ isReload: code === 'reload',
33205
+ $grid: _this6,
33206
+ $event: evnt
33207
+ }));
33208
+ }
33209
+ });
33210
+ },
33160
33211
  triggerToolbarBtnEvent: function triggerToolbarBtnEvent(button, evnt) {
33161
- this.commitProxy(button, evnt);
33212
+ this.triggerToolbarCommitEvent(button, evnt);
33162
33213
  this.$emit('toolbar-button-click', {
33163
33214
  code: button.code,
33164
- button: button,
33165
33215
  $grid: this,
33166
33216
  $event: evnt
33167
33217
  });
33168
33218
  },
33169
33219
  triggerToolbarTolEvent: function triggerToolbarTolEvent(tool, evnt) {
33170
- this.commitProxy(tool, evnt);
33220
+ this.triggerToolbarCommitEvent(tool, evnt);
33171
33221
  this.$emit('toolbar-tool-click', {
33172
33222
  code: tool.code,
33173
33223
  tool: tool,
@@ -33212,6 +33262,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
33212
33262
  }
33213
33263
  },
33214
33264
  pageChangeEvent: function pageChangeEvent(params) {
33265
+ var _this7 = this;
33215
33266
  var proxyConfig = this.proxyConfig,
33216
33267
  tablePage = this.tablePage;
33217
33268
  var currentPage = params.currentPage,
@@ -33222,10 +33273,16 @@ Object.keys(packages_table.methods).forEach(function (name) {
33222
33273
  $grid: this
33223
33274
  }, params));
33224
33275
  if (proxyConfig) {
33225
- this.commitProxy('query');
33276
+ this.commitProxy('query').then(function (rest) {
33277
+ _this7.$emit('proxy-query', _objectSpread2(_objectSpread2({}, rest), {}, {
33278
+ $grid: _this7,
33279
+ $event: params.$event
33280
+ }));
33281
+ });
33226
33282
  }
33227
33283
  },
33228
33284
  sortChangeEvent: function sortChangeEvent(params) {
33285
+ var _this8 = this;
33229
33286
  var $table = params.$table,
33230
33287
  column = params.column,
33231
33288
  sortList = params.sortList;
@@ -33235,7 +33292,12 @@ Object.keys(packages_table.methods).forEach(function (name) {
33235
33292
  this.sortData = sortList;
33236
33293
  if (this.proxyConfig) {
33237
33294
  this.tablePage.currentPage = 1;
33238
- this.commitProxy('query');
33295
+ this.commitProxy('query').then(function (rest) {
33296
+ _this8.$emit('proxy-query', _objectSpread2(_objectSpread2({}, rest), {}, {
33297
+ $grid: _this8,
33298
+ $event: params.$event
33299
+ }));
33300
+ });
33239
33301
  }
33240
33302
  }
33241
33303
  this.$emit('sort-change', Object.assign({
@@ -33243,6 +33305,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
33243
33305
  }, params));
33244
33306
  },
33245
33307
  filterChangeEvent: function filterChangeEvent(params) {
33308
+ var _this9 = this;
33246
33309
  var $table = params.$table,
33247
33310
  filterList = params.filterList;
33248
33311
  // 如果是服务端过滤
@@ -33250,7 +33313,12 @@ Object.keys(packages_table.methods).forEach(function (name) {
33250
33313
  this.filterData = filterList;
33251
33314
  if (this.proxyConfig) {
33252
33315
  this.tablePage.currentPage = 1;
33253
- this.commitProxy('query');
33316
+ this.commitProxy('query').then(function (rest) {
33317
+ _this9.$emit('proxy-query', _objectSpread2(_objectSpread2({}, rest), {}, {
33318
+ $grid: _this9,
33319
+ $event: params.$event
33320
+ }));
33321
+ });
33254
33322
  }
33255
33323
  }
33256
33324
  this.$emit('filter-change', Object.assign({
@@ -33258,18 +33326,32 @@ Object.keys(packages_table.methods).forEach(function (name) {
33258
33326
  }, params));
33259
33327
  },
33260
33328
  submitEvent: function submitEvent(params) {
33329
+ var _this10 = this;
33261
33330
  var proxyConfig = this.proxyConfig;
33262
33331
  if (proxyConfig) {
33263
- this.commitProxy('reload');
33332
+ this.commitProxy('reload').then(function (rest) {
33333
+ _this10.$emit('proxy-query', _objectSpread2(_objectSpread2({}, rest), {}, {
33334
+ isReload: true,
33335
+ $grid: _this10,
33336
+ $event: params.$event
33337
+ }));
33338
+ });
33264
33339
  }
33265
33340
  this.$emit('form-submit', Object.assign({
33266
33341
  $grid: this
33267
33342
  }, params));
33268
33343
  },
33269
33344
  resetEvent: function resetEvent(params) {
33345
+ var _this11 = this;
33270
33346
  var proxyConfig = this.proxyConfig;
33271
33347
  if (proxyConfig) {
33272
- this.commitProxy('reload');
33348
+ this.commitProxy('reload').then(function (rest) {
33349
+ _this11.$emit('proxy-query', _objectSpread2(_objectSpread2({}, rest), {}, {
33350
+ isReload: true,
33351
+ $grid: _this11,
33352
+ $event: params.$event
33353
+ }));
33354
+ });
33273
33355
  }
33274
33356
  this.$emit('form-reset', Object.assign({
33275
33357
  $grid: this
@@ -33281,9 +33363,9 @@ Object.keys(packages_table.methods).forEach(function (name) {
33281
33363
  }, params));
33282
33364
  },
33283
33365
  collapseEvent: function collapseEvent(params) {
33284
- var _this6 = this;
33366
+ var _this12 = this;
33285
33367
  this.$nextTick(function () {
33286
- return _this6.recalculate(true);
33368
+ return _this12.recalculate(true);
33287
33369
  });
33288
33370
  this.$emit('form-toggle-collapse', Object.assign({
33289
33371
  $grid: this
@@ -33313,7 +33395,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
33313
33395
  return this.handleZoom();
33314
33396
  },
33315
33397
  handleZoom: function handleZoom(isMax) {
33316
- var _this7 = this;
33398
+ var _this13 = this;
33317
33399
  var isZMax = this.isZMax;
33318
33400
  if (isMax ? !isZMax : isZMax) {
33319
33401
  this.isZMax = !isZMax;
@@ -33322,9 +33404,9 @@ Object.keys(packages_table.methods).forEach(function (name) {
33322
33404
  }
33323
33405
  }
33324
33406
  return this.$nextTick().then(function () {
33325
- return _this7.recalculate(true);
33407
+ return _this13.recalculate(true);
33326
33408
  }).then(function () {
33327
- return _this7.isZMax;
33409
+ return _this13.isZMax;
33328
33410
  });
33329
33411
  },
33330
33412
  getProxyInfo: function getProxyInfo() {
@@ -34006,7 +34088,7 @@ function renderCustoms(h, _vm) {
34006
34088
  }
34007
34089
  }, 300);
34008
34090
  },
34009
- refreshEvent: function refreshEvent() {
34091
+ refreshEvent: function refreshEvent(evnt) {
34010
34092
  var _this4 = this;
34011
34093
  var $xegrid = this.$xegrid,
34012
34094
  refreshOpts = this.refreshOpts,
@@ -34026,7 +34108,9 @@ function renderCustoms(h, _vm) {
34026
34108
  }
34027
34109
  } else if ($xegrid) {
34028
34110
  this.isRefresh = true;
34029
- $xegrid.commitProxy(refreshOpts.code || 'reload').catch(function (e) {
34111
+ $xegrid.triggerToolbarCommitEvent({
34112
+ code: refreshOpts.code || 'reload'
34113
+ }, evnt).catch(function (e) {
34030
34114
  return e;
34031
34115
  }).then(function () {
34032
34116
  _this4.isRefresh = false;
@@ -34550,17 +34634,18 @@ var Toolbar = Object.assign(toolbar, {
34550
34634
  }
34551
34635
  },
34552
34636
  pageSizeEvent: function pageSizeEvent(pageSize) {
34553
- this.changePageSize(pageSize);
34554
- },
34555
- changePageSize: function changePageSize(pageSize) {
34556
- if (pageSize !== this.pageSize) {
34557
- this.$emit('update:pageSize', pageSize);
34558
- this.$emit('page-change', {
34559
- type: 'size',
34560
- pageSize: pageSize,
34561
- currentPage: Math.min(this.currentPage, this.getPageCount(this.total, pageSize))
34562
- });
34563
- }
34637
+ var pageCount = this.getPageCount(this.total, pageSize);
34638
+ var currentPage = this.currentPage;
34639
+ if (currentPage > pageCount) {
34640
+ currentPage = pageCount;
34641
+ this.$emit('update:currentPage', pageCount);
34642
+ }
34643
+ this.$emit('update:pageSize', pageSize);
34644
+ this.$emit('page-change', {
34645
+ type: 'size',
34646
+ pageSize: pageSize,
34647
+ currentPage: currentPage
34648
+ });
34564
34649
  },
34565
34650
  jumpInputEvent: function jumpInputEvent(evnt) {
34566
34651
  this.inpCurrPage = evnt.target.value;
@@ -34577,7 +34662,7 @@ var Toolbar = Object.assign(toolbar, {
34577
34662
  }
34578
34663
  },
34579
34664
  triggerJumpEvent: function triggerJumpEvent(evnt) {
34580
- var value = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(evnt.target.value);
34665
+ var value = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(evnt.target.value);
34581
34666
  var current = value <= 0 ? 1 : value >= this.pageCount ? this.pageCount : value;
34582
34667
  evnt.target.value = current;
34583
34668
  this.jumpPage(current);
@@ -37711,6 +37796,12 @@ var Switch = Object.assign(src_switch, {
37711
37796
  this.$resize = resizeObserver;
37712
37797
  }
37713
37798
  },
37799
+ activated: function activated() {
37800
+ var _this3 = this;
37801
+ this.recalculate().then(function () {
37802
+ return _this3.refreshScroll();
37803
+ });
37804
+ },
37714
37805
  beforeDestroy: function beforeDestroy() {
37715
37806
  if (this.$resize) {
37716
37807
  this.$resize.disconnect();
@@ -37775,7 +37866,7 @@ var Switch = Object.assign(src_switch, {
37775
37866
  * @param {Array} datas 数据
37776
37867
  */
37777
37868
  loadData: function loadData(datas) {
37778
- var _this3 = this;
37869
+ var _this4 = this;
37779
37870
  var sYOpts = this.sYOpts,
37780
37871
  scrollYStore = this.scrollYStore;
37781
37872
  var fullData = datas || [];
@@ -37788,7 +37879,7 @@ var Switch = Object.assign(src_switch, {
37788
37879
  this.scrollYLoad = sYOpts.enabled && sYOpts.gt > -1 && sYOpts.gt <= fullData.length;
37789
37880
  this.handleData();
37790
37881
  return this.computeScrollLoad().then(function () {
37791
- _this3.refreshScroll();
37882
+ _this4.refreshScroll();
37792
37883
  });
37793
37884
  },
37794
37885
  /**
@@ -37830,14 +37921,14 @@ var Switch = Object.assign(src_switch, {
37830
37921
  * 刷新滚动条
37831
37922
  */
37832
37923
  refreshScroll: function refreshScroll() {
37833
- var _this4 = this;
37924
+ var _this5 = this;
37834
37925
  var lastScrollLeft = this.lastScrollLeft,
37835
37926
  lastScrollTop = this.lastScrollTop;
37836
37927
  return this.clearScroll().then(function () {
37837
37928
  if (lastScrollLeft || lastScrollTop) {
37838
- _this4.lastScrollLeft = 0;
37839
- _this4.lastScrollTop = 0;
37840
- return _this4.scrollTo(lastScrollLeft, lastScrollTop);
37929
+ _this5.lastScrollLeft = 0;
37930
+ _this5.lastScrollTop = 0;
37931
+ return _this5.scrollTo(lastScrollLeft, lastScrollTop);
37841
37932
  }
37842
37933
  });
37843
37934
  },
@@ -37847,7 +37938,7 @@ var Switch = Object.assign(src_switch, {
37847
37938
  * @param {Number} scrollTop 上距离
37848
37939
  */
37849
37940
  scrollTo: function scrollTo(scrollLeft, scrollTop) {
37850
- var _this5 = this;
37941
+ var _this6 = this;
37851
37942
  var scrollBodyElem = this.$refs.virtualWrapper;
37852
37943
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollLeft)) {
37853
37944
  scrollBodyElem.scrollLeft = scrollLeft;
@@ -37858,19 +37949,19 @@ var Switch = Object.assign(src_switch, {
37858
37949
  if (this.scrollYLoad) {
37859
37950
  return new Promise(function (resolve) {
37860
37951
  return setTimeout(function () {
37861
- return resolve(_this5.$nextTick());
37952
+ return resolve(_this6.$nextTick());
37862
37953
  }, 50);
37863
37954
  });
37864
37955
  }
37865
37956
  return this.$nextTick();
37866
37957
  },
37867
37958
  computeScrollLoad: function computeScrollLoad() {
37868
- var _this6 = this;
37959
+ var _this7 = this;
37869
37960
  return this.$nextTick().then(function () {
37870
- var $refs = _this6.$refs,
37871
- sYOpts = _this6.sYOpts,
37872
- scrollYLoad = _this6.scrollYLoad,
37873
- scrollYStore = _this6.scrollYStore;
37961
+ var $refs = _this7.$refs,
37962
+ sYOpts = _this7.sYOpts,
37963
+ scrollYLoad = _this7.scrollYLoad,
37964
+ scrollYStore = _this7.scrollYStore;
37874
37965
  var virtualWrapperElem = $refs.virtualWrapper,
37875
37966
  virtualBodyElem = $refs.virtualBody;
37876
37967
  var rowHeight = 0;
@@ -37895,11 +37986,11 @@ var Switch = Object.assign(src_switch, {
37895
37986
  scrollYStore.offsetSize = offsetYSize;
37896
37987
  scrollYStore.visibleSize = visibleYSize;
37897
37988
  scrollYStore.endIndex = Math.max(scrollYStore.startIndex, visibleYSize + offsetYSize, scrollYStore.endIndex);
37898
- _this6.updateYData();
37989
+ _this7.updateYData();
37899
37990
  } else {
37900
- _this6.updateYSpace();
37991
+ _this7.updateYSpace();
37901
37992
  }
37902
- _this6.rowHeight = rowHeight;
37993
+ _this7.rowHeight = rowHeight;
37903
37994
  });
37904
37995
  },
37905
37996
  scrollEvent: function scrollEvent(evnt) {