新建vue组件 1.在component下新建vue组件 2.在router.js文件中导入并配置路径 如Home组件: import Home from './components/Home.vue' export default new Router({ routes: [ { path: '/home', component: Home } ] })