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

How to annotate vue

coldplay.xixi
Release: 2020-11-30 14:49:22
Original
13448 people have browsed it

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

html Comment:

<!-- 注释,单行或多行 -->
Copy after login

pug(html) Comment:

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

stylus(css) Comment:

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

js Comment:

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

xml Comment:

只有一种。
<!-- 注释,单行或多行 -->
Copy after login

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!

Related labels:
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!