console
var vm = new Vue({
el: '#app',
data: function(){
return {
message: '我是内容'
}
},
beforeCreate: function(){
alert('beforeCreate');
},
created: function(){
alert('created');
},
beforeMount: function(){
alert('beforeMount');
},
mounted: function(){
alert('mounted');
},
beforeUpdate: function(){
alert('beforeUpdate');
},
updated: function(){
alert('updated');
},
beforeDestroy: function(){
alert('beforeDestroy');
},
destroyed: function(){
alert('destroyed');
}
})
vm = null;
<div id="app">
<div>{{message}}<div>
</div>
#app{
position: absolute;
margin: auto;
top: 0;
left: 0;
right: 0;
max-width: 750px;
text-align: center;
}