小程序 测试版scroll-view内容IOS上面显示正常,但是安卓上面显示不全?
发布于 7 年前 作者 minjia 8361 次浏览 来自 问答
用了Scroll-view,但是在IOS和安卓上面的显示效果不一样,安卓显示不全数据库的内容 ,下面代码很乱
WXML
<!--miniprogram/pages/staffs/staffs.wxml-->
<view class="staffs">
  <image style="width:100%;height:500rpx;background-color:#ffffff;" mode="widthFix" src="../../images/topic1.png"></image>
</view>

<view class="items">
  <!--left bar-->
  <view class="left">
    <view class="{{active==0?'selected':'normal'}}" id="0" bindtap='switchNav'>灭火器</view>
    <view class="{{active==1?'selected':'normal'}}" id="1" bindtap='switchNav'>消防软管</view>
    <view class="{{active==2?'selected':'normal'}}" id="2" bindtap='switchNav'>消防栓</view>
    <view class="{{active==3?'selected':'normal'}}" id="3" bindtap='switchNav'>报警警铃</view>
    <view class="{{active==4?'selected':'normal'}}" id="4" bindtap='switchNav'>警示标志</view>
    <view class="{{active==5?'selected':'normal'}}" id="5" bindtap='switchNav'>其他器材</view>
  </view>
  <!--right bar-->
  <view class="right">
    <view class="stuffs">
      <!-- current:当前所在滑块的 index -->
      <!-- vertical:滑动方向是否为纵向 -->
      <swiper current="{{currentTab}}" vertical="{{true}}">
        <!-- catchtouchmove 阻止弹窗后滚动穿透 -->
        <swiper-item id="0" catchtouchmove="false" >
          <scroll-view scroll-y="true" class="sview">
            <view class="list">
              <block wx:for="{{extinguisher}}">
                <view class="list_item">
                  <view class='img'>
                    <image src="{{item.image}}"></image>
                  </view>
                  <view class='info'>
                    <view class='title'>{{item.title}}</view>
                    <view class='price'>价格:{{item.price}}</view>
                    <view class='color'>颜色:{{item.color}}</view>
                  </view>
                </view>
              </block>
            </view>
          </scroll-view>
        </swiper-item>
        <swiper-item id="1" catchtouchmove="false">
          <scroll-view scroll-y="true">
            <view class="list">
              <block wx:for="{{firehose}}">
                <view class="list_item">
                  <view class='img'>
                    <image src="{{item.image}}"></image>
                  </view>
                  <view class='info'>
                    <view class='title'>{{item.title}}</view>
                    <view class='price'>价格:{{item.price}}</view>
                    <view class='color'>颜色:{{item.color}}</view>
                  </view>
                </view>
              </block>
            </view>
          </scroll-view>
        </swiper-item>
        <swiper-item id="2" catchtouchmove="false">
          <scroll-view scroll-y="true">
            <view class="list">
              <block wx:for="{{firehydrant}}">
                <view class="list_item">
                  <view class='img'>
                    <image src="{{item.image}}"></image>
                  </view>
                  <view class='info'>
                    <view class='title'>{{item.title}}</view>
                    <view class='price'>价格:{{item.price}}</view>
                    <view class='color'>颜色:{{item.color}}</view>
                  </view>
                </view>
              </block>
            </view>
          </scroll-view>
        </swiper-item>
        <swiper-item id="3" catchtouchmove="false">
          <scroll-view scroll-y="true">
            <view class="list">
              <block wx:for="{{alarm}}">
                <view class="list_item">
                  <view class='img'>
                    <image src="{{item.image}}"></image>
                  </view>
                  <view class='info'>
                    <view class='title'>{{item.title}}</view>
                    <view class='price'>价格:{{item.price}}</view>
                    <view class='color'>颜色:{{item.color}}</view>
                  </view>
                </view>
              </block>
            </view>
          </scroll-view>
        </swiper-item>
        <swiper-item id="4" catchtouchmove="false">
           <scroll-view scroll-y="true">
            <view class="list">
              <block wx:for="{{warninglight}}">
                <view class="list_item">
                  <view class='img'>
                    <image src="{{item.image}}"></image>
                  </view>
                  <view class='info'>
                    <view class='title'>{{item.title}}</view>
                    <view class='price'>价格:{{item.price}}</view>
                    <view class='color'>颜色:{{item.color}}</view>
                  </view>
                </view>
              </block>
            </view>
          </scroll-view>
        </swiper-item>
        <swiper-item id="5" catchtouchmove="false">
           <scroll-view scroll-y="true">
            <view class="list">
              <block wx:for="{{firemask}}">
                <view class="list_item">
                  <view class='img'>
                    <image src="{{item.image}}"></image>
                  </view>
                  <view class='info'>
                    <view class='title'>{{item.title}}</view>
                    <view class='price'>价格:{{item.price}}</view>
                    <view class='color'>颜色:{{item.color}}</view>
                  </view>
                </view>
              </block>
            </view>
          </scroll-view>
        </swiper-item>
      </swiper>

    </view>
  </view>
</view>

回到顶部