記錄下,搞了好久終于解決了。
先找到layout/components/Sidebar/index

layout/components/Sidebar/index
this.$router.options.routes 改成自己的在store定義的routes,

permission.js(store/modules)
因為在permission.js(store/modules)里把動態(tài)和固定路由進行合并后,改變了state的routes這個才是最終的路由。
記錄下,搞了好久終于解決了。
先找到layout/components/Sidebar/index
this.$router.options.routes 改成自己的在store定義的routes,
因為在permission.js(store/modules)里把動態(tài)和固定路由進行合并后,改變了state的routes這個才是最終的路由。