fix: 一个塘口中超过5个设备,就显示不出来,bug修复。

This commit is contained in:
tianyongbao
2026-01-19 20:46:55 +08:00
parent 4e4243d5e2
commit d7459d4f7c

View File

@@ -33,8 +33,8 @@
</nut-col>
</nut-row>
<nut-row v-if="doList.length > 0" class="pondInfo_home">
<view class="device-tabs-wrapper">
<scroll-view scroll-x="true" :show-scrollbar="false" :scroll-with-animation="true">
<nut-col :span="24">
<view class="device-tabs-wrapper">
<view class="device-tabs">
<view
v-for="item in doList"
@@ -48,8 +48,8 @@
</view>
</view>
</view>
</scroll-view>
</view>
</view>
</nut-col>
<nut-row v-for="item in doList" :key="item.id">
<nut-col :span="24" v-if="doDev == item.id">
<view class="view_f_between">
@@ -1972,31 +1972,24 @@ defineExpose({
}
.device-tabs-wrapper {
width: 100%;
white-space: nowrap;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
-ms-overflow-style: none;
&::-webkit-scrollbar {
display: none;
}
padding: 10rpx 0;
}
.device-tabs {
display: flex;
flex-wrap: nowrap;
padding: 20rpx 0;
flex-wrap: wrap;
gap: 20rpx;
padding: 10rpx 0;
}
.custom-tab-item {
padding: 10rpx 20rpx;
margin-right: 10rpx;
background-color: #f5f6f7;
border-radius: 8rpx;
transition: all 0.3s ease;
white-space: nowrap;
&:last-child {
margin-right: 0;
}
flex-shrink: 0;
min-width: 120rpx;
text-align: center;
&.tab-active {
background-color: #ffffff;