xiangxiang521
<view class="name" wx:for="{{array}}" wx:key="index">
      <image style="transform:translate({{item.offsetX}}px, {{item.offsetY}}px) ;" class="img" id="{{stv.id[index]}}" src="../images/upload.png"></image>
    </view>

  

onBind: function (e) {
    var that = this;
    var index = this.data.index++;
    console.log(e);
    this.data.array.push({
      offsetX: e.changedTouches[0].pageX,
      offsetY: e.changedTouches[0].pageY-100,
      name: "景点"+index
    })
    console.log(this.data.array);
    this.setData({
      array: this.data.array
    })
  }

  

分类:

技术点:

相关文章:

  • 2021-07-08
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2021-12-03
  • 2021-12-12
猜你喜欢
  • 2021-06-28
  • 2021-11-19
  • 2021-12-19
  • 2022-01-02
  • 2021-12-24
  • 2021-12-09
  • 2021-11-01
相关资源
相似解决方案