随身笔记
随身笔记

vue3 No match found for location with path "/"

仔细检查你的路由配置文件,我这里是name字段重名,也有可能是哪里单词写错也可能造成

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/login',
    name: 'Home', //改成别的名字就可以
    component: Login
  },
]
没有标签
首页      前端资源      vue3 No match found for location with path "/"

随身笔记

vue3 No match found for location with path "/"
仔细检查你的路由配置文件,我这里是name字段重名,也有可能是哪里单词写错也可能造成 const routes = [ { path: '/', name: 'Home', component: Home }, { …
扫描二维码继续阅读
2021-11-28