Skip to content

Commit

Permalink
fix: 修复section & tabs 隐藏sliderbar无效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzhenfei committed Nov 4, 2020
1 parent 48eac99 commit 2174c6a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
19 changes: 13 additions & 6 deletions components/pi-section/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@
<view v-if="$slots.left" class="pi-pd-right-24">
<slot name="left" />
</view>
<!-- 标题和描述 -->
<view v-if="title || desc" class="pi-align-baseline">
<view v-if="title" :style="[titleStyle]" class="list-item-title">{{ title }}</view>
<view v-if="desc" :style="[descStyle]" class="list-item-desc">{{ desc }}</view>
</view>
<!-- 中间区域 -->
<view class="pi-flex-sub"><slot /></view>
<view class="pi-flex-sub pi-align-baseline">
<!-- 标题和描述 -->
<view
v-if="$slots.default || $slots.$default || title"
:style="[titleStyle]"
class="list-item-title"
>
<slot>{{ title }}</slot>
</view>
<view v-if="$slots.desc || desc" :style="[descStyle]" class="list-item-desc">
<slot name="desc">{{ desc }}</slot>
</view>
</view>
<!-- 右侧区域 -->
<view class="extra">{{ extraText }}</view>
<view v-if="$slots.right" class="pi-pd-left-24">
Expand Down
3 changes: 2 additions & 1 deletion components/pi-tabs/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
class="slider-bar-guide"
:style="[{ 'background-color': showSliderBarGuide ? '#e4e7ed' : 'unset' }]"
>
<view :style="[getSliderBarStyle]" :class="{ 'slider-bar': showSliderBar }" />
fixf
<view v-if="showSliderBar" class="slider-bar" :style="[getSliderBarStyle]" />
</view>
</view>
</scroll-view>
Expand Down

0 comments on commit 2174c6a

Please sign in to comment.