wx.setNavigationBarColor页面切换错乱
wx.setNavigationBarColor从生鲜到家页面到个人信息页面切换tab过快,导致原本个人信息上面是白色背景变成绿色啦,这个是什么原因呢,以前不会啊



2 回复
麻烦提供出现问题的机型和微信版本,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
楼主解决了吗?我也遇到了这个问题,可以轻易复现。
console.time( "皮肤设置时间1" ); console.time( "皮肤设置时间2" ); // 设置导航栏颜色 wx.setNavigationBarColor({ frontColor: '#ffffff' , backgroundColor: '#2B2B2B' , success:()=>{ console.timeEnd( "皮肤设置时间2" ); }, complete: () => { console.timeEnd( "皮肤设置时间1" ); } }); |
这个API执行时间,一般维持在70-80 ms,但是频繁切换 tarBar 有时候会达到1-3秒。
