Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.2k views
in Technique[技术] by (71.8m points)

vue移动端如何动态计算某部分高度?

image.png
image.png
image.png
如图所示,除了顶部和底部bar以外,下面附近驿站和搜索部分高度不同,我想动态计算地图的高度,使整体内容充满屏幕并不出现滚动条
image.png
手机上的情况和电脑上有所不同,不知道问题出在哪


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

使用弹性布局即可;地图那块是flex:1适应就行,下面这块flex:0 0 xx设置对应高度即可;


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...