Answer the question
In order to leave comments, you need to log in
Vue.js define route?
There is an address localhost:8080/editconsigment/1
activeUsers2(route)
{
if route === '/accounting/editconsigment/:id')
{
return true;
}
return false;
}
How to determine what is currently route ===/editconsigment/1
Answer the question
In order to leave comments, you need to log in
<li class="list-group-item" :class="{ active: activeUsers($route.path,$route.params.id) }"> <router-link to="/accounting/consigment">Накладная</router-link></li>
methods:{
activeUsers(route,id)
{
if(route === '/accounting/consigment' || route === '/accounting/editconsigment/'+id)
{
return true;
}
return false;
},
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question