ant-design-vue
ant-design-vue copied to clipboard
Put multiple directory tree components (a-directory-tree) under a div container and expand, you will find that the top-level parent container is stretched, and the top-level parent container will have a scroll bar
- [x] I have searched the issues of this repository and believe that this is not a duplicate.
Version
3.2.11
Environment
ant-design-vue:3.2.11;vue:3.2.37;os:windows:Windows 10 21H2
Reproduction link
https://github.com/v9u/antd-tree-scroll-bug
Steps to reproduce
具体重现步骤如下(建议访问 https://github.com/v9u/antd-tree-scroll-bug 查看readme文档,里面有详细说明和截图):
-
克隆项目 https://github.com/v9u/antd-tree-scroll-bug
-
安装依赖 (pnpm i )
-
运行(pnpm dev)
-
打开页面 http://localhost:3000 ,然后将页面大小调整为露出点白色背景即可
-
折叠所有列表(使用url http://localhost:3000/?expand=0),可以发现页面右侧没有出现滚动条
正常状态截图:https://github.com/v9u/antd-tree-scroll-bug/blob/main/public/correct.png
6.展开所有列表(使用url http://localhost:3000/?expand=1),可以发现页面高度被撑开了,而且出现了滚动条
bug截图: https://github.com/v9u/antd-tree-scroll-bug/blob/main/public/bug.png
What is expected?
当目录树组件(a-directory-tree)展开时,应该只有目录树的父容器有滚动条,而不是把页面父容器撑开然后在页面上出现滚动条
What is actually happening?
当一个div容器下的多个目录树组件(a-directory-tree)展开时,该div父容器右侧出现了竖直滚动条,问题是页面父容器被撑开了,而且页面父容器上也出现了竖直滚动条
bug反馈页面上无法输入版本(Version 输入框);可以通过qq联系我,qq:2808949242
- [x] I have searched the issues of this repository and believe that this is not a duplicate.
Version
3.2.11
Environment
ant-design-vue:3.2.11;vue:3.2.37;os:windows:Windows 10 21H2
Reproduction link
https://github.com/v9u/antd-tree-scroll-bug
Steps to reproduce
具体重现步骤如下(建议访问 https://github.com/v9u/antd-tree-scroll-bug 查看readme文档,里面有详细说明和截图):
- 克隆项目 https://github.com/v9u/antd-tree-scroll-bug
- 安装依赖 (pnpm i )
- 运行(pnpm dev)
- 打开页面 http://localhost:3000 ,然后将页面大小调整为露出点白色背景即可
- 折叠所有列表(使用url http://localhost:3000/?expand=0),可以发现页面右侧没有出现滚动条
正常状态截图:https://github.com/v9u/antd-tree-scroll-bug/blob/main/public/correct.png
6.展开所有列表(使用url http://localhost:3000/?expand=1),可以发现页面高度被撑开了,而且出现了滚动条
bug截图: https://github.com/v9u/antd-tree-scroll-bug/blob/main/public/bug.png
What is expected?
当目录树组件(a-directory-tree)展开时,应该只有目录树的父容器有滚动条,而不是把页面父容器撑开然后在页面上出现滚动条
What is actually happening?
当一个div容器下的多个目录树组件(a-directory-tree)展开时,该div父容器右侧出现了竖直滚动条,问题是页面父容器被撑开了,而且页面父容器上也出现了竖直滚动条
bug反馈页面上无法输入版本(Version 输入框);可以通过qq联系我,qq:2808949242
通过不断搜索,找到了的类似问题(antd 库),但是解决方法确是更新版本:
Ant Design Drawer组件出现多滚动条:https://blog.csdn.net/qq_40593656/article/details/115507802
目前找到了一个解决方案,就是把多目录树组件(a-directory-tree)用 a-list-item 包起来, 放到一个 列表里组件(a-list)里面,具体见 https://github.com/v9u/antd-tree-scroll-bug/tree/fix
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.