感觉这列表切换有点类似于轮播图,而且感觉这代码直接可以拿来用,稍微改一改样式什么的就OK了,列表切换也是用到的地方也很多wxml中的代码如下:



音乐推荐

播放器

播放列表






























音乐推荐

播放器

播放列表


























在js页面的data中wxss样式:
.tab{
display: flex;
}
.tab-item{
flex: 1;
font-size:10pt ;
text-align: center;
line-height: 72rpx;
border-bottom: 6rpx solid #eee;
}
.content{
flex: 1;
}
.content>swiper{
height: 100%;
}
.tab-item.active{
color: #c25b5b;
border-bottom-color:#c25b5b ;
}
.tab{
display: flex;
}
.tab-item{
flex: 1;
font-size:10pt ;
text-align: center;
line-height: 72rpx;
border-bottom: 6rpx solid #eee;
}
.content{
flex: 1;
}
.content>swiper{
height: 100%;
}
.tab-item.active{
color: #c25b5b;
border-bottom-color:#c25b5b ;
}想设置这里的样式可以再.tab-item里面可以根据自己的审美设置 ,类似于下面这样总结总结总结