Open
Description
Version
Vben Admin V5
Describe the bug?
添加以下 css 即可让div.ant-app 不出现滚动条
#app {
/** fix: vben flex layout css bug **/
> div.ant-app {
/** 解决闪现滚动条问题 */
display: flex;
flex-direction: column;
> div > aside + div > main {
/** flex: 1 1 0%; 如果没有最小高属性,可能不会计算出正确的高度 */
min-height: 0;
}
}
}
其它页面 需要才可以滚动
<Page auto-content-height>
不过我实现不明白,为什么会有个 auto-content-heigh 来计算高,直接 flex 布局,<main>
overflow: auto 不好吗?是有什么问题?也就是说滚动条在内容区域 <main>
,之前也提过这个问题,官方也没说明白这么做会有什么影响。求解惑
要不然搞个preferences 参数 scrollByMain: true,让用户自己决定滚动条在哪里
Reproduction
官方 demo,使用开发者工具调整窗口大小即可重现
https://www.vben.pro/#/system/role
System Info
all
Relevant log output
Validations
- Read the docs
- Ensure the code is up to date. (Some issues have been fixed in the latest version)
- I have searched the existing issues and checked that my issue does not duplicate any existing issues.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.