A, vue brief life cycle
was App = {
template:'',
data(){
},
beforeCreated:function(){
// can not manipulate the data, just initialized events. .
},
created:function(){
// can manipulate data
},
beforeMount:function(){
// new vue occurs before loading, replace <div id = 'app'> </ div>
},
mouonted:function(){
// After loading data
}
}
Two, the VUE dom portion of the assembly, any Tags write ref = 'xxx' properties, the components subject to this. $ Refs.xxx way through, to obtain elements
Third, the hope vue dom to this page rendering operations, execution, such as making input gets focus
this.$nextTick(function(){
// operating logic
})
Note : There is development of the project as an example on git, we are interested can download to learn. Source code has been uploaded Git: the Git address , scan code may be added QQ exchange group