wx applet knowledge points (five)

Fifth, the difference between the two-way binding and vue

① vue achieve two-way binding only need to modify this.data 

var vm = new new Vue ({ 
  EL: '#example' , 
  Data: { 
    Message: 'the Hello' 
  }, 
  computed: { 
    // Calculation property getters 
    reversedMessage: function () {
       // `this` point vm instance 
      return  the this . message.split ( ''). Reverse (). the Join ( '' ) 
    } 
  } 
})

② applets need to call this.setData ({message: 'newMsg'})

Guess you like

Origin www.cnblogs.com/zhuxingqing/p/11391521.html