
作用:操作{{}}
{{data+1}}{{data-1}}{{data*1}}{{data/1}}
<text wx:if="{{order.state==0}}">未付款</text><text wx:else="{{order.state==1}}">已付款</text>
<view> {{ message }} </view>Page({data: {message: 'Hello!'}})
<view id="item-{{id}}"> </view>Page({data: {id: 0}})
<view wx:if="{{condition}}"> </view>Page({data: {condition: true}})
<view hidden="{{flag ? true : false}}"> Hidden </view>
<view> {{a + b}} + {{c}} + d </view>Page({data: {a: 1,b: 2,c: 3}})
view中的内容为3 + 3 + d
<view wx:if="{{legth>1}}"><view>
<view>{{"hello" + name}}</view>Page({data:{name:"Tom"}})
hello Tom
<view wx:for={{zero,1,2,3}}><view>Page({data: {zero: 0}})
# 花括号和引号之间如果有空格,将最终被解析成为字符串<view wx:for="{{[1,2,3]}} ">{{item}}</view>等同于<view wx:for="{{[1,2,3] + ' '}}">{{item}}</view>