resize() {
this.clientHeight = `${document.documentElement.clientHeight}px`;
window.onresize = () => {
const clientHeight = `${document.documentElement.clientHeight}px`;
const tarbar = document.getElementsByClassName('uni-tabbar')[0]
if (clientHeight < this.clientHeight) {
tarbar.style.position = 'static'
} else {
tarbar.style.position = 'fixed'
}
};
},
在onload中调用