naive-ui/demo/routes/utils.js

7 lines
142 B
JavaScript
Raw Normal View History

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