fix:redirect /list on mobile to /dashboard when shrinking on computer

This commit is contained in:
logorrheique 2024-10-27 11:36:46 +01:00
parent a6cb8584fc
commit 5f67a868cb
31 changed files with 42517 additions and 42498 deletions

View file

@ -11,6 +11,18 @@ export default {
components: {
MonitorList,
},
mounted() {
if (!this.$root.isMobile && this.$route.path === '/list') {
this.$router.push('/dashboard');
}
},
watch: {
'$root.isMobile'(newVal) {
if (!newVal && this.$route.path === '/list') {
this.$router.push('/dashboard');
}
}
}
};
</script>
@ -21,4 +33,11 @@ export default {
padding: 20px;
}
.slide-fade-enter-active, .slide-fade-leave-active {
transition: all 0.5s ease;
}
.slide-fade-enter, .slide-fade-leave-to {
transform: translateX(10px);
opacity: 0;
}
</style>