[bugfix] Tab: active block disappeared when delete tab (#372)

* [Improvement] CouponCell text adjust

* fix: Coupon test cases

* [bugfix] SubmitBar i18n not work

* [bugfix] Tab: active block disappeared when delete tab

* [bugfix] Toast number message
This commit is contained in:
neverland
2017-12-04 11:47:27 +08:00
committed by GitHub
parent bbdf135724
commit df2911eed0
3 changed files with 10 additions and 5 deletions

View File

@@ -20,7 +20,7 @@
<div
v-else
class="van-tabs__nav"
:class="`van-tabs__nav--${this.type}`"
:class="`van-tabs__nav--${type}`"
>
<div class="van-tabs__nav-bar" :style="navBarStyle" v-if="type === 'line'"></div>
<div
@@ -101,6 +101,11 @@
} else {
this.isInitEvents = false;
}
const activeExist = val.some(tab => tab.index === this.curActive);
if (!activeExist) {
this.curActive = val[0].index || 0;
}
});
}
},