Solve the problem of vue project'import ... ='can only be used in TypeScript files.

When I first came into contact with Vue to write a project, I encountered an error such as the title

Reason: When sub-components are introduced into the Vue component, the import name from ('path') cannot have a horizontal bar (-)

The original error code is as follows:

After modification as follows:

The reason is that I saw an article saying that Vue regards this-as an operator, because there are many v-xxx instructions in Vue

So far, the problem is solved

 

Guess you like

Origin blog.csdn.net/a1059526327/article/details/107612354