vue生命週期共有幾個階段?分別是什麼?

一共8個階段

1、beforeCreate(創建前)

2、created(創建後)

3、beforeMount(載入前)

4、mounted(載入後)

5、beforeUpdate(更新前)

6、updated(更新後)

7、beforeDestroy(銷燬前)

8、destroyd(銷燬後)

 

vue第一次頁面加載會觸發哪幾個鉤子函數?

beforeCreate、created、beforeMount、mounted

 

DOM 渲染在哪個週期中就已經完成?

mounted

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章