remove useless code
This commit is contained in:
parent
57628713ee
commit
ad1b1ef223
@ -1,21 +1,5 @@
|
||||
import AdminLayout from '@/components/AdminLayout'
|
||||
const routes = [
|
||||
{
|
||||
path: '/frpc/config',
|
||||
component: AdminLayout,
|
||||
meta: {
|
||||
icon: 'config'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/frpc/Configure'),
|
||||
meta: {
|
||||
title: 'Configure'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/frpc',
|
||||
component: AdminLayout,
|
||||
@ -31,6 +15,22 @@ const routes = [
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/frpc/config',
|
||||
component: AdminLayout,
|
||||
meta: {
|
||||
icon: 'config'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/frpc/Configure'),
|
||||
meta: {
|
||||
title: 'Configure'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -4,7 +4,7 @@ import AdminLayout from '@/components/AdminLayout'
|
||||
|
||||
Vue.use(Router)
|
||||
|
||||
const allRoutes = [
|
||||
export const routes = [
|
||||
{
|
||||
path: '/',
|
||||
component: AdminLayout,
|
||||
@ -34,20 +34,6 @@ const allRoutes = [
|
||||
}
|
||||
]
|
||||
|
||||
// filter routes recursively
|
||||
const filterRoutes = function(routes) {
|
||||
const newRoutes = routes.filter(route => !!route)
|
||||
for (const route in newRoutes) {
|
||||
if (route.children) {
|
||||
route.children = filterRoutes(route.children)
|
||||
}
|
||||
}
|
||||
return newRoutes
|
||||
}
|
||||
|
||||
export const routes = filterRoutes(allRoutes)
|
||||
console.log('allRoutes', allRoutes, routes)
|
||||
|
||||
const router = new Router({
|
||||
routes
|
||||
})
|
||||
|
@ -82,8 +82,6 @@ export default {
|
||||
methods: {
|
||||
initData() {
|
||||
if (!this.serverInfo) return
|
||||
console.log('serverInfo', this.serverInfo)
|
||||
|
||||
this.version = this.serverInfo.version
|
||||
this.bind_port = this.serverInfo.bind_port
|
||||
this.bind_udp_port = this.serverInfo.bind_udp_port
|
||||
|
Loading…
Reference in New Issue
Block a user