Skip to content

Commit

Permalink
fix vue warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rashfael committed Dec 4, 2017
1 parent 6dcbc5f commit a4af55c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
bunt-tab-header-item(:type="type", :id="tab.id", :icon="tab.icon", :text="tab.header",
:active="activeTabObj === tab", :disabled="tab.disabled",
@click.native="select(tab, index)",
v-for="(tab, index) in tabs", ref="tabElements")
v-for="(tab, index) in tabs", ref="tabElements", :key="tab.id")
.bunt-tabs-indicator(:class="[indicatorState]", :style="indicatorStyle", @transitionend="onIndicatorTransitionEnd")
.bunt-tabs-body(ref="body")
slot
Expand All @@ -29,7 +29,7 @@ export default {
},
activeTab: {
type: [Number, String, Object, Function],
}
},
data() {
Expand Down Expand Up @@ -81,10 +81,10 @@ export default {
// child.id = child.id || UUID.short(`${consts.prefix}-tab-`)
// Set the active tab
// Set the active tab element (to show indicator)
this.$nextTick(() => {
if (this.$refs.tabsContainer)
if (this.$refs.tabsContainer)
this.activateTab(this.activeTab || 0)
})
},
Expand All @@ -101,7 +101,7 @@ export default {
} else {
this.deselect()
}
},
select(tab, index) {
if (tab.disabled || this.activeTabObj === tab)
Expand All @@ -124,7 +124,7 @@ export default {
this.activeTabObj = tab
return
}
let oldIndex = this.tabs.indexOf(this.activeTabObj)
let oldRect = this.$refs.tabElements[oldIndex].$el.getBoundingClientRect()
let m = 5 // wtf is m
Expand Down

1 comment on commit a4af55c

@michael-k
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #6

Please sign in to comment.