showTabBarRedDot和setTabBarBadge位置偏移
发布于 6 年前 作者 panjuan 5143 次浏览 来自 问答
  • 预期表现

这是在开发者工具上正常显示的样子

- 当前 Bug 的表现(可附上截图)

这是在手机上的样子

不管是showTabBarRedDot还是setTabBarBadge,位置都会一样的偏移,请问是怎么回事,代码也简单,不存在复杂的逻辑

以下是测试用的代码

app.json

{

“pagePath”: “pages/me/me”,

“text”: “个人中心”,

“iconPath”: “pages/image/tabbar/icons_me.png”,

“selectedIconPath”: “pages/image/tabbar/icons_me-selected.png”

}

index.js

  /**

  * 生命周期函数–监听页面显示

  */

onShow: function () {

    if (

1 == 1

) {

        wx.showTabBarRedDot({

        index: 3,          

        })

    } else {

        wx.hideTabBarRedDot({

        index: 3,

        })

    }

}

2 回复

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

你好,我也遇到了这个问题,请问这个问题您解决了吗。

回到顶部