use key prop instead of dataset to identify active tab
This commit is contained in:
parent
cd14566a34
commit
df3e80b7c3
5 changed files with 11 additions and 17 deletions
|
@ -20,7 +20,7 @@ export default Vue.component('tab-switcher', {
|
|||
activateTab (index, dataset) {
|
||||
return () => {
|
||||
if (typeof this.onSwitch === 'function') {
|
||||
this.onSwitch.call(null, this.$slots.default[index].elm.dataset)
|
||||
this.onSwitch.call(null, this.$slots.default[index].key)
|
||||
}
|
||||
this.active = index
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue