uniapp 不同端 页面部分内容滚动设置scroll-view高度

<scroll-view scroll-y="true" :style="{height: scrollHeight}">
	<block v-for="(item,index) in list" :key='index'>
		<work-list></work-list>
	</block>
</scroll-view>
onLoad() {
	uni.getSystemInfo({
	    success:  (res)=> {
			const wid = res.windowWidth
			const hei = res.windowHeight
			// 230是除了可滚动区域外的其它部分占的rpx高度
			this.scrollHeight=(hei/(wid/750)-230)*(wid/750) +'px'
	    }
	});
},
发布了12 篇原创文章 · 获赞 2 · 访问量 390

猜你喜欢

转载自blog.csdn.net/qq_42739199/article/details/105140350
今日推荐