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

Pro v5 中使用 KeepAlive 包裹的组件没有渲染出来 #32

Open
KingThq opened this issue Feb 1, 2021 · 6 comments
Open

Pro v5 中使用 KeepAlive 包裹的组件没有渲染出来 #32

KingThq opened this issue Feb 1, 2021 · 6 comments

Comments

@KingThq
Copy link

KingThq commented Feb 1, 2021

image

这样写没问题吧?还需要在其他地方有配置吗?

@CJY0208
Copy link
Member

CJY0208 commented Mar 28, 2021

这样写应该是没问题的,能提供你的 demo 吗?

@jiangyh1024
Copy link

@CJY0208

umi 里面我想让 所有的路由 都被cache

image

tab对应路由
image

但是除了首页只有第二个tab 可以正常显示

第三个tab里面显示的路由 是第二个tab对应路由的内容

@1195002442
Copy link

@CJY0208

umi 里面我想让 所有的路由 都被cache

image

tab对应路由 image

但是除了首页只有第二个tab 可以正常显示

第三个tab里面显示的路由 是第二个tab对应路由的内容

请问解决了吗,我也需要所有的路有都被包含,做成多标签tab的。单个写很显然不太正常

@chenyu1990
Copy link

我用了 umi-plugin-panel-tabs 能渲染全部路由,但是子组件,例如 BetaSchemaForm,第二次打开就不会渲染表单了。

@CJY0208
Copy link
Member

CJY0208 commented Jun 6, 2022

@chenyu1990 看看 node_modules 内部用的 umi-plugin-keep-alive 版本是多少?升到 beta.31 试试

@shenjunru
Copy link

欢迎试用 react-fiber-keep-alive,https://www.npmjs.com/package/react-fiber-keep-alive
一个基于 react fiber 的 keep-alive 实现。
除 react 和 react-dom 之外,没有任何其他 dependency。

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

6 participants