Skip to content

Commit

Permalink
chore: add changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohuoni committed Jun 16, 2022
1 parent a215b4e commit d7944da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilled-islands-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@alita/plugins': patch
---

fix: dropByCacheKey current page no closes
5 changes: 2 additions & 3 deletions packages/plugins/templates/keepalive/context.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export function useKeepOutlets() {
const element = useOutlet();
{{#hasTabsLayout}}
const navigate = useNavigate();
const runtime = getPluginManager().applyPlugins({ key: 'tabsLayout',type: 'modify', initialValue: {} });
const {local} = runtime;
const runtime = getPluginManager().applyPlugins({ key: 'tabsLayout',type: 'modify', initialValue: {} });
const { local } = runtime;
{{/hasTabsLayout}}
const { cacheKeyMap, keepElements, keepalive, dropByCacheKey } = React.useContext<any>(KeepAliveContext);
const isKeep = isKeepPath(keepalive, location.pathname);
Expand All @@ -52,7 +52,6 @@ const {local} = runtime;
if (newPanel[i] === targetKey) {
lastIndex = i - 1;
}
}
const newPanes = newPanel.filter(pane => pane !== targetKey);
if (newPanes.length && newActiveKey === targetKey) {
Expand Down

0 comments on commit d7944da

Please sign in to comment.