I'm currently designing a Vue page that includes the Buefy b-tab element. My request is quite simple, as outlined below:
The page consists of a Buefy Tab element and a button.
https://i.sstatic.net/TkiVYfJj.png
Upon clicking the tick button, it should display Tab 1 and Tab 3
https://i.sstatic.net/itkhtxbj.png
Please review my code in the CodePen link provided below:
https://codepen.io/aedyucheng/pen/GRaWKoY?editors=1010
In my CodePen demo, there's something odd -
If Tab 2's label is set to label="Tab 2"
, Tab 1's label doesn't show up...
<b-tab-item label="Tab 2">
<div>Tab 2 Content</div>
</b-tab-item>
However, if I change Tab 2's label to be within a <template #header>
tag, then Tab 1 displays correctly. Why is this happening...?
<b-tab-item>
<template #header>
<span>Tab 2</span>
</template>
<div>Tab 2 Content</div>
</b-tab-item>
I can't seem to figure out why this is occurring. Even after consulting ChatGPT, it continues to provide irrelevant responses without addressing the underlying issue. Can anyone shed light on why only <template #header>
works in my scenario?