Поправила кнопки на сайдбаре
This commit is contained in:
@@ -70,17 +70,9 @@ export default {
|
||||
return this.pageSettings.find((el) => el.id === "settings");
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
let href = window.location.href.slice(22);
|
||||
this.pageSettings.forEach((el, index) => {
|
||||
el.path === href.substr(href.lastIndexOf("#"))
|
||||
? (this.pageSettings[index].active = true)
|
||||
: (this.pageSettings[index].active = false);
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
"$route.path"() {
|
||||
if (this.$router.currentRoute._value.fullPath === "/calendar") {
|
||||
"$route.path"(value) {
|
||||
if (value === "/calendar") {
|
||||
this.currentPageBorder = true;
|
||||
this.pageSettings.forEach((el) =>
|
||||
el.path === "#/calendar" ? (el.active = true) : (el.active = false)
|
||||
@@ -88,6 +80,13 @@ export default {
|
||||
} else this.currentPageBorder = false;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.pageSettings.forEach((el, index) => {
|
||||
el.path === "#" + this.$route.path
|
||||
? (this.pageSettings[index].active = true)
|
||||
: (this.pageSettings[index].active = false);
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user