1.第一次进入到页面(组件)会执行哪些生命周期
- beforeCreate ===》 没有data,没有el
- created ===》 有data,没有el
- beforeMount ===》 有data,没有el(其实已经在准备了)
- mounted ===》 有data,有el

this.$ data ===> 就是当前组件的data数据
this.$ el ===> 就是当前组件的节点(dom)
2.什么时候用哪些生命周期?
- created :请求接口
- mounted : dom操作的时候
- updated : 观测数据是否更新了
- destoryed : 页面销毁、关闭