Vue annotation method: 1. HTML annotation, the code is [<!-- 注释,单行或多行 -->]; 2. [pug(html)] annotation, the code is [div //]; 3. JS annotation, the code is [ var a = 'abc';].
The operating environment of this tutorial: windows10 system, vue2.9, this article is applicable to all brands of computers.
[Related article recommendations: vue.js]
vue annotation method:
in each Within the 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:
<!-- 注释,单行或多行 -->
pug(html) Comment:
// 单行注释 //- 不输出的单行注释 div // 块注释,下级的内容都会被注释掉 随便写多少字 都没关系。
stylus(css) Comment:
// 单行注释 /* 多行注释 只有在compress选项未启用的时候才会被输出 */ /*! 多行缓冲注释 告诉Stylus压缩的时候这段直接输出 */
js Comment:
// 单行注释 /* 多行注释 多行注释 */ var a = 'abc'; // 行末注释
xml Comment:
只有一种。 <!-- 注释,单行或多行 -->
Related free learning recommendations: JavaScript(Video)
The above is the detailed content of How to annotate vue. For more information, please follow other related articles on the PHP Chinese website!