master
lion 1 year ago
parent fc7596ca5e
commit 40e1bb0774

@ -20,21 +20,21 @@ export default {
},
type() {
// if (this.isExternal) {
// return 'a'
// }
if (this.isExternal) {
return 'a'
}
return 'router-link'
}
},
methods: {
linkProps(to) {
// if (this.isExternal) {
// return {
// href: to,
// target: '_blank',
// rel: 'noopener'
// }
// }
if (this.isExternal) {
return {
href: to,
target: '_blank',
rel: 'noopener'
}
}
return {
to: to
}

@ -103,20 +103,16 @@
}
return true
}
console.log("this.onlyOneChild", this.onlyOneChild)
return false
},
resolvePath(routePath) {
if (isExternal(routePath)) {
console.log("path",routePath)
if (isExternal(routePath)) {
return routePath
}
if (isExternal(this.basePath)) {
console.log("basePath",this.basePath)
if (isExternal(this.basePath)) {
return this.basePath
}
console.log("resolve",path.resolve(this.basePath, routePath))
}
return path.resolve(this.basePath, routePath)
}
}

@ -71,7 +71,20 @@ export const constantRoutes = [{
}
}],
hidden: true
},
},
// {
// path: '/record/menu_10',
// component: Layout,
// children: [{
// path: '/record/menu_10',
// component: () => import('@/views/record/index'),
// name: '搜索',
// meta: {
// title: '搜索'
// }
// }],
// hidden: true
// },
{
path: '/',

@ -125,8 +125,7 @@ export function generaMenu(routes, data) {
children: [{
path: "",
name: 'menu_' + item.id,
// component: (item.url.includes('#')||item.path == '') ? Layout : loadView(item.url),
component: Layout,
component: (item.url.includes('#')||item.path == '') ? Layout : loadView(item.url),
meta: {
title: item.name,
id: item.id,

Loading…
Cancel
Save