Dorodulpha
Dorodulpha

Reputation: 13

How to click on the button to change its properties and disable?

Please help me. There is a button:

<v-btn dark color="primary" class="square">Tile 1</v-btn>

How to make it so that after a click to change it to flat, disable it and change its color, for example - white?

Upvotes: 1

Views: 44

Answers (1)

Boussadjra Brahim
Boussadjra Brahim

Reputation: 1

add a property called isFlatten to you data object like :

data(){
   return{
         isFlatten:false
      }
 }

and in your template do :

<v-btn dark color="primary" class="square" :flat="isFlatten" @click="isFlatten=true">Tile 1</v-btn>

Upvotes: 2

Related Questions