父組件在mounted的時(shí)候獲取數(shù)組傳參給子組件,發(fā)現(xiàn)數(shù)據(jù)沒(méi)有傳過(guò)去,
結(jié)論: 父組件的mounted在子組件的mounted之后
console.log測(cè)試

順序: 父組件beforeCreate => 父組件created => 父組件beforeMount => 子組件beforeCreate => 子組件created => 子組件 beforeMount => 子組件mounted => 父組件mounted => 父組件beforeDestroy => 子組件 beforeDestroy
掛載時(shí)子組件先于父組件,銷(xiāo)毀前父組件先于子組件
data 在beforeCreate后運(yùn)行
computed依據(jù)調(diào)用順序而定
watch $route 運(yùn)行在子組件的beforeCreate之前,router-afterEach之后

created

mounted