在框架中,使用wx:if="{{condition}}"判断是否需要渲染该代码块
如下所示<view wx:if="{{condition}}"> 当condition为true的时候,显示
也可以用wx:elif和wx:else添加一个else块,代码如下所示
<view wx:if="{{score >=80}}">优秀</view><view wx:elif="{{score <80 && score >=60}}">及格</view><view wx:else>不及格</view>
