Skip to content
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

下拉组件能否添加根据页面/文档实际大小自动宽高的功能 #2044

Closed
4 tasks done
JKRaks opened this issue Jun 21, 2024 · 3 comments
Closed
4 tasks done
Labels
enhancement 改进或增强 good reproduction 提供了良好重现的议题,可以优先处理 has workaround 这通常意味着在面对某个技术难题或障碍时,找到了一种替代的、非标准但有效的方式来绕过该问题,使得相关的操作或流程能够继续进行

Comments

@JKRaks
Copy link

JKRaks commented Jun 21, 2024

议题条件

  • 我确认已查看官方使用文档:https://layui.dev ,但没有找到相关解决方案。
  • 我确认已在 Issues 中搜索过类似的问题,但没有找到相关解决方案。
  • 我已仔细阅读: 🍀 Layui Issue 贡献指南

议题类型

功能请求

使用版本

2.9.13

问题描述

在layer的弹出层内使用select经常会因为选项过多或者名字过长导致打开下拉框后超出页面最大宽高, 然后页面出现横滚或者竖滚的滚动条, 比较影响美观而且有时候会导致页面排版出问题, 使用也不太友好, 能否在form.render时控制 dl.layui-anim.layui-anim-upbit 下拉菜单的宽度和高度, 让他不超过可视区域或者文档区域, 或者针对过长/宽的下拉框能否自动调整弹出时下拉列表的位置而不是在下拉框元素下方对齐钉死

业务代码

下面放了一个我在使用的简单实现

截图补充

No response

浏览器

Microsoft Edge 版本 125.0.2535.85 (正式版本) (64 位)

演示地址

https://stackblitz.com/edit/stackblitz-starters-xbzzqo?file=index.html

友好承诺

  • 我承诺将本着相互尊重、理解和友善的态度进行交流,共同维护 Layui 良好的社区氛围。
Copy link

stackblitz bot commented Jun 21, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@Sight-wcg Sight-wcg added good reproduction 提供了良好重现的议题,可以优先处理 enhancement 改进或增强 labels Jun 21, 2024
@Sight-wcg
Copy link
Collaborator

  • 由于 feat(dropdown): 增强 dropdown 组件 #2132 当前版本暂无计划支持,select 面板相关优化将会放到后续大版本中
  • iframe 中定位相关问题不会处理
  • 非 iframe 建议开启 lay-append-to="body"

@Sight-wcg Sight-wcg added the has workaround 这通常意味着在面对某个技术难题或障碍时,找到了一种替代的、非标准但有效的方式来绕过该问题,使得相关的操作或流程能够继续进行 label Aug 9, 2024
@Sight-wcg
Copy link
Collaborator

ref #2155 (comment)

@Sight-wcg Sight-wcg closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 改进或增强 good reproduction 提供了良好重现的议题,可以优先处理 has workaround 这通常意味着在面对某个技术难题或障碍时,找到了一种替代的、非标准但有效的方式来绕过该问题,使得相关的操作或流程能够继续进行
Projects
None yet
Development

No branches or pull requests

2 participants