记录下,搞了好久终于解决了。
先找到layout/components/Sidebar/index
layout/components/Sidebar/index
this.$router.options.routes 改成自己的在store定义的routes,
permission.js(store/modules)
因为在permission.js(store/modules)里把动态和固定路由进行合并后,改变了state的routes这个才是最终的路由。
记录下,搞了好久终于解决了。
先找到layout/components/Sidebar/index
this.$router.options.routes 改成自己的在store定义的routes,
因为在permission.js(store/modules)里把动态和固定路由进行合并后,改变了state的routes这个才是最终的路由。