<button id="btn1"> Button 1 </button>
<button id="btn2" v-if="state == 2"> Button 2 </button>
export default {
data() {
return {
emailPreferences: {
isLoading: false
},
state: 0
}
},
methods: {
OnBtn1Click() {
this.state = 2;
}
}
}
I'm trying to show the button "btn2" when I click the Button 1. But it doesn't seems to work.
clicklistener on the button.@click="OnBtn1Click".