Home > Back-end >  Direct the whole Element Vue login and then click the menu page to a blank page
Direct the whole Element Vue login and then click the menu page to a blank page

Time:09-18

Routing shows normal but skip to blank page after click

Routing generated by the backend, don't know where is not right..
Now don't know where there is no solution problem



//processing back-end data returned by the
 import _import from '@/router/_import' 
/* *
* generate routing
* @ param Array routerList attach format routing
* @ returns
*/
The function addRouter (routerList) {
Const router=[]
Try {
RouterList. ForEach (e=& gt; {
Let e_new={
Path: e.p ath,
Name: e.n ame,
Component: _import ponent (e.com)
}
If (e.c. with our fabrication: hildren) {
Const children=addRouter (e.c. with our fabrication: hildren)
E_new={
. E_new,
Children: children
}
}
If (" e.r edirect) {
E_new={
. E_new,
Redirect: "e.r edirect
}
}
If (um participant eneratemenu===0) {
E_new={
. E_new,
Hidden: true
}
}
If (e.i con!=='& amp; & E. itle!==' ') {
E_new={
. E_new,
Meta: {
Title: e. itle,
Icon: e.i con
}
}
} else if (e. itle!=='& amp; & E.i con===' ') {
E_new={
. E_new,
Meta: {
Title: e. itle
}
}
}
The router. Push (e_new)
})
{} the catch (error)
The console. The error (error)
Return []
}
Return the router
}
Export {addRouter}


//than data component
 export default file=& gt; {
Return the map [file] | | null
}

Const map={
'Layout' : ()=& gt; Import (' @/layout),
'/user/user' : ()=& gt; Import (' @/views/user/user ')
}


Have a great god can help solve the problem I don't know where the problem is the true
  • Related