beforeRouteEnter 组件登录前被调用
beforeRouteUpdate 组件被反复调用时执行
beforeRouteLeave 离开该组件时被调用
参数:( to , from , next )
差别: beforeRouteEnter 不能调用this 因为新的组件还未登陆,而其他两种组件守卫可以调用this
但是,beforeRouteEnter可以执行next回调
组件内的守卫
猜你喜欢
转载自www.cnblogs.com/vancissell/p/12913693.html
今日推荐
周排行