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