|
@@ -16,11 +16,9 @@ export function convertRoutes (nodes) {
|
|
if (!node.children || !node.children.length) continue
|
|
if (!node.children || !node.children.length) continue
|
|
|
|
|
|
node.children.forEach(child => {
|
|
node.children.forEach(child => {
|
|
- console.log('child', child)
|
|
|
|
// 转化相对路径
|
|
// 转化相对路径
|
|
if (child.path[0] !== '/' && !child.path.startsWith('http')) {
|
|
if (child.path[0] !== '/' && !child.path.startsWith('http')) {
|
|
child.path = node.path.replace(/(\w*)[/]*$/, `$1/${child.path}`)
|
|
child.path = node.path.replace(/(\w*)[/]*$/, `$1/${child.path}`)
|
|
- console.log('child.path', child.path)
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|