当前位置: 代码迷 >> 综合 >> vue-router TypeError: Cannot read property ‘$createElement‘ of undefined
  详细解决方案

vue-router TypeError: Cannot read property ‘$createElement‘ of undefined

热度:94   发布时间:2023-12-14 06:21:27.0

vue-router.esm.js?8c4f:2181 TypeError: Cannot read property '$createElement' of undefined
路由不跳转,还报错,router 文件夹下的 index.js 代码如下:

错误的原因是把 component 写成了 components

import manage from '../views/manage/manage.vue'
import testManage from "../views/manage/StudentManage/testManage";const routes = [{
    path: '/',name: 'manage',component: manage,children: [{
    path:'testManage',components:testManage}]},{
    path: '*',name: 'manage',component: manage}
]
export default routes
  相关解决方案