@monoui/vuejs 1.1.43 → 1.1.45
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/package.json
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
@hidden="hidden()"
|
|
9
9
|
:hide-footer="hideFooter"
|
|
10
10
|
:dialog-class="isFullScreen ? 'modal-dialog-fullScreen' : ''"
|
|
11
|
-
:content-class="
|
|
12
|
-
:body-class="
|
|
11
|
+
:content-class="computedContentClass"
|
|
12
|
+
:body-class="computedBodyClass"
|
|
13
13
|
:header-class="isFullScreen ? 'modal-header-fullScreen' : ''"
|
|
14
14
|
>
|
|
15
15
|
<mui-loader :loading="loading" />
|
|
@@ -93,6 +93,16 @@ export default {
|
|
|
93
93
|
get() {
|
|
94
94
|
return this.loading ? "" : this.title;
|
|
95
95
|
}
|
|
96
|
+
},
|
|
97
|
+
computedBodyClass() {
|
|
98
|
+
return this.isFullScreen
|
|
99
|
+
? `${this.bodyClass} modal-body-fullScreen`
|
|
100
|
+
: this.bodyClass;
|
|
101
|
+
},
|
|
102
|
+
computedContentClass() {
|
|
103
|
+
return this.isFullScreen
|
|
104
|
+
? `${this.contentClass} modal-content-fullScreen`
|
|
105
|
+
: this.contentClass;
|
|
96
106
|
}
|
|
97
107
|
},
|
|
98
108
|
props: {
|
|
@@ -148,6 +158,14 @@ export default {
|
|
|
148
158
|
enableFullScreen: {
|
|
149
159
|
type: Boolean,
|
|
150
160
|
default: false
|
|
161
|
+
},
|
|
162
|
+
bodyClass: {
|
|
163
|
+
type: String,
|
|
164
|
+
default: ""
|
|
165
|
+
},
|
|
166
|
+
contentClass: {
|
|
167
|
+
type: String,
|
|
168
|
+
default: ""
|
|
151
169
|
}
|
|
152
170
|
},
|
|
153
171
|
methods: {
|
|
@@ -495,17 +495,16 @@ export default {
|
|
|
495
495
|
this.addPopStateListener();
|
|
496
496
|
},
|
|
497
497
|
async mounted() {
|
|
498
|
-
if (this.history)
|
|
499
|
-
this.loadHistory();
|
|
498
|
+
if (this.history) this.loadHistory();
|
|
500
499
|
|
|
501
500
|
if (this.autoLoad) {
|
|
502
|
-
await this.getValues();
|
|
501
|
+
await this.getValues(true, true);
|
|
503
502
|
}
|
|
504
503
|
},
|
|
505
504
|
methods: {
|
|
506
505
|
addPopStateListener() {
|
|
507
506
|
if (this.history)
|
|
508
|
-
|
|
507
|
+
window.addEventListener("popstate", this.popStateEvent);
|
|
509
508
|
},
|
|
510
509
|
removePopStateListener() {
|
|
511
510
|
window.removeEventListener("popstate", this.popStateEvent);
|
|
@@ -580,7 +579,7 @@ export default {
|
|
|
580
579
|
row
|
|
581
580
|
);
|
|
582
581
|
},
|
|
583
|
-
async getValues(addHistory = true) {
|
|
582
|
+
async getValues(addHistory = true, initialLoad = false) {
|
|
584
583
|
this.isLoading = true;
|
|
585
584
|
this.$emit("loading", this.isLoading);
|
|
586
585
|
const { currentPage, itemPerPage } = this.settings;
|
|
@@ -592,9 +591,10 @@ export default {
|
|
|
592
591
|
itemPerPage
|
|
593
592
|
);
|
|
594
593
|
|
|
595
|
-
if (addHistory && !this.comingFromPopState) {
|
|
594
|
+
if (!initialLoad && addHistory && !this.comingFromPopState) {
|
|
596
595
|
const filterPrefix = this.getHistoryName("f-");
|
|
597
596
|
const sortPrefix = this.getHistoryName("s-");
|
|
597
|
+
let urlOriginal = new URL(window.location);
|
|
598
598
|
let url = new URL(window.location);
|
|
599
599
|
let params = new URLSearchParams(url.search);
|
|
600
600
|
//console.log("url start: " + url);
|
|
@@ -629,7 +629,8 @@ export default {
|
|
|
629
629
|
false
|
|
630
630
|
);
|
|
631
631
|
}
|
|
632
|
-
|
|
632
|
+
if (JSON.stringify(url) != JSON.stringify(urlOriginal))
|
|
633
|
+
this.replaceHistory(url);
|
|
633
634
|
}
|
|
634
635
|
this.comingFromPopState = false;
|
|
635
636
|
this.skipWatch = false;
|