as above code, when use admin user to login, and login is successful, the userStore.roles.includes("admin") will return true, I want to know how and when, the username "admin", was set into userStore.roles.
I am learning vue3 recently, hope your relpy, thanks
it seems I have found the roles where it added, in /src/router/permisson.ts, router.beforeEach as a intercepter, so when we visit any page, the router.beforeEach will be executed, it's inner logic added the roles
hello: I am a novice in vue3, when I learn this project, I suffered a question that I hope be solved by yours https://github.com/un-pany/v3-admin-vite/blob/4d3d4e1057aee4dde50c4f4a9690e616913b20b8/src/views/dashboard/index.vue#L6-L7
as above code, when use admin user to login, and login is successful, the userStore.roles.includes("admin") will return true, I want to know how and when, the username "admin", was set into userStore.roles.
I am learning vue3 recently, hope your relpy, thanks