Article From:https://www.cnblogs.com/jasonlai2016/p/9969247.html

1.In addition to data attributes, Vue instances also expose some useful instance attributes and methods. They all have a prefix of $, which distinguishes them from user-defined attributes.

var data = { a: 1 }
var vm = new Vue({
  el: '#example',
  data: data
})

vm.$data === data // => true
vm.$el === document.getElementById('example') // => true

// $watch Is an example methodVm. $watch ('a', function (new Value, old Value) {// This callback will be called after the `vm.a'change}

2.Instance lifecycle hook

 

Leave a Reply

Your email address will not be published. Required fields are marked *