vxe-table 3.17.0-beta.10 → 3.17.0-beta.11

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.
@@ -23,9 +23,11 @@ function getTableOns(_vm) {
23
23
  if (proxyConfig) {
24
24
  if (proxyOpts.sort) {
25
25
  ons['sort-change'] = _vm.sortChangeEvent;
26
+ ons['clear-all-sort'] = _vm.clearAllSortEvent;
26
27
  }
27
28
  if (proxyOpts.filter) {
28
29
  ons['filter-change'] = _vm.filterChangeEvent;
30
+ ons['clear-all-filter'] = _vm.clearAllFilterEvent;
29
31
  }
30
32
  }
31
33
  return ons;
@@ -961,7 +963,24 @@ export default {
961
963
  $xeGrid.triggerToolbarCommitEvent(tool, evnt);
962
964
  $xeGrid.dispatchEvent('toolbar-tool-click', { code: tool.code, tool }, evnt);
963
965
  },
964
- sortChangeEvent(params) {
966
+ pageChangeEvent(params) {
967
+ const $xeGrid = this;
968
+ const props = $xeGrid;
969
+ const reactData = $xeGrid.reactData;
970
+ const { proxyConfig } = props;
971
+ const { tablePage } = reactData;
972
+ const { $event, currentPage, pageSize } = params;
973
+ const proxyOpts = $xeGrid.computeProxyOpts;
974
+ tablePage.currentPage = currentPage;
975
+ tablePage.pageSize = pageSize;
976
+ $xeGrid.dispatchEvent('page-change', params, $event);
977
+ if (proxyConfig && isEnableConf(proxyOpts)) {
978
+ $xeGrid.commitProxy('query').then((rest) => {
979
+ $xeGrid.dispatchEvent('proxy-query', rest, $event);
980
+ });
981
+ }
982
+ },
983
+ handleSortEvent(params) {
965
984
  const $xeGrid = this;
966
985
  const props = $xeGrid;
967
986
  const reactData = $xeGrid.reactData;
@@ -979,26 +998,18 @@ export default {
979
998
  });
980
999
  }
981
1000
  }
1001
+ },
1002
+ sortChangeEvent(params) {
1003
+ const $xeGrid = this;
1004
+ $xeGrid.handleSortEvent(params);
982
1005
  $xeGrid.dispatchEvent('sort-change', params, params.$event);
983
1006
  },
984
- pageChangeEvent(params) {
1007
+ clearAllSortEvent(params) {
985
1008
  const $xeGrid = this;
986
- const props = $xeGrid;
987
- const reactData = $xeGrid.reactData;
988
- const { proxyConfig } = props;
989
- const { tablePage } = reactData;
990
- const { $event, currentPage, pageSize } = params;
991
- const proxyOpts = $xeGrid.computeProxyOpts;
992
- tablePage.currentPage = currentPage;
993
- tablePage.pageSize = pageSize;
994
- $xeGrid.dispatchEvent('page-change', params, $event);
995
- if (proxyConfig && isEnableConf(proxyOpts)) {
996
- $xeGrid.commitProxy('query').then((rest) => {
997
- $xeGrid.dispatchEvent('proxy-query', rest, $event);
998
- });
999
- }
1009
+ $xeGrid.handleSortEvent(params);
1010
+ $xeGrid.dispatchEvent('clear-all-sort', params, params.$event);
1000
1011
  },
1001
- filterChangeEvent(params) {
1012
+ handleFilterEvent(params) {
1002
1013
  const $xeGrid = this;
1003
1014
  const props = $xeGrid;
1004
1015
  const reactData = $xeGrid.reactData;
@@ -1016,8 +1027,17 @@ export default {
1016
1027
  });
1017
1028
  }
1018
1029
  }
1030
+ },
1031
+ filterChangeEvent(params) {
1032
+ const $xeGrid = this;
1033
+ $xeGrid.handleFilterEvent(params);
1019
1034
  $xeGrid.dispatchEvent('filter-change', params, params.$event);
1020
1035
  },
1036
+ clearAllFilterEvent(params) {
1037
+ const $xeGrid = this;
1038
+ $xeGrid.handleFilterEvent(params);
1039
+ $xeGrid.dispatchEvent('clear-all-filter', params, params.$event);
1040
+ },
1021
1041
  submitFormEvent(params) {
1022
1042
  const $xeGrid = this;
1023
1043
  const props = $xeGrid;