Vue----ele-admin2

主要测试路由, router.js

import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      redirect: '/dashboard',
      mate: { title: '系统首页' }
    },
    {
      path: '/',
      mate: { title: '自述文件' },
      component: () => import('./components/home.vue'),
      children: [
        {
          path: '/dashboard',
          meta: { title: '系统首页' },
          component: () => import('./views/dashboard.vue')
        },
        {
          path: '/icon',
          meta: { title: '自定义图标' },
          component: () => import('./views/icon.vue')
        },
        {
          path: '/collapse',
          meta: { title: 'Collapse' },
          component: () => import('./views/collapse.vue')
        },
        {
          path: '/tooltip',
          meta: { title: 'Tooltip' },
          component: () => import('./views/tooltip.vue')
        },
        {
          path: '/dialog',
          meta: { title: 'Dialog' },
          component: () => import('./views/dialog.vue')
        },
        {
          path: '/carousel',
          meta: { title: 'Carousel' },
          component: () => import('./views/carousel.vue')
        },
        {
          path: '/upload',
          meta: { title: 'Upload' },
          component: () => import('./views/upload.vue')
        },
        {
          path: '/form',
          meta: { title: 'Form' },
          component: () => import('./views/form.vue')
        },
        {
          path: '/table',
          meta: { title: 'Table' },
          component: () => import('./views/table.vue')
        },
        {
          path: '/tabs',
          meta: { title: 'Tabs' },
          component: () => import('./views/tabs.vue')
        },
        {
          path: '/403',
          meta: { title: '403' },
          component: () => import('./views/403.vue')
        },
        {
          path: '/404',
          meta: { title: '404' },
          component: () => import('./views/404.vue')
        }
      ]
    },
    {
      path: '/login',
      name: 'login',
      meta: { title: '登录' },
      component: () => import('./views/login.vue')
    },
    {
      path: '/register',
      name: 'register',
      meta: { title: '注册' },
      component: () => import('./views/register.vue')
    },
    {
      path: '*',
      name: '404',
      meta: { title: '404' },
      redirect: '/404'
    }
  ]
})
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值