Merge pull request #155 from dderbentsov/UC-41
Фикс активной иконки сайдбара
This commit is contained in:
@@ -32,7 +32,7 @@ export default {
|
|||||||
pageSettings: [
|
pageSettings: [
|
||||||
{
|
{
|
||||||
id: "calendar",
|
id: "calendar",
|
||||||
path: "#/",
|
path: "#/calendar",
|
||||||
active: true,
|
active: true,
|
||||||
icon: "icon-calendar-2",
|
icon: "icon-calendar-2",
|
||||||
},
|
},
|
||||||
@@ -69,7 +69,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
let href = window.location.href.slice(22);
|
let href = window.location.href.slice(22);
|
||||||
this.pageSettings.forEach((el, index) => {
|
this.pageSettings.forEach((el, index) => {
|
||||||
el.path === href
|
el.path === href.substr(href.lastIndexOf("#"))
|
||||||
? (this.pageSettings[index].active = true)
|
? (this.pageSettings[index].active = true)
|
||||||
: (this.pageSettings[index].active = false);
|
: (this.pageSettings[index].active = false);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user