-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
地图的高度如何设置为容器的高度 #70
Comments
同求,有解决方案了吗 |
再写一个style="height:100%"试试 |
疑似不支持百分比,我是这样解决的: const screenHeight = ref(window.innerHeight);
const updateHeight = () => {
screenHeight.value = window.innerHeight;
}; <BMap :height="screenHeight"/> |
不支持百分比是因为渲染容器外层还有一个div(也就是map组件根节点),这个div高度没有继承,所以再加一个 |
刚看到,发现作者已经解决了 :) |
谢谢 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请问组件的height应该如何设置,才能自适应父容器的高度,设置100%无效
The text was updated successfully, but these errors were encountered: