fixed route vision in header component

This commit is contained in:
Kostya
2023-12-04 14:06:24 +03:00
parent 9bbb2242ef
commit 2545cf0f83

View File

@@ -107,8 +107,8 @@ export default {
</div> </div>
<div class="header__nav"> <div class="header__nav">
<nav> <nav>
<a href="#" @click="$router.push({ name: 'home' })" :class="{ 'header__nav--now' : route === 'home' }">Главная</a> <a href="#" @click="$router.push({ name: 'home' })" :class="{ 'header__nav--now' : $route === 'home' }">Главная</a>
<a href="#" @click="$router.push({ name: 'profile' })" :class="{ 'header__nav--now' : route === 'profile' }">Профиль</a> <a href="#" @click="$router.push({ name: 'profile' })" :class="{ 'header__nav--now' : $route === 'profile' }">Профиль</a>
<a href="#">Помощь</a> <a href="#">Помощь</a>
</nav> </nav>
</div> </div>