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

[FR]: Popover 能否增加一个参数,设置弹窗的宽度于目标节点宽度相同? #2500

Open
momtboy opened this issue Aug 24, 2023 · 0 comments
Labels
Feature Request 新功能请求 PR Welcome 已确认存在的问题,或者计划实现的功能,欢迎社区 PR

Comments

@momtboy
Copy link

momtboy commented Aug 24, 2023

这个功能解决了什么问题?

image

希望能和上面input框等宽,这种需求应该是比较常见的

你期望的组件设计是怎样的?

// 获取宽度
const getContentWidth = () => { let rect = useRect(popoverRef.value); if (props.targetId) { rect = useRect(document.querySelector(#${props.targetId}) as Element); } rootRect.value = rect; setTimeout(() => { conentRootRect.value = { height: popoverContentRef.value.clientHeight, width: popoverContentRef.value.clientWidth }; }, 0); };

新增参数 控制一下 conentRootRect 的宽度是否取rootRect的

@momtboy momtboy added the Feature Request 新功能请求 label Aug 24, 2023
@eiinu eiinu added the PR Welcome 已确认存在的问题,或者计划实现的功能,欢迎社区 PR label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request 新功能请求 PR Welcome 已确认存在的问题,或者计划实现的功能,欢迎社区 PR
Projects
None yet
Development

No branches or pull requests

2 participants