其他分享
首页 > 其他分享> > 配置路由

配置路由

作者:互联网

<template>
  <div class="notFound">
    <h2>抱歉,您访问的页面<em>失联</em>啦 ...</h2>
  </div>
</template>

<script>
  export default {
    name: 'NotFound'
  }
</script>
import Vue from 'vue'
import Router from 'vue-router'

import Login from '@/views/Login'
import Home from '@/views/Home'
import NotFound from '@/views/404'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    }, {
      path: '/login',
      name: 'Login',
      component: Login
    }, {
      path: '/notFound',
      name: 'NotFound',
      component: NotFound
    },
  ]
})

 

 

 

标签:NotFound,name,配置,Home,import,Login,path,路由
来源: https://www.cnblogs.com/tszr/p/15953295.html