vxe-table 3.16.7 → 3.16.9
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/es/grid/src/grid.js +52 -10
- package/es/style.css +1 -1
- package/es/table/module/custom/mixin.js +2 -2
- package/es/table/src/methods.js +18 -2
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +62 -16
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +86 -22
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/mixin.js +2 -2
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/src/methods.js +20 -2
- package/lib/table/src/methods.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +54 -10
- package/packages/table/module/custom/mixin.ts +2 -2
- package/packages/table/src/methods.ts +19 -2
- /package/es/{iconfont.1753520075971.ttf → iconfont.1753928145583.ttf} +0 -0
- /package/es/{iconfont.1753520075971.woff → iconfont.1753928145583.woff} +0 -0
- /package/es/{iconfont.1753520075971.woff2 → iconfont.1753928145583.woff2} +0 -0
- /package/lib/{iconfont.1753520075971.ttf → iconfont.1753928145583.ttf} +0 -0
- /package/lib/{iconfont.1753520075971.woff → iconfont.1753928145583.woff} +0 -0
- /package/lib/{iconfont.1753520075971.woff2 → iconfont.1753928145583.woff2} +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -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;
|
|
@@ -905,6 +907,23 @@ export default {
|
|
|
905
907
|
$xeGrid.triggerToolbarCommitEvent(tool, evnt);
|
|
906
908
|
$xeGrid.dispatchEvent('toolbar-tool-click', { code: tool.code, tool }, evnt);
|
|
907
909
|
},
|
|
910
|
+
pageChangeEvent(params) {
|
|
911
|
+
const $xeGrid = this;
|
|
912
|
+
const props = $xeGrid;
|
|
913
|
+
const reactData = $xeGrid.reactData;
|
|
914
|
+
const { proxyConfig } = props;
|
|
915
|
+
const { tablePage } = reactData;
|
|
916
|
+
const { $event, currentPage, pageSize } = params;
|
|
917
|
+
const proxyOpts = $xeGrid.computeProxyOpts;
|
|
918
|
+
tablePage.currentPage = currentPage;
|
|
919
|
+
tablePage.pageSize = pageSize;
|
|
920
|
+
$xeGrid.dispatchEvent('page-change', params, $event);
|
|
921
|
+
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
922
|
+
$xeGrid.commitProxy('query').then((rest) => {
|
|
923
|
+
$xeGrid.dispatchEvent('proxy-query', rest, $event);
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
},
|
|
908
927
|
sortChangeEvent(params) {
|
|
909
928
|
const $xeGrid = this;
|
|
910
929
|
const props = $xeGrid;
|
|
@@ -925,22 +944,25 @@ export default {
|
|
|
925
944
|
}
|
|
926
945
|
$xeGrid.dispatchEvent('sort-change', params, params.$event);
|
|
927
946
|
},
|
|
928
|
-
|
|
947
|
+
clearAllSortEvent(params) {
|
|
929
948
|
const $xeGrid = this;
|
|
930
949
|
const props = $xeGrid;
|
|
931
950
|
const reactData = $xeGrid.reactData;
|
|
951
|
+
const $xeTable = $xeGrid.$refs.refTable;
|
|
932
952
|
const { proxyConfig } = props;
|
|
933
|
-
const { tablePage } = reactData;
|
|
934
|
-
const { $event, currentPage, pageSize } = params;
|
|
935
953
|
const proxyOpts = $xeGrid.computeProxyOpts;
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
954
|
+
const sortOpts = $xeTable.computeSortOpts;
|
|
955
|
+
// 如果是服务端排序
|
|
956
|
+
if (sortOpts.remote) {
|
|
957
|
+
reactData.sortData = params.sortList;
|
|
958
|
+
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
959
|
+
reactData.tablePage.currentPage = 1;
|
|
960
|
+
$xeGrid.commitProxy('query').then((rest) => {
|
|
961
|
+
$xeGrid.dispatchEvent('proxy-query', rest, params.$event);
|
|
962
|
+
});
|
|
963
|
+
}
|
|
943
964
|
}
|
|
965
|
+
$xeGrid.dispatchEvent('clear-all-sort', params, params.$event);
|
|
944
966
|
},
|
|
945
967
|
filterChangeEvent(params) {
|
|
946
968
|
const $xeGrid = this;
|
|
@@ -962,6 +984,26 @@ export default {
|
|
|
962
984
|
}
|
|
963
985
|
$xeGrid.dispatchEvent('filter-change', params, params.$event);
|
|
964
986
|
},
|
|
987
|
+
clearAllFilterEvent(params) {
|
|
988
|
+
const $xeGrid = this;
|
|
989
|
+
const props = $xeGrid;
|
|
990
|
+
const reactData = $xeGrid.reactData;
|
|
991
|
+
const $xeTable = $xeGrid.$refs.refTable;
|
|
992
|
+
const { proxyConfig } = props;
|
|
993
|
+
const proxyOpts = $xeGrid.computeProxyOpts;
|
|
994
|
+
const filterOpts = $xeTable.computeFilterOpts;
|
|
995
|
+
// 如果是服务端过滤
|
|
996
|
+
if (filterOpts.remote) {
|
|
997
|
+
reactData.filterData = params.filterList;
|
|
998
|
+
if (proxyConfig && isEnableConf(proxyOpts)) {
|
|
999
|
+
reactData.tablePage.currentPage = 1;
|
|
1000
|
+
$xeGrid.commitProxy('query').then((rest) => {
|
|
1001
|
+
$xeGrid.dispatchEvent('proxy-query', rest, params.$event);
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
$xeGrid.dispatchEvent('clear-all-filter', params, params.$event);
|
|
1006
|
+
},
|
|
965
1007
|
submitFormEvent(params) {
|
|
966
1008
|
const $xeGrid = this;
|
|
967
1009
|
const props = $xeGrid;
|