开发者工具版本:Stable 1.03.2008270,代码如下:
<view class="cu-custom" style="height:{{CustomBar}}px">
<view class="cu-bar fixed {{bgImage!=''?'none-bg text-white bg-img':''}} {{bgColor}}" style="height:{{CustomBar}}px;padding-top:{{StatusBar}}px;{{bgImage?'background-image:url(' + bgImage+')':''}}">
<view class="action" bindtap="BackPage" wx:if="{{isBack}}">
<text class="cuIcon-back">text>
<slot name="backText">slot>
view>
<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="cuIcon-back" bindtap="BackPage">text>
<text class="cuIcon-homefill" bindtap="toHome">text>
view>
<view class="content" style="top:{{StatusBar}}px">
<slot name="content">slot>
view>
<slot name="right">slot>
view>
view>
----------------------------------------------------------
data: {
StatusBar: app.globalData.StatusBar,
CustomBar: app.globalData.CustomBar,
Custom: app.globalData.Custom
},
就是colorui标题栏,发现上面的style中定义的都不顶用了。这是怎么回事???
你好,复现了,我们研究下
data: {
StatusBar: app.globalData.StatusBar,
CustomBar: app.globalData.CustomBar,
Custom: app.globalData.Custom
},
直接这样写不行了,要放在onLoad或attach里,进行setData()才行。
调试里看看
https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html