美文网首页
初识vue-router

初识vue-router

作者: 回不去的那些时光 | 来源:发表于2018-05-10 15:54 被阅读8次
     export default new Router({
       routes: [
          {
            path: '/',
            component: _import('layout/index'),
           name: 'layout',
          redirect: { name: 'home' },
          desc: '上左右整体布局',
           children: [
              //  菜单路由
             { path: '/home', component: _import('home/index'), name: 'home', desc: '首页' },
             { path: '/billing', component: _import('billing/index'), name: 'billing', desc: '账单' },
             { path: '/expense', component: _import('expense/index'), name: 'expense', desc: '费用' },
             { path: '/report', component: _import('report/index'), name: 'report', desc: '报告' },
             { path: '/client', component: _import('client/client'), name: 'client',desc: '顾客'},
             { path: '/contact', component: _import('client/contact'),name: 'contact',desc: '联系方式'},
             { path: '/user', component: _import('user/index'), name: 'user', desc: '用户' },
             { path: '/project', component: _import('project/project'),name: 'project', desc: '项目'},
             { path: '/ufafee', component: _import('project/ufafee'),name: 'ufafee', desc: ''},
    
           ],
           //  判断是否登录,或登录token是否超时
           // beforeEnter: (to, from, next) => {}
         }
    
       ]
     })
    

    相关文章

      网友评论

          本文标题:初识vue-router

          本文链接:https://www.haomeiwen.com/subject/wxttdftx.html