When compiling the vue project, such an error was reported:
The reason is very simple, it turned out to be because I put the import not at the top:
You should put this before the const variable definition:
Then it compiles successfully:
When compiling the vue project, such an error was reported:
The reason is very simple, it turned out to be because I put the import not at the top:
You should put this before the const variable definition:
Then it compiles successfully: