What function can vue-router2 routing meta-information meta do?

{

    path:"/resetPassword",
    name:"resetPassword",
    component:() => import("@/views/system/resetPassword"),
    meta:{requireAuth:true}
}



-======
Mar.17,2021

  1. permission authentication of the example code to restrict access to the route;
  2. passes information, which can be used as a routing record

make the information you need for your business, such as
1, the permission role required for this route
2, whether to cache this route
3, the title of this route to enter the page, etc.
..
for example

meta: { title: 'dashboard', icon: 'dashboard', noCache: true, role: ['admin'] }
Menu