-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
[Feature Request] Collapse 支持当前被展开项目在动画结束前都保持在视口内 #12783
Comments
确认接纳这个功能后,我可以提供 PR 实现相应逻辑(Vue2、Vue3) |
Hello @luwuer. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to 你好 @luwuer,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到 |
如果实现不复杂的话,可以提供一个 props 来支持,欢迎 PR~ |
test 目录下的快照文件是 CI 自动更新的吗? |
遇到了同样的问题,下个版本会更新解决吗 |
What problem does this feature solve?
问题:Collapse 设置 accordion 属性,当展开内容有一定高度时,下一个展开项目在展开时可能因为滚动条变化而看不见任何内容,需要手动移动滚动条才能看到展开内容。
复现示例:https://codesandbox.io/p/sandbox/vant-issue-mo-ban-forked-zndg8k?file=%2Fsrc%2FApp.vue&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522cluwcsbhd00073a6jtyvtjrvw%2522%252C%2522sizes%2522%253A%255B100%252C0%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522cluwcsbhd00033a6jvble36nd%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522cluwcsbhd00043a6jf982yjct%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522cluwcsbhd00063a6jf734vlry%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522cluwcsbhd00033a6jvble36nd%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cluwcsbhd00023a6jq9nazv7i%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Fsrc%252FApp.vue%2522%257D%255D%252C%2522id%2522%253A%2522cluwcsbhd00033a6jvble36nd%2522%252C%2522activeTabId%2522%253A%2522cluwcsbhd00023a6jq9nazv7i%2522%257D%252C%2522cluwcsbhd00063a6jf734vlry%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cluwcsbhd00053a6jk926kov1%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A0%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522id%2522%253A%2522cluwcsbhd00063a6jf734vlry%2522%252C%2522activeTabId%2522%253A%2522cluwcsbhd00053a6jk926kov1%2522%257D%252C%2522cluwcsbhd00043a6jf982yjct%2522%253A%257B%2522tabs%2522%253A%255B%255D%252C%2522id%2522%253A%2522cluwcsbhd00043a6jf982yjct%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Afalse%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D
问题展示,视频(新展开项目 ——标题 1 ,消失在视口):
2024-04-12.15.41.28.mov
预期实现:
2024-04-12.15.55.30.mov
补充说明:
What does the proposed API look like?
CollapseItem 新增属性 expandInViewport ,默认 false,设置为 true 时表示展开内容需要呆在视口内,不会因为折叠项高度消失导致展开内容被滚动到视口外。
The text was updated successfully, but these errors were encountered: