Home  >  Article  >  Web Front-end  >  Why does vue report an error without adding spaces?

Why does vue report an error without adding spaces?

藏色散人
藏色散人Original
2023-01-29 11:12:061216browse

5 reasons why vue will report an error without adding spaces: 1. When commenting with double slashes, spaces need to be added after the double slashes, otherwise an error will be reported; 2. When introducing components or APIs, there needs to be a space after the comma There are spaces, and there are spaces between the beginning and the end of the curly braces; 3. There is no space between default and the brackets, resulting in an error; 4. There cannot be spaces at the end of the code; 5. There needs to be spaces between the round brackets of the function name.

Why does vue report an error without adding spaces?

##The operating environment of this tutorial: Windows 10 system, vue3 version, DELL G3 computer

Why does Vue report an error without adding spaces?

5 Errors in the vue project caused by not adding spaces

error trailing spaces not allowed

1, when commenting with double slashes, you need to add after the double slashes Space, otherwise an error will be reported

Why does vue report an error without adding spaces?

2. When introducing components or APIs, write the imported content together, and only write one. And there needs to be a space after the comma, and there is a space between the beginning and the end of the curly braces

Why does vue report an error without adding spaces?

3, export default{}, there is no space between default and the brackets, resulting in an error, it should be written as export default (space) {}

Why does vue report an error without adding spaces?

4, there can be no spaces at the end of the code

5, there must be spaces between the round brackets of the function name, function( Space) (brackets)

Why does vue report an error without adding spaces?

Recommended study: "

vue video tutorial"

The above is the detailed content of Why does vue report an error without adding spaces?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn