<block wx:for="{{mapSkuList}}" wx:key="index">
<cover-view class='sku-content-list active' wx:if="{{activeBanner == index}}">
<cover-view class='img'>
<cover-image class="image" src='{{item.img}}' mode="aspectFill"></cover-image>
</cover-view>
<cover-view class='color active'>{{item.skuColor}}</cover-view>
<cover-view class='mashu active'>({{item.skuSize}})</cover-view>
<cover-view class="sku-content-size-right">
<cover-view class="minusIcon active" data-index="{{index}}" wx:key="index" bindtap="minusSkuNumber">-</cover-view>
<cover-view class="skuNumber active">{{item.selectNumber}}</cover-view>
<cover-view class="plusIcon active" wx:key="index" data-index="{{index}}" bindtap="plusSkuNumber">+</cover-view>
</cover-view>
</cover-view>
<cover-view class='sku-content-list' catchtap="changeBanner" wx:else data-index="{{index}}" data-pic="{{item.price}}" data-suggestedPrice="{{item.suggestedPrice}}" data-num="{{item.stockNumber}}" data-img="{{item.img}}">
<cover-view class='img'>
<cover-image class="image" src='{{item.img}}' mode="aspectFill"></cover-image>
</cover-view>
<cover-view class='color'>{{item.skuColor}}</cover-view>
<cover-view class='mashu'>({{item.skuSize}})</cover-view>
<cover-view class="sku-content-size-right">
<cover-view class="minusIcon" bindtap="minusSkuNumber" wx:key="index" data-index="{{index}}">-</cover-view>
<cover-view class="skuNumber">{{item.selectNumber}}</cover-view>
<cover-view class="plusIcon" bindtap="plusSkuNumber" wx:key="index" data-index="{{index}}">+</cover-view>
</cover-view>
</cover-view>
</block>
列表中有视频,考虑到层级问题,就用cover-view标签,sku上绑定的事件catchtap="changeBanner" 改变sku的背景颜色,bindtap="plusSkuNumber",bindtap="minusSkuNumber"数量的加减,真机上点击的时候sku都有很多的抖动,体验感不好,用view标签就不会有这样的情况,这是什么原因?能解决嘛?
video已经做了优化,可以用view了
谢谢
我也用到了video,刚批量改了之前的cover-view
好的