mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 14:54:05 +00:00
fix warning The watch property should be above the mounted
This commit is contained in:
parent
49a5272573
commit
ffa8aad019
1 changed files with 7 additions and 6 deletions
|
@ -11,18 +11,19 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
MonitorList,
|
MonitorList,
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
if (!this.$root.isMobile && this.$route.path === "/list") {
|
|
||||||
this.$router.push("/dashboard");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
"$root.isMobile"(newVal) {
|
"$root.isMobile"(newVal) {
|
||||||
if (!newVal && this.$route.path === "/list") {
|
if (!newVal && this.$route.path === "/list") {
|
||||||
this.$router.push("/dashboard");
|
this.$router.push("/dashboard");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
mounted() {
|
||||||
|
if (!this.$root.isMobile && this.$route.path === "/list") {
|
||||||
|
this.$router.push("/dashboard");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue