Skip to content

Commit 7b2c553

Browse files
authored
feat: adds update:show event for CTabs (#57)
1 parent 8d934c3 commit 7b2c553

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/tabs/CTabs.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<ul :class="navClasses">
55
<CTabNav
66
v-for="(tab, key) in ctabInstances"
7-
@click.native="tabClick(tab)"
7+
@click.native="tabClick(tab, key)"
88
v-bind="tab.$attrs"
99
:title="tab.title"
1010
:custom-title-slot="tab.$scopedSlots.title"
@@ -130,9 +130,10 @@ export default {
130130
this.defaultSlotNodes = this.$slots.default
131131
},
132132
methods: {
133-
tabClick (tab) {
133+
tabClick (tab, key) {
134134
if (!tab.disabled) {
135135
this.activatedTab = tab
136+
this.$emit('update:show', key)
136137
}
137138
}
138139
}

0 commit comments

Comments
 (0)