naive-ui/demo/routes/utils.js

7 lines
140 B
JavaScript
Raw Normal View History

2020-03-19 18:26:48 +08:00
export const withPrefix = (prefix, routes) => {
return routes.map(route => {
route.path = prefix + route.path
return route
})
}