Skip to content

注釋

WXS主要有3種注釋的方法。

示例代碼:

js
<!-- wxml -->
<wxs module="sample">
// Method 1: Single-line annotations

/*
Method 2: Multi-line annotations
*/

/*
Method 3: End annotations. This annotates all the  WXS  code starting from  /* .

var a = 1;
var b = 2;
var c = "fake";

</wxs>

上述例子中,所有WXS代碼均被注釋掉了。

TIP

方法三和方法二的唯一區別是,沒有*/結束符。