Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
614 views
in Technique[技术] by (71.8m points)

vue-admin-element动态路由页面空白

在网上找了一个动态路由的例子,然后写了一下,动态返回的数据结构都是一样,但是就是加载不出来,请教大神们什么原因。
重置数据结构
image.png

image.png

image.png

回显的数据结构
image.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

在permission.js是否有引入路由


          await store.dispatch('user/getInfo')
          const accessRoutes = await store.dispatch('permission/generateRoutes')
          router.options.routes = accessRoutes
          await router.addRoutes(accessRoutes)
          next({ ...to })

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...