mirror of
https://gitee.com/yudaocode/yudao-ui-admin-vben.git
synced 2025-12-30 10:32:25 +00:00
7 lines
243 B
TypeScript
7 lines
243 B
TypeScript
/**
|
|
* Returns the parent node of the given element or the document body if the element is not provided.it
|
|
*/
|
|
export function getPopupContainer(node?: HTMLElement): HTMLElement {
|
|
return (node?.parentNode as HTMLElement) ?? document.body;
|
|
}
|