@monoui/vuejs 1.1.34 → 1.1.35
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/dist/main.js +2 -2
- package/package.json +1 -1
- package/src/components/Table/Table.vue +17 -18
package/package.json
CHANGED
|
@@ -495,11 +495,10 @@ export default {
|
|
|
495
495
|
this.addPopStateListener();
|
|
496
496
|
},
|
|
497
497
|
async mounted() {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
this.loadHistory();
|
|
498
|
+
const filterParams = this.getHistoryParameters("f-");
|
|
499
|
+
const sortingParams = this.getHistoryParameters("s-");
|
|
500
|
+
if (filterParams || sortingParams) {
|
|
501
|
+
this.loadHistory(filterParams, sortingParams);
|
|
503
502
|
}
|
|
504
503
|
if (this.autoLoad) {
|
|
505
504
|
await this.getValues();
|
|
@@ -517,7 +516,7 @@ export default {
|
|
|
517
516
|
this.loadHistory();
|
|
518
517
|
this.getValues(false);
|
|
519
518
|
},
|
|
520
|
-
loadHistory() {
|
|
519
|
+
loadHistory(filterParams, sortingParams) {
|
|
521
520
|
this.settings.currentPage = this.getHistoryParameter("page", 1);
|
|
522
521
|
this.settings.itemPerPage = this.getHistoryParameter(
|
|
523
522
|
"limit",
|
|
@@ -529,8 +528,8 @@ export default {
|
|
|
529
528
|
""
|
|
530
529
|
);
|
|
531
530
|
}
|
|
532
|
-
this.loadHistoryFilters();
|
|
533
|
-
this.loadHistorySorting();
|
|
531
|
+
this.loadHistoryFilters(filterParams);
|
|
532
|
+
this.loadHistorySorting(sortingParams);
|
|
534
533
|
},
|
|
535
534
|
sortableIcon(column) {
|
|
536
535
|
const currentSort = this.sorting.find(x => x.Column === column);
|
|
@@ -882,15 +881,15 @@ export default {
|
|
|
882
881
|
console.error(error);
|
|
883
882
|
}
|
|
884
883
|
},
|
|
885
|
-
loadHistoryFilters() {
|
|
886
|
-
|
|
887
|
-
if (!
|
|
884
|
+
loadHistoryFilters(filterParams) {
|
|
885
|
+
if (!filterParams) filterParams = this.getHistoryParameters("f-");
|
|
886
|
+
if (!filterParams) return;
|
|
888
887
|
|
|
889
888
|
const trimName = this.getHistoryName("f-");
|
|
890
|
-
const names = Object.keys(
|
|
889
|
+
const names = Object.keys(filterParams);
|
|
891
890
|
this.filters.splice(0, this.filters.length);
|
|
892
891
|
for (const paramName of names) {
|
|
893
|
-
const value =
|
|
892
|
+
const value = filterParams[paramName];
|
|
894
893
|
const column = paramName.replace(trimName, "");
|
|
895
894
|
if (value) {
|
|
896
895
|
this.filters.push({
|
|
@@ -900,15 +899,15 @@ export default {
|
|
|
900
899
|
}
|
|
901
900
|
}
|
|
902
901
|
},
|
|
903
|
-
loadHistorySorting() {
|
|
904
|
-
|
|
905
|
-
if (!
|
|
902
|
+
loadHistorySorting(sortingParams) {
|
|
903
|
+
if (!sortingParams) sortingParams = this.getHistoryParameters("s-");
|
|
904
|
+
if (!sortingParams) return;
|
|
906
905
|
|
|
907
906
|
const trimName = this.getHistoryName("s-");
|
|
908
|
-
const names = Object.keys(
|
|
907
|
+
const names = Object.keys(sortingParams);
|
|
909
908
|
this.sorting.splice(0, this.sorting.length);
|
|
910
909
|
for (const paramName of names) {
|
|
911
|
-
var paramValue =
|
|
910
|
+
var paramValue = sortingParams[paramName];
|
|
912
911
|
let value = undefined;
|
|
913
912
|
if (paramValue && paramValue === "1") value = true;
|
|
914
913
|
else if (paramValue && paramValue === "0") value = false;
|