[Vuejs]-How to set active with multiple buttons

0👍

You could use your current_basemap variable to do it:

<button v-for="option in options" 
  :key="option.value" 
  :class="option.class + `${option.value === current_basemap ? ' active ' : ''}`"
  @click="UpdateBaseMap(option.value)">
  {{option.text}}
</button> 

Leave a comment