微信小程序中条件渲染wx:if的应用 TZOF 2024-07-15 30 阅读1分钟 注意else if在微信小程序中简写elif <block wx:for="{{arr1}}" wx:key="*this"> <text wx:if="{{item == 1}}">{{item}}我是1 </text> <text wx:elif="{{item == 2}}">{{item}}我是2 </text> <text wx:else="">{{item}}other{{index}}</text> </block>