增加文档链接

master
toesbieya 6 years ago
parent a4d3cfaf23
commit c007fe5fd6
  1. 5
      vue/src/router/constant/index.js
  2. 3
      vue/src/store/modules/resource.js

@ -28,6 +28,11 @@ const routes = [
}
]
},
{
path: 'https://doc.toesbieya.cn',
sort: 1,
meta: {title: '文档', icon: 'documentation'}
},
{
path: '/user',
component: Layout,

@ -5,6 +5,7 @@ import {needAuth} from "@/utils/auth"
import {createTree} from "@/utils/tree"
import {getAllResources} from "@/api/system/resource"
import {isEmpty} from "@/utils"
import {isExternal} from "@/utils/validate"
const finalConstantRoutes = transformOriginRoutes(constantRoutes)
const finalAuthorityRoutes = transformOriginRoutes(authorityRoutes)
@ -106,7 +107,7 @@ function clean(routes, cleanHidden = true) {
function addFullPath(routes, basePath = '/') {
routes.forEach(route => {
delete route.components
route.fullPath = path.resolve(basePath, route.path)
route.fullPath = isExternal(route.path) ? route.path : path.resolve(basePath, route.path)
route.children && addFullPath(route.children, route.fullPath)
})
}

Loading…
Cancel
Save