- beforeCreate(创建前)
- created (创建后)
- beforeMount (载入前)
- mounted (载入后)
- beforeUpdate (更新前)
- updated (更新后)
- beforeDestroy( 销毁前)
- destroyed (销毁后)
Vue生命周期函数就是vue实例在某一个时间点会自动执行的函数
当Vue对象创建之前触发的函数(beforeCreate)
Vue对象创建完成触发的函数(Created)
当Vue对象开始挂载数据的时候触发的函数(beforeMount)
当Vue对象挂载数据的完成的时候触发的函数(Mounted)
Vue对象中的data数据发生改变之前触发的函数 (beforeUpdate)
Vue对象中的data数据发生改变完成触发的函数(Updated)
Vue对象销毁之前触发的函数 (beforeDestroy)
Vue对象销毁完成触发的函数(Destroy)