Ionic-3错误无法读取属性' style'为null

时间:2018-01-03 12:08:25

标签: ionic-framework ionic3

我已使用 P<-matrix(nrow=2, ncol=2) for (i in 1:2){ for (j in 1:2) { P[i,j] = paste0("P", i, j) } } P Q<-matrix(nrow=2, ncol=2) for (i in 1:2){ for (j in 1:2) { Q[i,j] = paste0("Q", i, j) } } Q 而我隐藏Ionic-3Tabs bar上,其工作正常,但我遇到了一些问题,有时会显示此错误消息

  

TypeError:无法读取属性&#39; style&#39;为null

如何解决此问题,

这是我的代码

check.ts

Specific pages

1 个答案:

答案 0 :(得分:3)

尝试这可能可以解决您的问题:

ionViewWillEnter() {
let tabBarElement = document.querySelector('.tabbar.show-tabbar');
    if (tabBarElement != null) {
      tabBarElement.style.display = 'none'; // or whichever property which you want to access
    }
}
相关问题