Home > Web Front-end > Vue.js > body text

Can comments be written in .vue files?

藏色散人
Release: 2023-01-13 00:45:10
Original
2378 people have browsed it

Vue files can write comments; within each code block, when commenting, you need to use the comment syntax of the respective language to comment; for example, when commenting at the top of the file, use the HTML comment syntax " "That's it.

Can comments be written in .vue files?

The operating environment of this tutorial: Windows 7 system, vue version 2.0, DELL G3 computer.

[Related article recommendations: vue.js]

Can comments be written on vue files?

Comments can be written in vue files. Within each code block, when commenting, you need to use the comment syntax of the respective language to comment (HTML, CSS, JavaScript, Jade, etc.). When commenting at the top of the file, use HTML comment syntax: .

html Comment:

Copy after login
Copy after login

pug(html) Comment:

// 单行注释
//- 不输出的单行注释
div
  // 块注释,下级的内容都会被注释掉
    随便写多少字
    都没关系。
Copy after login

stylus(css) Comment:

// 单行注释
/*
    多行注释
    只有在compress选项未启用的时候才会被输出
 */
/*!
    多行缓冲注释
    告诉Stylus压缩的时候这段直接输出
 */
Copy after login

js Comment:

// 单行注释
/*
多行注释
多行注释
*/
var a = 'abc'; // 行末注释
Copy after login

xml Note:

There is only one type.

Copy after login
Copy after login

The above is the detailed content of Can comments be written in .vue files?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
vue
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!