-
Notifications
You must be signed in to change notification settings - Fork 23
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
iframe 会刷新页面 #31
Comments
iframe 的问题已经记录过了,不过没找到解决方式,原因是对 iframe 标签进行的 dom 移位操作一律会引起刷新,但 keep-alive 的工作方式是必须进行 dom 移位... |
没看懂,刷新页面是指什么? |
@chj-damon 就是 iframe 内部会执行 location.reload() 之类的操作 |
@CJY0208 https://wuli-admin.gitee.io/react-mat-pro/#/dashboard 利用react-activation + ReactDom.createPortal 实现的缓存 |
没看明白,似乎没有发生 dom 移位,感觉不一定是 activation 在生效 |
keepAlive嵌入outlet缓存的name,只是把iframe组件通过createPortal转移到keepAlive外层 |
@Aaron52077 也就是需要对 keep alive 内的 iframe 做手动处理 |
无需处理 |
代码能看一下嘛?我看看有没有可能搬到 activation 内部 |
|
请问React Mat Pro有开源吗? |
暂时没有,还在完善一些功能 |
|
createPortal的实现能看下吗 |
这个问题有后续吗?有解决demo吗 @CJY0208 |
https://wuli-admin.gitee.io/react-mat-pro/ 老哥,,这个项目方便开源吗 |
https://codesandbox.io/s/umi-keep-alive-tabs-demo-forked-teqs5?file=/src/pages/setting.js
The text was updated successfully, but these errors were encountered: