[英]How to use components in my custom js file in Laravel and Vue.js?
我是Laravel和Vue.js的新手。 我像这样的帖子创建了一个简单的Laravel / Vue.js项目: https ://itsolutionstuff.com/post/laravel-5-and-vue-js-crud-with-pagination-example-and-demo-from-scratchexample 。 html
现在我想将日期选择器添加到刀片文件中: https : //talkhabi.github.io/vue-persian-datetime-picker/#/installation
但是,当我将组件导入到我的js文件(例如item.js
)时,出现以下错误消息:
SyntaxError:导入声明只能出现在模块的顶层。
您的import语句必须在JS文件的开头。 常规代码后不得有任何导入语句。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.