原因:没有将router挂载 解决方法: 在main.js中加入以下代码 import router from './router/index' new Vue({ router }).$mount('#app')