Skip to content

Commit

Permalink
总结组件内部路由守卫
Browse files Browse the repository at this point in the history
  • Loading branch information
Panyue-genkiyo committed Oct 12, 2021
1 parent 96db642 commit 1d4f6d5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1044,3 +1044,14 @@ module.exports = {
}
}
```

5. 组件内守卫:

```js
//进入守卫:通过路由规则,进入该组件时被调用
beforeRouteEnter (to, from, next) {
},
//离开守卫:通过路由规则,离开该组件时被调用
beforeRouteLeave (to, from, next) {
}
```

0 comments on commit 1d4f6d5

Please sign in to comment.