Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keepalive如何在components/hooks外清空其他tabs #603

Closed
SADYX opened this issue Sep 5, 2023 · 2 comments
Closed

keepalive如何在components/hooks外清空其他tabs #603

SADYX opened this issue Sep 5, 2023 · 2 comments

Comments

@SADYX
Copy link

SADYX commented Sep 5, 2023

请问如何在components/hooks外清空其他tabs?因为除了dropByCacheKey外的clear方法都是从KeepAliveContext取出的,所以只能在components/hooks内使用。
如果没有方法能处理,可能就只能用dropByCacheKey方法来遍历路由了

@xiaohuoni
Copy link
Member

是在什么场景下呢?详细描述一下,最好给个 demo

@SADYX
Copy link
Author

SADYX commented Sep 7, 2023

最后还是把逻辑改写到 compoent 里了。发现这个需求不是很重要,因为 components/hooks 内清空 tabs 已经满足了绝大多数要求

@SADYX SADYX closed this as completed Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants