当前位置: 首页 > news >正文

网页代理网站安陆建设局网站

网页代理网站,安陆建设局网站,快速制作简单的网站,一个简单的个人主页使用vue-router的addRoutes动态添加路由时#xff0c;子路由重复了。点击‘职工类型’#xff0c;路由地址变为‘http://localhost:8123/#/workerType’#xff0c;显示的却是‘职工列表’点击‘职工列表’#xff0c;路由地址变为‘http://localhost:8123/#/workerList’子路由重复了。点击‘职工类型’路由地址变为‘http://localhost:8123/#/workerType’显示的却是‘职工列表’点击‘职工列表’路由地址变为‘http://localhost:8123/#/workerList’显示的还是‘职工列表’点击‘学生类型’路由地址变为‘http://localhost:8123/#/studentType’显示的却是‘学生列表’点击‘学生列表’路由地址变为‘http://localhost:8123/#/studentList’显示的还是‘学生列表’关键代码var menuData [{path: ,componentPath: /layout/index,text: 首页,children: [{path: /index, componentPath: /homepage/index, text: 首页}]},{path: /worker,componentPath: /layout/index,text: 职工管理,children: [{path: /workerType, componentPath: /workersSystem/workerType, text: 职工类别},{path: /workerList, componentPath: /workersSystem/workerList, text: 职工列表}]},{path: /student,componentPath: /layout/index,text: 学生管理,children: [{path: /studentType, componentPath: /studentSystem/studentType, text: 学生类别},{path: /studentList, componentPath: /studentSystem/studentList, text: 学生列表}]},{path: /college,componentPath: /layout/index,text: 学院管理,children: [{path: /collegeList, componentPath: /collegeSystem/collegeList, text: 学院列表}]}]// 存储路由数据tools.setStore(menuData, JSON.stringify(menuData));// 存储权限列表数组一维数组--_-tools.setStore(rootList, JSON.stringify(tools.getRootList(menuData)));// 使用getRoutes函数导入component组件到对应的路由var routes tools.getRoutes(menuData);// 将路由插入到router中注页面刷新时会丢失所以需要监听beforeEach在其中重新添加this.$router.addRoutes(routes);this.$router.push(/index);tools.js文件getRoutes (menu) {var rootRoute ;if ( !menu || menu.length 0 ) {return [];}for ( var i 0; i menu.length; i ) {var item menu[i];item.component () import(/views${item.componentPath});if ( item.children item.children.length 0 ) {item.children this.getRoutes(item.children);}}console.log(menu);return menu;},是不是getRoutes里面的component引入不对呀github地址https://github.com/sunshineTY…后台系统登录账户1 密码1
http://www.zqtcl.cn/news/939949/

相关文章:

  • qq互联 网站开发北京博洛尼装饰公司
  • 企业网站模板建站广州红盾信息门户网站
  • 做网站都用到哪些软件商品网站建设方案
  • 集美区网站建设下面软件是网页制作平台的是( )
  • 中国建设银行纪念币预约网站做盗版影视网站
  • 网站建设工作年报江苏城乡和住房建设厅网站
  • 免费做网站tk地方门户网站推广方法有那些
  • 查企业年报的网站微商网站如何做
  • 做网站要了解的事情网站地图有什么作用
  • 企业网站asp源码怎么注册公司logo
  • 一个域名能同时做2个网站吗网站建设与维护的认识
  • 微信公众号怎么做网站链接ftp网站服务器
  • 免费舆情信息网站hao123主页
  • 网站空间不足wordpress最新编辑器怎么还原
  • 电信网站备案查询系统wordpress搜插件错误
  • 忻州企业网站建设房地产 网站 设计制作
  • 重庆水务建设项目集团网站中国十大公司排行榜
  • 做网站服务器需要系统app程序定制开发
  • 宁波网站推广营销公司wordpress插件转php
  • wordpress网站生成app应用制作广告的软件
  • 网站建设多久可以建成淘宝建设网站首页
  • 东营市做网站什么是网络营销道德
  • asp评价网站开发文档安卓软件app
  • phpcms旅游网站模板辽宁建设工程信息网开标大厅我的项目中没有显示
  • 深圳网站建设方维网络建设一个网站报价
  • 北京网站建设 案例邢台微商城制作设计
  • 网站开发一般都有系统wordpress评论优化
  • 网站建设找好景科技山东关键词网络推广
  • 网科创想网站管理外贸网站推广和建站
  • 唐山企业网站模板建站动物自己做的网站