我有一个普通的问题。我无法在我的vue div中加载脚本,它包含了我的laravel应用程序中的所有内容之间的所有内容。我的自定义js文件只有在我在div id =“app”下全局导入它们时才有效。我做错了什么?
<body>
<div id="app">
<nav></nav>
@yield('content') // when vue is loaded, scripts don't work on their respective files. Error message on console is removed with vue.min.js but the error persists
</div>
// when vue is loaded, scripts only work if referenced globally here
我通过
进口vue
https://unpkg.com/vue/dist/vue.js