使用webpack安装vue,import之后,运营项目报错,如下: [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build. 原因: vue有两种形式的代码compil
一.引入js文件(直接采用CDN): http://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.min.js 二.简单实例: (1)HTML代码: <div id="app"> <h1>{{ message }}</h1> </div> (2)JS代码: var vm = new Vue({ el: '#app', data: { message: 'Hello world, I am Vu