Does vue router's global navigation guard have to be nested?

I"ve seen a lot of writing for vuerouter beforeEach, and it seems to be all if nesting. Can access control be achieved without if nesting?

Mar.30,2022

you can store your permission information in meta, and then take it out and use it in beforeEach.

Menu