Vue router permissions control the problem that different components are loaded and need to be forced to refresh.

{path: "/serviceManager", component: Cookies.get("ROLES")==="admin"?admin:user}

how to solve this problem when logging out of an account with one permission and logging in to an account with another permission, and if the page is not forced to refresh, the loaded routing page is still the same?

Mar.16,2021

you certainly can't do this. This kind of route has already decided whether to load admin or user, rather than a dynamic route. You should write component as a function, which is dynamic loading.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b4017f-348b0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b4017f-348b0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?