当前位置: 首页 > Web前端 > vue.js

vue问题---记录

时间:2023-03-31 15:50:27 vue.js

vue父子组件加载顺序parentbeforeCreateparentcreatedparentbeforeMountchildbeforeCreatechildcreatedchildbeforeMountchildmountedparentmountedchildcomponentupdatesequence如果有props的话是四步,如果没有props则两步不会触发父亲的钩子。parentbeforeUpdatechildbeforeUpdatechildupdatedparentupdatedparentcomponentupdatesequenceisparentbeforeUpdatechilddeactivatedparentupdateddeactivation进程是parentbeforeDestroychildbeforeDestroychilddestroyedparentdestroyed