当前位置: 代码迷 >> 综合 >> 小程序 scroll-view 弹窗 穿透问题
  详细解决方案

小程序 scroll-view 弹窗 穿透问题

热度:54   发布时间:2024-02-20 00:55:50.0

在弹窗标签上添加属性:catchtouchmove="true",即可

<view class="tc_con" wx:if="{
   {warningShow}}" catchtouchmove="true"><view class="con_ma"><view class="con_title"><view class="title"><image src="/images/equipment/ico.png"></image><text class="te1">{
   {currentime}}</text></view><view class="his_img" catchtap="cloneTap"><image src="/images/equipment/clone.png" mode="aspectFit"></image></view></view><view class="con_tenm"><scroll-view scroll-y style="height: {
   {heightGt + 'rpx'}} " scroll-into-view="{
   {waringId}}"><view class="warninglist"><wux-row wux-class="title"><wux-col span="4" class="wux-text--center"><text>时间</text></wux-col><wux-col span="4" class="wux-text--center"><text>温度</text></wux-col><wux-col span="4" class="wux-text--center"><text>类型</text></wux-col></wux-row><block wx:for="{
   {warningList}}" wx:for-item="item" wx:for-index="id" wx:key="id"><wux-row wux-class="data {
   {item.selectShow?'waActive':''}}" id="{
   {item.id}}"><wux-col span="4" class="wux-text--center"><text>{
   {item.time}}</text></wux-col><wux-col span="4" class="wux-text--center"><text wx:if="{
   {item.type == 01}}" style="color: #FF3939;font-weight: bold;">{
   {item.value}}℃</text><text wx:if="{
   {item.type == 02}}" style="color: #47C8EF;font-weight: bold;">{
   {item.value}}℃</text><text wx:if="{
   {item.type == null}}" style="color: rgb(152,225,101);font-weight: bold;">{
   {item.value}}℃</text></wux-col><wux-col span="4" class="wux-text--center"><text wx:if="{
   {item.type == 01}}" >高温</text><text wx:if="{
   {item.type == 02}}" >低温</text><text wx:if="{
   {item.type == null}}">正常</text></wux-col></wux-row></block><wux-row wux-class="data" wx:if="{
   {warningList.length == 0}}"><wux-col class="wux-text--center">当日无预警</wux-col></wux-row></view></scroll-view></view></view>
</view>

 

  相关解决方案