收藏
回答

请教下,animation怎么动态拼接名?

<view wx:for="{{5}}" wx:key='' bind:touchstart="start" bind:touchmove="move"

                bind:touchend="end" animation="{{ ani + item}}" 

                id="item-{{item}}">

                {{item}}

 </view>

这个animation怎么动态拼接啊,想输出ani1,ani2。尝试用` `编译不过,ani写进data也是不生效。

不报错也不生效

回答关注问题邀请回答
收藏

2 个回答

  • 千江水
    千江水
    2019-10-17
    <view wx:for="{{5}}"  animation="{{ ani }}" id="item-{{item}}">
        {{item}}
    </view>


    2019-10-17
    有用 1
    回复
  • 卢霄霄
    卢霄霄
    2019-10-17

    'ani'+item

    2019-10-17
    有用
    回复 4
    • 千江水
      千江水
      2019-10-17
      这样编译就报错了。。
      2019-10-17
      回复
    • 千江水
      千江水
      2019-10-17
      2019-10-17
      回复
    • 卢霄霄
      卢霄霄
      2019-10-17回复千江水
      还是建议你 ani用数组, animation="{{ani[index]}}"
      2019-10-17
      1
      回复
    • 千江水
      千江水
      2019-10-17回复卢霄霄
      好的 谢谢
      2019-10-17
      回复
登录 后发表内容
问题标签