一、vue生命周期
生命周期就是事物从诞生到消亡的整个过程。
钩子函数:
beforeCreate
created
beforeMount
mounted
beforeUpdate
updated
beforeDestroy
二、vue生命周期函数图示:
const app=new Vue({ el:document.getElementsByClassName('app')[1], data:{ counter:0 }, methods:{}, created:function () { }, mounted:function () { } })