vue router component notes
问题:导航到下一个路由组件过程中,前一个路由组件的beforeDestroy钩子函数似乎晚于下一个路由组件的created钩子函数
//befoure router component
{
beforeDestroy(){
console.log('before route component run beforeDestroy')
}
}
//next router component
{
created(){
console.log('next route component run created')
},
mounted(){
console.log('next route component run mounted')
}
}
run result
'next route component run created'
'before route component run beforeDestroy'
'next route component run mounted'
相关链接
2019, Oct 19
| 本文访问量: 次