Home  >  Article  >  Web Front-end  >  How to annotate vue

How to annotate vue

coldplay.xixi
coldplay.xixiOriginal
2020-11-18 14:26:1813416browse

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';].

How to annotate vue

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: a1e846e189c356a0aa736877d7068fa1.

html Comment:

<!-- 注释,单行或多行 -->

pug(html) Comment:

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

stylus(css) Comment:

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

js Comment:

// 单行注释
/*
多行注释
多行注释
*/
var a = &#39;abc&#39;; // 行末注释

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!

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