uniapp 页面溢出滚动条问题(内容高度=页面-header-tabbar)

1.内容 scroll-view  scroll-y="true" :style="'height: '+clientHeight+'px;'"

:style="'height: '+clientHeight+'px;'"

clientHeight: null,

//减去头部  跟tabbar的高度


onReady() {
			uni.getSystemInfo({
				success(res) {
					// tabbar-container
					let info = uni.createSelectorQuery().in(this).select(".peopleSwipper")
					info.boundingClientRect((data) => {

						this.clientHeight = res.windowHeight - data.height
					}).exec(function(res) {



					})

					let know = uni.createSelectorQuery().in(this).select(".tabbar-container")
					know.boundingClientRect((data) => {

						this.clientHeight = this.clientHeight - data.height
					}).exec(function(res) {



					})



				}
			})
		}

猜你喜欢

转载自blog.csdn.net/weixin_53185230/article/details/127746180