简体   繁体   English

我应该如何在vue项目的tests文件夹下导入组件?

[英]how should I import a component under the tests folder in the vue project?

在此处输入图像描述

Usually in the vue project, @ stands for src folder, so I can import images like import pic from "@/assets/file" .通常在 vue 项目中, @代表src文件夹,所以我可以像import pic from "@/assets/file"一样导入图片。

But it doesn't work here.但它在这里不起作用。 Where is the problem, and how could I fix it?问题出在哪里,我该如何解决?

Thanks!谢谢!

Just try './components/Main/TodoApp.vue' and it should solve your problem.只需尝试'./components/Main/TodoApp.vue' ,它应该可以解决您的问题。

You're not needed to use @ in here, basically your only using it in your template on event like click, input, select, etc .你不需要在这里使用@ ,基本上你只在你的模板中使用它,比如点击、输入、 event

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM