[英]Vue 2.2.2 doesn't display the data to the View
Current Version : Laravel 5.2 using only Browserify not Webpack
当前版本:Laravel 5.2仅使用Browserify而不使用Webpack
I've already set up everything such as like this: 我已经设置了如下所有内容:
In my resources/js/app.js
在我的资源/ js / app.js中
window.Vue = require('vue');
new Vue({ el : '.row',
data : { name: '' }
});
in my view : 在我看来 :
<div class="row">
<input type ="text">
<h1> @{{ name }} </h1>
</div>
But when i try to refresh it. 但是当我尝试刷新它时。 The DOM just renders for about 2ms or let's say split second then it's gone and there's an error that says :
DOM仅渲染大约2毫秒,或者说瞬间转瞬即逝,并且出现一个错误消息:
[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available.
[Vue警告]:您正在使用Vue的仅运行时版本,而模板编译器不可用。 Either pre-compile the templates into render functions, or use the compiler-included build.
可以将模板预编译为渲染函数,也可以使用包含编译器的内部版本。 (found in )
(在发现 )
You're using the runtime-only
build but you likely need the standalone build
, to do that simply add the following to your your package.json
to alias the standalone build (which includes the template compiler) : 您正在使用
runtime-only
构建,但是您可能需要standalone build
,只需将以下内容添加到package.json
即可为独立构建(包括模板编译器)添加别名:
"browser": {
"vue": "vue/dist/vue.common.js"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.