1function beforeEnter (to, from, next) {
2 // do things
3 next()
4}
5
6export default {
7 beforeRouteEnter (to, from, next) {
8 beforeEnter(to, from, next)
9 },
10
11 beforeRouteUpdate (to, from, next) {
12 beforeEnter(to, from, next)
13 }
14}