vue-vben-admin icon indicating copy to clipboard operation
vue-vben-admin copied to clipboard

Bug: vxe表格高度计算错误

Open dream-weave opened this issue 1 year ago • 6 comments

Version

Vben Admin V5

Describe the bug?

当把Grid放在一个grid布局的容器中,同时把Grid组件的高度设置为auto时,组件的高度会一直增长,如果在Grid的css上减去一定高度后这个问题消失 image 当代码为如图所示时,表格高度会一直增长

https://github.com/user-attachments/assets/7d2c398f-1fe4-4148-88b1-2f3dce08187d

但是当我加上这个css后bug消失 image

使用未封装的vxe-grid做了相同测试,没有出现这种现象

Reproduction

/

System Info

/

Relevant log output

No response

Validations

dream-weave avatar Oct 16 '24 10:10 dream-weave

还有另一个高度问题

https://github.com/user-attachments/assets/7109d2bd-b0b4-407c-8606-0b18c567a4e2

gaod高度只能加,它不会减

dream-weave avatar Oct 16 '24 10:10 dream-weave

如果父容器缺少 overflow: hidden 溢出隐藏。则只支持自适应宽高增大,不支持宽高自适应缩小,还会造成慢慢的卡顿缩放。 https://vxetable.cn/#/component/grid/base/autoHeight

imdap avatar Oct 16 '24 11:10 imdap

duplicate #4575

anncwb avatar Oct 16 '24 12:10 anncwb

通过以下方式可以解决 1、packages/@core/ui-kit/layout-ui/src/vben-layout.vue
根div添加class h-full image 2、packages/@core/ui-kit/layout-ui/src/components/layout-content.vue computed style 添加样式 minHeight: '1px', image

ming4762 avatar Nov 01 '24 08:11 ming4762

还有另一个高度问题

QQ20241016-182150.mp4 gaod高度只能加,它不会减

貌似这个还没解决。 😓

redcatH avatar Sep 04 '25 10:09 redcatH

这个问题在Model中也会存在,一直计算高度

ShingLi avatar Nov 21 '25 02:11 ShingLi