[Vuejs]-Get value on click of tab panel in vuejs

1👍

✅

I’m not sure why you’d like to do that (strange to use that kind of hook this way) but as said before, you may want to use a variable and a click-event function to do that.

enter image description here

In your template :

<a-tab-pane v-for="config in listData" :tab="config.name" :key="config._id" @tabClick="setTabName(config.name)">

<h4 class="text-black mb-3"><strong>{{ config.name }}</strong></h4>

</a-tab-pane>

in your script :

tabName = '';

setTabName(name) { this.tabName = name; }


Leave a comment