全局文件uni.css:
.uni-tab-bar .swiper-box {
flex: 1;
width: 100%;
height: calc(100% - 100rpx);
}
VUE文件:
<template>
<view class="container">
<swiper class="swiper-box" :current="tabIndex" :duration="500" @change="changeTab">
<swiper-item v-for="(item, index) in navTabs" :key="index" class="tab-content">
<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
<view></view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</template>
<style lang="scss" scoped>
.container {
height: 100vh;
}
.swiper-box {
height: calc(100% - 80rpx);
.list-scroll-content {
height: 100%;
}
}
</style>
辰龙 (作者)
收到,刚更新了,先测试一下看看
2023-07-04 23:31
辰龙 (作者)
刚才打开几个文件试了一下,完美!!!
2023-07-04 23:33