![vue生命周期钩子函数 vue生命周期钩子函数](/default/index/img?u=aHR0cHM6Ly9waWFuc2hlbi5jb20vaW1hZ2VzLzcvZTE3YjI4YjQ3MzBiNThkOWM3YzExNzQ5YjljN2U3NWYucG5n)
beforeCreate: function () {
console.log('beforeCreate 创建前状态》');
},
created: function () {
console.log('created 创建完毕状态》');
},
beforeMount: function () {
console.log('beforeMount 挂载前状态》');
},
mounted: function () {
console.log('mounted 挂载结束状态》');
},
beforeUpdate: function () {
console.log('beforeUpdate 更新前状态》');
//这里指的是页面渲染新数据之前
},
updated: function () {
console.log('updated 更新完成状态》');
},
beforeDestroy: function () {
console.log('beforeDestroy 销毁前状态》');
},
destroyed: function () {
console.log('destroyed 销毁完成状态》');
}