in vue, event modifiers have been added, such as < form v-on:submit.prevent > < / form > . The
question is: how do I do this if I need to cancel the prevent event modifier after triggering a condition?
in vue, event modifiers have been added, such as < form v-on:submit.prevent > < / form > . The
question is: how do I do this if I need to cancel the prevent event modifier after triggering a condition?
modifier seems to be impossible to write directly to the event, but you can implement your requirements in this way
<form v-on:submit="e => isPrevent && e.preventDefault()"></form>
isPrevent true triggers prevent
<button class="cancle_follow" :class="{followed:isFollow}" @click="addFollowSeller($event)">< button> addFollowSeller:function(event){ app.isFollow = true; console.log(event.currentTarget); ...