简体   繁体   English

任何<script> tag in my blade file cause a [Vue warn]: Error compiling template, error -- How do I resolve this?

[英]Any <script> tag in my blade file cause a [Vue warn]: Error compiling template, error -- How do I resolve this?

I am using Laravel Spark 6.0.我正在使用 Laravel Spark 6.0。

Every page (blade) I create that has any script tag in it cause a[Vue warn]: Error compiling template message in the inspector.我创建的每个页面(刀片)中包含任何脚本标记都会导致 [Vue 警告]:在检查器中编译模板消息时出错。

It's not obvious that anything is breaking, but it worries me seeing giant error messages in the inspector console.并不明显有任何问题,但它让我担心在检查器控制台中看到巨大的错误消息。

This is all that is required to causes the error这是导致错误所需的全部内容

I assume that I need to put my scripts elsewhere.我假设我需要将我的脚本放在其他地方。 Or, are script tags incompatible with vue js.或者,脚本标签是否与 vue js 不兼容。

Is there a workaround?有解决方法吗?

It seems that adding 'scripts' inside the @section('content') creates loads of errors in the inspector console.似乎在 @section('content') 中添加 'scripts' 会在检查器控制台中产生大量错误。 (Though things seem to work) (虽然事情似乎奏效)

If you put your scripts after the @section('content'), they work and your console will be clean.如果你把你的脚本放在@section('content') 之后,它们就可以工作并且你的控制台将是干净的。 If you care about such things... and I do.如果你关心这些事情……我也关心。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 Stripe JS 集成到 Laravel 6.0:[Vue 警告]:编译模板时出错: - Integrating Stripe JS into Laravel 6.0: [Vue warn]: Error compiling template: Laravel Nova 覆盖 vue 组件导致 [Vue 警告]:编译模板时出错 - Laravel Nova override vue component resulting [Vue warn]: Error compiling template 错误:&#39;[Vue警告]:无法解析指令:在测试中 - ERROR: '[Vue warn]: Failed to resolve directive: in testing 如何将Blade变量传递给vue实例,以便可以在JavaScript文件中使用它? - How do I pass a blade variable to a vue instance so I can use it in my JavaScript file? 如何解决:[Vue 警告]:渲染错误:“TypeError:无法读取属性……未定义” - How to resolve: [Vue warn]: Error in render: “TypeError: Cannot read property … of undefined” 在我的html脚本标记上使用async =&#39;true&#39;加载socket.io.js时,会给io对象造成未定义的错误,有什么建议吗? - When using the async='true' on my html script tag to load socket.io.js it cause an undefined error for the io object any suggestion? 我该如何解决 [Vue 警告]:数据()中的错误:Laravel Vue 中的“ReferenceError:total is not defined” - How can i solve [Vue warn]: Error in data(): “ReferenceError: total is not defined” in Laravel Vue 有什么方法可以检查.vue 文件模板的语法错误吗? - Is there any way to check for syntax error for .vue file's template? 模板中脚本标记的IE错误 - IE error with script tag in template 我的递归Vue组件中有错误,如何找到它? - Error in my recursive Vue component, how do I find it?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM