<view class='aboutusContainer'>
<image src='/assets/images/company.png' class='companyLogo'></image>
<view class='tabContainer'>
<text class="tab-item {
{currentTab==0?'active':''}}" data-current="0" bindtap="clickTab">公司介绍</text>
<text class="tab-item {
{currentTab==1?'active':''}}" data-current="1" bindtap="clickTab">企业资质</text>
<text class="tab-item {
{currentTab==2?'active':''}}" data-current="2" bindtap="clickTab">发展历程</text>
<text class="tab-item {
{currentTab==3?'active':''}}" data-current="3" bindtap="clickTab">分支机构</text>
小程序tab切换,内容高度自适应
最新推荐文章于 2022-03-29 03:09:03 发布
本文详细介绍了如何在微信小程序中实现Tab切换时,各个内容区域根据实际内容自动调整高度,确保界面布局的流畅性和用户体验。通过监听tab切换事件,动态计算内容区域的高度,并应用到对应的容器,达到高度自适应的效果。
摘要由CSDN通过智能技术生成