教培參考
教育培訓(xùn)行業(yè)知識(shí)型媒體
發(fā)布時(shí)間: 2025年04月11日 22:44
Vue生命周期共有8個(gè)階段,分別為:beforeCreate、created、beforeMount、mounted、beforeUpdate、updated、beforeDestroy、destroyed。
1、beforeCreate:組件實(shí)例剛被創(chuàng)建,組件屬性計(jì)算之前。
2、Created:組件實(shí)例剛被創(chuàng)建,屬性已綁定,但DOM還未生成。
3、beforeMount:模板編譯/掛載之前。
4、Mounted:模板編譯/掛載之后。
5、beforeUpdate:組件更新之前。
6、Updated:組件更新之后。
7、beforeDestroy:組件銷毀前調(diào)用。
8、Destroyed:組件銷毀后調(diào)用。
(web自學(xué)教程)
Vue生命周期共有以下幾個(gè):beforeCreate、created、beforeMount、mounted、beforeUpdate、updated、activated keep-alive、deactivated keep-alive、beforeDestroy、errorCaptured。
微信掃碼關(guān)注公眾號(hào)
獲取更多考試熱門資料