mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-22 07:46:15 -04:00
refactor(path): removed old route builder
This commit is contained in:
parent
01091f083c
commit
6c60f92245
1 changed files with 1 additions and 14 deletions
|
@ -100,18 +100,5 @@ export default {
|
||||||
// Build Configuration (https://go.nuxtjs.dev/config-build)
|
// Build Configuration (https://go.nuxtjs.dev/config-build)
|
||||||
build: {},
|
build: {},
|
||||||
|
|
||||||
router: {
|
router: {}
|
||||||
extendRoutes(routes) {
|
|
||||||
routes.forEach((route) => {
|
|
||||||
if (route.path.match(/^\/tools\/.*/)) {
|
|
||||||
const sections = route.path.split('/')
|
|
||||||
route.path = `/${sections[sections.length - 1]}`
|
|
||||||
route.meta = {
|
|
||||||
isTool: true,
|
|
||||||
section: sections[sections.length - 2]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue