master
lion 1 year ago
parent fc7596ca5e
commit 40e1bb0774

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

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

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

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

Loading…
Cancel
Save