2👍
✅
It’s because the div
is removed and the event handler binding is lost. Try not to mix Vue with jQuery. Something like this would be better:
<div class="panel panel-default">
<Select/>
</div>
<div class="panel panel-default" v-if="fileMode == 0"></div>
<div class="panel panel-default" v-else-if="fileMode == 1"></div>
<div class="panel panel-default" v-else>
<div class="form" @submit="uploadCsvAndGetData"/>
</div>
Source:stackexchange.com