问题是在cli3 新建项目后,安装并使用vue-router 出现。
完整的错误提示:
You are using the runtime-only build of Vue where the template compiler is not available
解决方法:对
方法1 :
import Vue from 'vue' 改成 import Vue from 'vue/dist/vue.js''
方法2:
使用vue-ui 重新建立项目,同时把vue-router依赖安装上,这样就不用像方法1那样写这么长了。