@monoui/vuejs 1.1.34 → 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 +19 -18
package/package.json
CHANGED
|
@@ -495,12 +495,7 @@ export default {
|
|
|
495
495
|
this.addPopStateListener();
|
|
496
496
|
},
|
|
497
497
|
async mounted() {
|
|
498
|
-
|
|
499
|
-
var sortingPrefix = this.getHistoryName("s-");
|
|
500
|
-
let url = new URL(window.location).toString();
|
|
501
|
-
if (url.indexOf(filterPrefix) >= 0 || url.indexOf(sortingPrefix) >= 0) {
|
|
502
|
-
this.loadHistory();
|
|
503
|
-
}
|
|
498
|
+
this.loadHistory();
|
|
504
499
|
if (this.autoLoad) {
|
|
505
500
|
await this.getValues();
|
|
506
501
|
}
|
|
@@ -728,10 +723,12 @@ export default {
|
|
|
728
723
|
if (filter) {
|
|
729
724
|
filter.Value = value;
|
|
730
725
|
} else {
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
726
|
+
if (value) {
|
|
727
|
+
this.filters.push({
|
|
728
|
+
Column: column,
|
|
729
|
+
Value: value
|
|
730
|
+
});
|
|
731
|
+
}
|
|
735
732
|
}
|
|
736
733
|
this.getValues();
|
|
737
734
|
},
|
|
@@ -883,14 +880,16 @@ export default {
|
|
|
883
880
|
}
|
|
884
881
|
},
|
|
885
882
|
loadHistoryFilters() {
|
|
886
|
-
const
|
|
887
|
-
if (!
|
|
883
|
+
const filterParams = this.getHistoryParameters("f-");
|
|
884
|
+
if (!filterParams) return;
|
|
888
885
|
|
|
889
886
|
const trimName = this.getHistoryName("f-");
|
|
890
|
-
const names = Object.keys(
|
|
887
|
+
const names = Object.keys(filterParams);
|
|
888
|
+
if (!names || names.length == 0) return;
|
|
889
|
+
|
|
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({
|
|
@@ -901,14 +900,16 @@ export default {
|
|
|
901
900
|
}
|
|
902
901
|
},
|
|
903
902
|
loadHistorySorting() {
|
|
904
|
-
const
|
|
905
|
-
if (!
|
|
903
|
+
const 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);
|
|
908
|
+
if (!names || names.length == 0) return;
|
|
909
|
+
|
|
909
910
|
this.sorting.splice(0, this.sorting.length);
|
|
910
911
|
for (const paramName of names) {
|
|
911
|
-
var paramValue =
|
|
912
|
+
var paramValue = sortingParams[paramName];
|
|
912
913
|
let value = undefined;
|
|
913
914
|
if (paramValue && paramValue === "1") value = true;
|
|
914
915
|
else if (paramValue && paramValue === "0") value = false;
|