微信小程序 修改数据,并动态渲染页面;修改数组;

一、修改数据,并在页面动态渲染

  this.setData({
    txt: '12112'
  })
二、修改数组
var rotateClassItem = 'rotateClass['+ index + ']';
that.setData({
      [rotateClassItem]: !that.data.rotateClass[index]
})

猜你喜欢

转载自www.cnblogs.com/siyecao2010/p/10083896.html