fix: Redirect to '/dashboard' on computer when shrinking from '/list' on mobile (#5305)
Co-authored-by: Louis Lam <louislam@users.noreply.github.com> Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
5d1b372072
commit
bd2eb30e09
@ -11,6 +11,18 @@ export default {
|
||||
components: {
|
||||
MonitorList,
|
||||
},
|
||||
watch: {
|
||||
"$root.isMobile"(newVal) {
|
||||
if (!newVal && this.$route.path === "/list") {
|
||||
this.$router.replace({ path: "/dashboard" });
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (!this.$root.isMobile && this.$route.path === "/list") {
|
||||
this.$router.replace({ path: "/dashboard" });
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -20,5 +32,4 @@ export default {
|
||||
.shadow-box {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user