|
@@ -4,10 +4,12 @@
|
|
|
<u-search @search="toSearch" :show-action="false" shape="round" placeholder="搜索您想要的内容"
|
|
|
v-model="searchForm.keyword"></u-search>
|
|
|
<!-- tabs -->
|
|
|
- <view style="padding-top: 20rpx;display: flex;">
|
|
|
- <u-tabs style="flex: 1;" :list="tabsList" :is-scroll="true" font-size="24" :bold="false"
|
|
|
- inactive-color="#000000" active-color="#000000" :bar-style="{'background-color': '#2979ff'}"
|
|
|
- :gutter="30" height="45" v-model="currentTab" @change="changeTab"></u-tabs>
|
|
|
+ <view class="tabs-container">
|
|
|
+ <scroll-view scroll-x="true" style="width:100%;" :scroll-with-animation="true" :show-scrollbar="true">
|
|
|
+ <u-tabs style="flex: 1;" :list="tabsList" :is-scroll="true" font-size="24" :bold="false"
|
|
|
+ inactive-color="#000000" active-color="#000000" :bar-style="{'background-color': '#2979ff'}"
|
|
|
+ :gutter="30" height="45" v-model="currentTab" @change="changeTab"></u-tabs>
|
|
|
+ </scroll-view>
|
|
|
<!-- <u-icon name="list" style="flex: 0 0 auto;padding-left: 20rpx;"></u-icon> -->
|
|
|
</view>
|
|
|
<!-- 列表 -->
|
|
@@ -346,7 +348,7 @@
|
|
|
<style lang="scss" scoped>
|
|
|
.container {
|
|
|
// padding: 20px;
|
|
|
- // width: 100vh;
|
|
|
+ // width: 100vw;
|
|
|
// overflow: hidden;
|
|
|
}
|
|
|
|
|
@@ -354,6 +356,13 @@
|
|
|
font-size: 48rpx;
|
|
|
margin-bottom: 30rpx;
|
|
|
}
|
|
|
+ .tabs-container {
|
|
|
+ padding-top: 20rpx;
|
|
|
+ display: flex;
|
|
|
+ width: 100%; /* 确保宽度足够 */
|
|
|
+ overflow-x: auto; /* 横向滚动 */
|
|
|
+ -webkit-overflow-scrolling: touch; /* 在iOS上启用流畅滚动 */
|
|
|
+ }
|
|
|
|
|
|
.course-item {
|
|
|
margin: 20rpx 0;
|