fix potential bug to render active tab in controlled way
This commit is contained in:
parent
9dd9ba0205
commit
eafd53f994
1 changed files with 1 additions and 1 deletions
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue