Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tabs 高度不能设置 #15

Open
gtyang opened this issue Nov 8, 2020 · 2 comments
Open

tabs 高度不能设置 #15

gtyang opened this issue Nov 8, 2020 · 2 comments

Comments

@gtyang
Copy link

gtyang commented Nov 8, 2020

tabs-content 里内容高度调整后,容器的高度没有跟着变化

<mp-tabs
  tabs="{{tabs}}"
  activeTab="{{activeTab}}"
  swiperClass="weui-tabs-swiper"
  bindtabclick="onTabCLick"
  bindchange="onChange"
  activeClass="tab-bar-title__selected"
>
  <block wx:for="{{tabs}}" wx:key="title">
    <view class="tab-content" slot="tab-content-{{index}}" > <view style="height: 300px;"> {{item.title}} </view></view>
  </block>
</mp-tabs>
<view> ---- footer ---- </view>

这是移除了样式表里的高度设置

.tab-content {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 40rpx;
}
@ratelgogo
Copy link

ratelgogo commented Oct 18, 2021

.weui-tabs-swiper {
    height: 100vh;
}
.tab-content {
    height: calc(100vh - 200rpx) !important;
    overflow-y: auto !important;
}

@ratelgogo
Copy link

ratelgogo commented Oct 18, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants