mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 19:24:16 +00:00
[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:
@@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user