自定义 tabbar 高亮错位?
发布于 5 年前 作者 na22 3422 次浏览 来自 官方Issues

当 tabbar 达到3个或者3个以上,

点击切换 tabbar 高亮切换的效果错乱,

多次点击 tabbar 切换后。高亮判断就乱了。

1 回复

你代码片段里的index3.js的onShow里要设置当前tabbar索引呀

onShow: function () {

    if (typeof this.getTabBar === ‘function’ && this.getTabBar()) {

            this.getTabBar().setData({

                selected: 2

            })

        }

    }

回到顶部