Replace generic a.href to RouterLink
This commit is contained in:
parent
4cc6c79180
commit
5d7741ee3a
2 changed files with 9 additions and 14 deletions
|
@ -1,8 +1,3 @@
|
|||
<script setup lang="ts">
|
||||
const pathname = location.pathname
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<nav class="left drawer primary-text">
|
||||
<header>
|
||||
|
@ -11,24 +6,24 @@ const pathname = location.pathname
|
|||
<h6>Toloka2Web MD3</h6>
|
||||
</nav>
|
||||
</header>
|
||||
<a :class="(pathname == '/') ? 'active' : ''" href="/">
|
||||
<RouterLink :class="($route.path == '/') ? 'active' : ''" to="/">
|
||||
<i>home</i>
|
||||
<div>Головна</div>
|
||||
</a>
|
||||
<a :class="(pathname == '/add') ? 'active' : ''" href="/add">
|
||||
</RouterLink>
|
||||
<RouterLink :class="($route.path == '/add') ? 'active' : ''" to="/add">
|
||||
<i>add</i>
|
||||
<div>Додати</div>
|
||||
</a>
|
||||
<a :class="(pathname == '/settings') ? 'active' : ''" href="/settings">
|
||||
</RouterLink>
|
||||
<RouterLink :class="($route.path == '/settings') ? 'active' : ''" to="/settings">
|
||||
<i>settings</i>
|
||||
<div>Налаштування</div>
|
||||
</a>
|
||||
</RouterLink>
|
||||
<div class="divider small-margin"></div>
|
||||
<label>Інше</label>
|
||||
<a :class="(pathname == '/about') ? 'active' : ''" href="/about">
|
||||
<RouterLink :class="($route.path == '/about') ? 'active' : ''" to="/about">
|
||||
<i>person</i>
|
||||
<div>Про застосунок</div>
|
||||
</a>
|
||||
</RouterLink>
|
||||
</nav>
|
||||
<nav class="left m">
|
||||
<header>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<article class="secondary-text">
|
||||
<a class="row wave"><i>title</i> Toloka2Web v2 Vue Version</a>
|
||||
<hr>
|
||||
<a class="row wave"><i>conversion_path</i> v1.0.1</a>
|
||||
<a class="row wave"><i>conversion_path</i> v1.0.2</a>
|
||||
</article>
|
||||
|
||||
</template>
|
||||
|
|
Loading…
Reference in a new issue