Skip to content

Commit

Permalink
fix: 🐛 修复 Tab 未渲染项高度会影响整体高度的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Moonofweisheng committed Nov 25, 2024
1 parent 529e57f commit 5e06378
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/uni_modules/wot-design-uni/components/wd-tab/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@
width: 100%;
flex-shrink: 0;
box-sizing: border-box;

@include e(body) {
@include m(inactive) {
height: 0;
transition: height 0.3s ease-in-out;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<view :class="`wd-tab ${customClass}`" :style="customStyle">
<view class="wd-tab__body" v-if="shouldBeRender" :style="tabBodyStyle">
<view :class="['wd-tab__body', { 'wd-tab__body--inactive': !active }]" v-if="shouldBeRender" :style="tabBodyStyle">
<slot />
</view>
</view>
Expand Down

0 comments on commit 5e06378

Please sign in to comment.