In the development process of Vue, there are sometimes problems of loading different routes according to the permissions of different people. After some tests, a solution is found, such as:
- Create a new config.json file in the router folder as the router's data source
[
{
"title": "Dashboard",
"path": "/main/",
"src": "dashboard",
"summary": "statistics, charts, recent events and reports",
"children": []
},
{
"title": "Menu Example",
"heading": true
},
{
"title": "Multi Level Menu",
"summary": "",
"children": [
{
"title": "Item 1",
"summary": "",
"children": [
{
"title": "Item 11",
"summary": "",
"path": "/main/1",
"children": []
},
{
"title": "Item 12",
"summary": "",
"path": "/main/1",
"children": []
},
{
"title": "Item 13",
"summary": "",
"path": "/main/1",
"children": []
}
]
},
{
"title": "Item 2",
"summary": "",
"path": "/main/1",
"children": []
},
{
"title": "Item 3",
"summary": "",
"path": "/main/1",
"children": []
}
]
}
Read More