Can vue-router return data to generate routing information at the back end?

it"s too inelegant and difficult to maintain all routes written in front-end code. If you want to store all the routing information in the database, use the back-end return data to dynamically generate the front-end route.

example code is as follows:
where routesData is the parameter instantiated by routing new Router

for (let i of data) {`````
    every = {
        path: i["path"],
        name: i["name"],
        component: () => import(i["src"]),
    }
    routesData.push(every)
}

but the above idea can not be realized, check the reason, import does not seem to support variables, broken eggs.
I do not know if my idea can be realized, is there a boss to solve the problem?


just read the Big Boss's article hand-touch, take you to use vue to do background Series 2 (login permissions section)

there is no special need to honestly write the route to the front end. If you write it into the interface, you will make trouble with yourself.

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-1b305ce-2b06f.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-1b305ce-2b06f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?