【发布时间】:2020-01-21 16:25:15
【问题描述】:
在 BootstrapVue 选项卡中,当我们单击一个选项卡以更改为另一个选项卡 => 事件单击将触发。事件单击触发后,我需要进行一些验证。然后,如果失败,我将取消该事件并阻止选项卡更改。但是我在 BootstrapVue 文档中找不到任何方法来做到这一点。我需要你的帮助!!
<b-tabs pills content-class="mt-3" v-model="tabIndex" >
<b-tab title="Profile" active @click="onChange" id="test" title-item-class="btnTab">
<information @changeTab="changeTabInformation" ></information>
</b-tab>
<b-tab title="Preferences" @click="onChange" title-item-class="btnTab">
<preference @changeTab="changeTabPreference" ></preference>
</b-tab>
</b-tabs>
(希望你能理解我,因为我的英文写作能力很差:()
【问题讨论】:
-
将
@click="onChange"更改为@click.stop="onChange"会阻止标签更改吗?
标签: typescript vue.js bootstrap-vue