0π
β
I think you should use a method instead, as you canβt pass parameters to computed properties.
Use this
...
methods : {
showRole(user){
//code that returns the button class
}
}
...
<button :class="showRole(user)">Activate
Source:stackexchange.com