直接书写,报红但是生效
<view class="action border-custom" wx:if="{{isCustom}}" style="width:{{Custom.width}}px;height:{{Custom.height}}px;margin-left:calc(750rpx - {{Custom.right}}px)">
<text class="icon-back" bindtap="BackPage"></text>
<text class="icon-homefill" bindtap="toHome"></text>
</view>
直接v-bind(缩写为": "),不报红,但是失效
<view class="action border-custom" wx:if="{{isCustom}}" :style="width:{{Custom.width}}px;height:{{Custom.height}}px;margin-left:calc(750rpx - {{Custom.right}}px)">
<text class="icon-back" bindtap="BackPage"></text>
<text class="icon-homefill" bindtap="toHome"></text>
</view>
解决办法,绑定后,采用vue写法
<view class="action border-custom" wx:if="{{isCustom}}" :style="width:{Custom.width}px;height:{Custom.height}px;margin-left:calc(750rpx - {Custom.right}px)">
<text class="icon-back" bindtap="BackPage"></text>
<text class="icon-homefill" bindtap="toHome"></text>
</view>