naive-ui/demo/routes/utils.js
2020-12-12 13:51:22 +08:00

7 lines
142 B
JavaScript

export const withPrefix = (prefix, routes) => {
return routes.map((route) => {
route.path = prefix + route.path
return route
})
}