This commit is contained in:
mohit-nagaraj 2024-10-08 08:43:30 +05:30
parent e2ce0e38a6
commit 72849de1b4
No known key found for this signature in database
4 changed files with 16 additions and 18 deletions

View file

@ -74,7 +74,7 @@ export default {
* Clean up modal and restore scroll behavior
* @returns {void}
*/
cleanupModal() {
cleanupModal() {
if (this.modal) {
try {
this.modal.hide();
@ -82,9 +82,9 @@ export default {
console.warn("Modal hide failed:", e);
}
}
document.body.classList.remove('modal-open');
document.body.style.paddingRight = '';
document.body.style.overflow = '';
document.body.classList.remove("modal-open");
document.body.style.paddingRight = "";
document.body.style.overflow = "";
}
},
};

View file

@ -226,12 +226,10 @@ export default {
this.notification.name = this.getUniqueDefaultName(to);
}
},
watch: {
$route(to, from) {
this.cleanupModal();
}
},
},
mounted() {
this.modal = new Modal(this.$refs.modal);
},
@ -352,7 +350,7 @@ export default {
* Clean up modal and restore scroll behavior
* @returns {void}
*/
cleanupModal() {
cleanupModal() {
if (this.modal) {
try {
this.modal.hide();
@ -360,9 +358,9 @@ export default {
console.warn("Modal hide failed:", e);
}
}
document.body.classList.remove('modal-open');
document.body.style.paddingRight = '';
document.body.style.overflow = '';
document.body.classList.remove("modal-open");
document.body.style.paddingRight = "";
document.body.style.overflow = "";
}
},
};

View file

@ -229,7 +229,7 @@ export default {
* Clean up modal and restore scroll behavior
* @returns {void}
*/
cleanupModal() {
cleanupModal() {
if (this.modal) {
try {
this.modal.hide();
@ -237,9 +237,9 @@ export default {
console.warn("Modal hide failed:", e);
}
}
document.body.classList.remove('modal-open');
document.body.style.paddingRight = '';
document.body.style.overflow = '';
document.body.classList.remove("modal-open");
document.body.style.paddingRight = "";
document.body.style.overflow = "";
}
},
};

View file

@ -478,7 +478,7 @@ export default {
* Clean up modal and restore scroll behavior
* @returns {void}
*/
cleanupModal() {
cleanupModal() {
if (this.modal) {
try {
this.modal.hide();
@ -486,9 +486,9 @@ export default {
console.warn("Modal hide failed:", e);
}
}
document.body.classList.remove('modal-open');
document.body.style.paddingRight = '';
document.body.style.overflow = '';
document.body.classList.remove("modal-open");
document.body.style.paddingRight = "";
document.body.style.overflow = "";
}
},
};