ruoyi-plus-vben5/packages/utils/src/helpers/get-popup-container.ts
Vben 8a0b1e0c72
refactor: package chart-ui integrated into plugins (#4238)
* refactor: package chart-ui integrated into plugins

* fix: lint error
2024-08-26 21:42:56 +08:00

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;
}