<view class="navbar" style="height:{{navHeight}};background:linear-gradient(to right, {{bg1}}, {{bg2}}, {{bg3}})"> <view class='title-container' style="top:{{navTop}}"> <view class='capsule' wx:if="{{back||home}}"> <view bindtap='back' wx:if="{{back}}"> <image src='../../img/n1.png'></image> </view> <!-- <view bindtap='home' wx:if="{{home}}"> <image src='../../img/n2.png'></image> </view> --> </view> <view class='title' style="color:{{color}}">{{text}}</view> </view> </view> <view style="{{'height: ' + navHeight}};background: white;"></view>