安装vue-router插件 npm install --save vue-router 创建路由配置文件 image.png 内容大致如下 const routes = [ { path: '/', component: () => import('@/views/home') }, ]; export default router;