[DOC] Fix a code bug in the example of slots

The value of activeTab should be tab_index rather than tab.
This commit is contained in:
myearn4
2023-04-24 23:08:13 +08:00
committed by Géry Debongnie
parent 63128b7d29
commit cae32c5bd4
+1 -1
View File
@@ -175,7 +175,7 @@ class Notebook extends Component {
<div class="notebook"> <div class="notebook">
<div class="tabs"> <div class="tabs">
<t t-foreach="tabNames" t-as="tab" t-key="tab_index"> <t t-foreach="tabNames" t-as="tab" t-key="tab_index">
<span t-att-class="{active:tab_index === activeTab}" t-on-click="() => state.activeTab=tab"> <span t-att-class="{active:tab_index === activeTab}" t-on-click="() => state.activeTab=tab_index">
<t t-esc="props.slots[tab].title"/> <t t-esc="props.slots[tab].title"/>
</span> </span>
</t> </t>