1.基础模块调用

|
1
|
@@include(
"./include/module.html"
)
|
2.带参模块调用 /* 参数必须使用双引号 */
|
1
2
3
|
@@include(
"./include/module.html"
, {
"index"
:
"active"
})
|
3.文本变量
|
1
2
3
4
5
6
7
|
//模块
//调用
@@include(
"./include/module.html"
, {
"variate"
:
"true"
})
|
4.URL变量
|
1
2
3
4
5
6
7
|
5.if语句(外部)
|
1
2
3
4
5
6
7
8
9
|
//模块
@@
if
(context.flag) {
}
//调用
@@include(
"./include/module.html"
, {
"flag"
:
"true"
})
|
6.if语句(内部)
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
//模块
//调用
@@include(
"./include/module.html"
, {
"flag"
:
"true"
})
//模块
//调用
@@include(
"./include/module.html"
, {
"flag"
:
"true"
})
|
7.for语句(基础)
|
1
2
3
4
5
6
7
|
//模块
@@
for
(
var
i = 0; i < 4; i++) {
}
//调用
@@include(
"./include/module.html"
)
|
8.for语句(进阶)
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
//模块
@@
for
(
var
i = 0; i < context.length; i++) {
}
//调用
@@include(
"./include/module.html"
, {
"length"
:
"4"
,
"arr"
: [
{
"text"
:
"111"
,
"url"
:
"111"
},
{
"text"
:
"222"
,
"url"
:
"222"
},
{
"text"
:
"333"
,
"url"
:
"333"
},
{
"text"
:
"444"
,
"url"
:
"444"
}
]
})
|




网站建设
品牌设计
APP开发
小程序开发
商城开发
网站优化
UI设计
增值服务