[英]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.