vue生命周期

  1. 根组件实例:8个 (beforeCreate、created、beforeMount、mounted、beforeUpdate、updated、beforeDestroy、destroyed)

  2. 组件实例:8个 (beforeCreate、created、beforeMount、mounted、beforeUpdate、updated、beforeDestroy、destroyed)

  3. 全局路由钩子:2个 (beforeEach、afterEach)

  4. 组件路由钩子:3个 (beforeRouteEnter、beforeRouteUpdate、beforeRouteLeave)

  5. 指令的周期: 5个 (bind、inserted、update、componentUpdated、unbind)

  6. beforeRouteEnter的next所对应的周期

  7. nextTick所对应的周期