laiyidiedanchaofenba
laiyidiedanchaofenba
这是测试动态路由使用的mock模拟数据,parentId 是父菜单id,id是子菜单id,可以根据这个格式从后台返回菜单
想刷新整个页面的话是location.reload(),想刷新 主界面的话是在APP.vue 里 `` `provide() { return { reload:this.reload } }, data () { return { locale: zhCN, isRouterAlice:true } },` `reload() { this.isRouterAlice =false this.$nextTick(function() { this.isRouterAlice =true })...
  
感谢,通过@sendya的提醒,我反复研究了一下generator-routers.js, 在generator()中打印了一下:console.log(item.component,constantRouterComponents[item.component]),发现constantRouterComponents['BasicLayout']居然是undefined,于是我把constantRouterComponents中的BasicLayout改成了() => import('@/layouts/BasicLayout'),菜单总算出来了! 