Skip to content

Commit 5e06378

Browse files
fix: 🐛 修复 Tab 未渲染项高度会影响整体高度的问题
1 parent 529e57f commit 5e06378

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/uni_modules/wot-design-uni/components/wd-tab/index.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,11 @@
66
width: 100%;
77
flex-shrink: 0;
88
box-sizing: border-box;
9+
10+
@include e(body) {
11+
@include m(inactive) {
12+
height: 0;
13+
transition: height 0.3s ease-in-out;
14+
}
15+
}
916
}

src/uni_modules/wot-design-uni/components/wd-tab/wd-tab.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<view :class="`wd-tab ${customClass}`" :style="customStyle">
3-
<view class="wd-tab__body" v-if="shouldBeRender" :style="tabBodyStyle">
3+
<view :class="['wd-tab__body', { 'wd-tab__body--inactive': !active }]" v-if="shouldBeRender" :style="tabBodyStyle">
44
<slot />
55
</view>
66
</view>

0 commit comments

Comments
 (0)