解决自定义tabbar切换时会闪烁的问题

发布于 4 年前作者 yanye1564 次浏览最后编辑 4 年前来自 share

主要看上面的图,如果还是解决不了,将下面的代码复制一下

Component({
  data: {
    selected: 0,//这个必须设置为0
    "color""#999999",
    "selectedColor""#333333",
    "backgroundColor":"#ffffff",
    "borderStyle":"white",
    "list": []
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path;
      wx.switchTab({url})
    }
  }
})
0 回复
暂无回复