fix potential bug to render active tab in controlled way

This commit is contained in:
taehoon 2019-08-10 00:25:09 -04:00
parent 9dd9ba0205
commit eafd53f994
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ export default Vue.component('tab-switcher', {
const contents = this.$slots.default.map((slot, index) => { const contents = this.$slots.default.map((slot, index) => {
if (!slot.tag) return if (!slot.tag) return
const active = index === this.active const active = this.isActiveTab(index)
if (this.renderOnlyFocused) { if (this.renderOnlyFocused) {
return active return active
? <div class="active">{slot}</div> ? <div class="active">{slot}</div>