Vue 使用时警告未声明?app.js 里的 Vue 怎么使用?
app.blade.php文件中
<div id="testing">@{{testing}}</div>
<!-- Scripts -->
<!-- <script type="text/javascript" src="{{asset('js/vue.js')}}"></script> -->
<script src="{{ asset('js/app.js') }}"></script>
<script type="text/javascript">
new Vue({
el:'#testing',
data:{
testing:'12345'
}
});
</script>
报错
[Vue warn]: Property or method "testing" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.
但是我如果注释掉app.js,用vue.js就可以,app.js里面的Vue如何使用呢?
推荐文章: