new Vue({
beforeCreate: function(){
console.log("組件實例化之前執行的函數")
},
created: function(){
console.log("組件實例化完畢,但頁面還未顯示")
},
beforeMount: function(){
console.log("組件掛載前,頁面還未展示,但虛擬DOM已經配置")
},
mounted: function(){
console.log("組件掛載後,此方法執行後,頁面顯示")
},
beforeUpdate: function(){
console.log("組件更新前,頁面還未更新,但虛擬DOM已經配置")
},
updated: function(){
console.log("組件更新後,此方法執行後,頁面顯示")
},
beforeDestory: function(){
console.log("組件銷燬前")
},
destoryed: function(){
console.log("組件銷燬")
},
})