智能控制中心,出版发布

This commit is contained in:
BBIT-Kai
2025-05-09 18:07:26 +08:00
commit f6f2a71d09
1374 changed files with 116035 additions and 0 deletions
@@ -0,0 +1,10 @@
/**
* If the node is holding inside a form, return the form element,
* otherwise return the parent node of the given element or
* the document body if the element is not provided.
*/
export function getPopupContainer(node?: HTMLElement): HTMLElement {
return (
node?.closest('form') ?? (node?.parentNode as HTMLElement) ?? document.body
);
}