// #ifdef APP-PLUS
var height = 0;
uni.getSystemInfo({
success: (sysinfo) => {
height = sysinfo.windowHeight;
},
complete: () => {}
});
var currentWebview = this.$scope.$getAppWebview();
setTimeout(function() {
this.barHeight = plus.navigator.getStatusbarHeight();
var wv = currentWebview.children()[0];
wv.setStyle({
top: this.barHeight,
height: height - this.barHeight,
scalable: true,
})
}, 500);
// #endif
uniapp 设置web-view 的高度和顶部状态高度
最新推荐文章于 2024-06-20 17:25:53 发布