Skip to content

Commit

Permalink
fix(lab): close all pages
Browse files Browse the repository at this point in the history
  • Loading branch information
xujingli committed Jan 24, 2024
1 parent b170955 commit b001bc7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,12 @@ const PanelRender: React.FC = () => {
items={undefined}
tabView={openedTabView}
shutdownAll={async () => {
openedTabView.children.forEach((item) => {
// dispose会影响原始数组,这里使用解构赋值copy一份数组。
for (const item of [...openedTabView.children]) {
if (item.title.closable) {
item.dispose();
}
});
}
}}
/>
<LibroCollapse
Expand Down

0 comments on commit b001bc7

Please sign in to comment.