Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/pages/components/layout/MainLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,18 @@ const MainLayout: React.FC<{
}}
locale={arcoLocale(i18n.language)}
componentConfig={{
Popconfirm: {
Select: {
getPopupContainer: (node) => {
return node.parentNode as Element;
return node;
},
},
}}
getPopupContainer={(node) => {
return node;
let p = node.parentNode as Element;
p = (p.closest("button")?.parentNode as Element) || p; // 確保 ancestor 沒有 button 元素
p = (p.closest("span")?.parentNode as Element) || p; // 確保 ancestor 沒有 span 元素
p = (p.closest("aside")?.parentNode as Element) || p; // 確保 ancestor 沒有 aside 元素
return p;
}}
>
{contextHolder}
Expand Down
Loading