[Enhancement] [carousel] Carousel 走马灯 自动高度问题 指定宽高比,根据宽度自适应高度 #16828
21stc-09
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
需求场景
宽度占满屏幕的轮播图,长宽比例固定。根据浏览器宽度变化 动态调整轮播图高度。
问题
目前的自动高度面对轮播图的情况无法根据图片宽度进行自动调整。
设置
height
字段为auto
后,通过设置内容的width
为100%
,外部.el-carousel__container
元素的height
会为0,然后对内容进行溢出隐藏。Additional comments
目前可以根据监听
resize
来动态设置轮播图style
的height
来解决这个问题。但是感觉文档里的自动高度是否场景有点问题,于是提出这个issue,个人目前没见过走马灯里内容高度不一致的情况,如有场景希望告知一下。
0 votes ·
Beta Was this translation helpful? Give feedback.
All reactions