@monoui/vuejs 1.1.35 → 1.1.36
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 +18 -16
package/package.json
CHANGED
|
@@ -495,11 +495,7 @@ export default {
|
|
|
495
495
|
this.addPopStateListener();
|
|
496
496
|
},
|
|
497
497
|
async mounted() {
|
|
498
|
-
|
|
499
|
-
const sortingParams = this.getHistoryParameters("s-");
|
|
500
|
-
if (filterParams || sortingParams) {
|
|
501
|
-
this.loadHistory(filterParams, sortingParams);
|
|
502
|
-
}
|
|
498
|
+
this.loadHistory();
|
|
503
499
|
if (this.autoLoad) {
|
|
504
500
|
await this.getValues();
|
|
505
501
|
}
|
|
@@ -516,7 +512,7 @@ export default {
|
|
|
516
512
|
this.loadHistory();
|
|
517
513
|
this.getValues(false);
|
|
518
514
|
},
|
|
519
|
-
loadHistory(
|
|
515
|
+
loadHistory() {
|
|
520
516
|
this.settings.currentPage = this.getHistoryParameter("page", 1);
|
|
521
517
|
this.settings.itemPerPage = this.getHistoryParameter(
|
|
522
518
|
"limit",
|
|
@@ -528,8 +524,8 @@ export default {
|
|
|
528
524
|
""
|
|
529
525
|
);
|
|
530
526
|
}
|
|
531
|
-
this.loadHistoryFilters(
|
|
532
|
-
this.loadHistorySorting(
|
|
527
|
+
this.loadHistoryFilters();
|
|
528
|
+
this.loadHistorySorting();
|
|
533
529
|
},
|
|
534
530
|
sortableIcon(column) {
|
|
535
531
|
const currentSort = this.sorting.find(x => x.Column === column);
|
|
@@ -727,10 +723,12 @@ export default {
|
|
|
727
723
|
if (filter) {
|
|
728
724
|
filter.Value = value;
|
|
729
725
|
} else {
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
726
|
+
if (value) {
|
|
727
|
+
this.filters.push({
|
|
728
|
+
Column: column,
|
|
729
|
+
Value: value
|
|
730
|
+
});
|
|
731
|
+
}
|
|
734
732
|
}
|
|
735
733
|
this.getValues();
|
|
736
734
|
},
|
|
@@ -881,12 +879,14 @@ export default {
|
|
|
881
879
|
console.error(error);
|
|
882
880
|
}
|
|
883
881
|
},
|
|
884
|
-
loadHistoryFilters(
|
|
885
|
-
|
|
882
|
+
loadHistoryFilters() {
|
|
883
|
+
const filterParams = this.getHistoryParameters("f-");
|
|
886
884
|
if (!filterParams) return;
|
|
887
885
|
|
|
888
886
|
const trimName = this.getHistoryName("f-");
|
|
889
887
|
const names = Object.keys(filterParams);
|
|
888
|
+
if (!names || names.length == 0) return;
|
|
889
|
+
|
|
890
890
|
this.filters.splice(0, this.filters.length);
|
|
891
891
|
for (const paramName of names) {
|
|
892
892
|
const value = filterParams[paramName];
|
|
@@ -899,12 +899,14 @@ export default {
|
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
901
|
},
|
|
902
|
-
loadHistorySorting(
|
|
903
|
-
|
|
902
|
+
loadHistorySorting() {
|
|
903
|
+
const sortingParams = this.getHistoryParameters("s-");
|
|
904
904
|
if (!sortingParams) return;
|
|
905
905
|
|
|
906
906
|
const trimName = this.getHistoryName("s-");
|
|
907
907
|
const names = Object.keys(sortingParams);
|
|
908
|
+
if (!names || names.length == 0) return;
|
|
909
|
+
|
|
908
910
|
this.sorting.splice(0, this.sorting.length);
|
|
909
911
|
for (const paramName of names) {
|
|
910
912
|
var paramValue = sortingParams[paramName];
|