imweb / imweb-wxapp

微信小程序开发相关
MIT License
6 stars 4 forks source link

wx:for 会导致 bindtransitionend 失效 #11

Open longyiyiyu opened 5 years ago

longyiyiyu commented 5 years ago
<view class="test">
  <view wx:for="{{testData}}" wx:key="{{index}}" class="test-box" animation="{{item.anim}}" bindtransitionend="onTransitionEnd">
  </view>
</view>

anim 的动画结束之后不会执行 onTransitionEnd 回调

当不用 wx:for 的时候就是 ok 的,如下:

<view class="test">
  <view class="test-box" animation="{{testData[0].anim}}" bindtransitionend="onTransitionEnd">
  </view>
  <view class="test-box" animation="{{testData[1].anim}}" bindtransitionend="onTransitionEnd">
  </view>
  <view class="test-box" animation="{{testData[2].anim}}" bindtransitionend="onTransitionEnd">
  </view>
</view>
longyiyiyu commented 5 years ago

wx:for 的子元素上面的 bindtransitionend 也会无效