var app=new Vue({
el:'#app',
data:{
a:2
},
beforeCreate:function(){
console.log("实例创建之前");
},
created:function(){
console.log("a is:"+this.a);
console.log("实例创建之后");
},
beforeMount:function(){
console.log("模板编译/挂载之前")
},
mounted:function(){
console.log("模板编译/挂载之后")
},
beforeupdated:function(){
console.log("实例更新之前")
},
updated:function(){
console.log("实例更新之后")
},
beforeDestory:function(){
console.log("组件销毁前调用")
},
destroyed:function(){
console.log("组件销毁后调用")
}
})