[bugfix] Tabs:修复开启animated属性时导致的滚动问题 (#2238)

This commit is contained in:
张敏
2018-12-15 18:04:25 +08:00
committed by neverland
parent a94683a7e3
commit e2c4d60058
6 changed files with 118 additions and 109 deletions
+13 -2
View File
@@ -92,15 +92,15 @@
<demo-block :title="$t('title8')">
<van-tabs
:active="active"
animated
class="animated-tabs"
>
<van-tab
:title="$t('tab') + index"
v-for="index in tabs"
:key="index"
>
{{ $t('content') }} {{ index }}
<div class="custom-content-wrap">{{ $t('content') }} {{ index }}</div>
</van-tab>
</van-tabs>
</demo-block>
@@ -214,5 +214,16 @@ export default {
padding: 50px 20px;
}
}
.animated-tabs {
.van-tab__pane {
padding: 0 20px;
}
}
.custom-content-wrap {
height: 60px;
line-height: 60px;
}
}
</style>