Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 710 Bytes

README.md

File metadata and controls

22 lines (19 loc) · 710 Bytes

Vue - Instance Lifecycle

目標

演示出 Vue instance 的生命週期,並比較有使用 <keep-alive> 與無使用 <keep-alive> 時,兩者生命週期有何差異。

結果

Demo

學習重點

Instance Lifecycle Hooks:

  • beforeCreate
  • created
  • beforeMount
  • mounted
  • beforeUpdate
  • updated
  • activated (有使用 keep-alive)
  • deactivated (有使用 keep-alive)
  • beforeDestroy (無使用 keep-alive)
  • destroyed (無使用 keep-alive)

圖片來源: Vue 文件