[bugfix] Tab: incorrect height when use animated prop

This commit is contained in:
陈嘉涵
2019-05-11 11:39:31 +08:00
parent 36f2b956f1
commit 1158a31cb1
6 changed files with 52 additions and 44 deletions
+1 -1
View File
@@ -442,7 +442,7 @@ export default sfc({
{this.slots('nav-right')}
</div>
</div>
<div ref="content" class={bem('content', { animated })}>
<div ref="content" class={bem('content')}>
{animated ? (
<div class={bem('track')} style={this.trackStyle}>
{this.slots()}
+9 -7
View File
@@ -117,12 +117,6 @@
border-radius: 3px;
}
&__content {
&--animated {
overflow: hidden;
}
}
&__track {
position: relative;
display: flex;
@@ -146,10 +140,18 @@
height: @tabs-card-height;
}
}
}
.van-tab__pane {
.van-tab__pane {
&,
&-wrapper {
flex-shrink: 0;
box-sizing: border-box;
width: 100%;
}
&-wrapper--inactive {
height: 0;
overflow: visible;
}
}