naive-ui/demo/routes/utils.js
2020-03-19 18:26:48 +08:00

7 lines
140 B
JavaScript

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