feat: 初始化项目基础结构和配置

This commit is contained in:
2026-01-06 17:56:57 +08:00
commit 397706bf2d
949 changed files with 80481 additions and 0 deletions

View File

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