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

在IOS12上,反复切换SPA路由多次后,页面白屏 #630

Closed
shihuacivis opened this issue Aug 1, 2019 · 7 comments
Closed

在IOS12上,反复切换SPA路由多次后,页面白屏 #630

shihuacivis opened this issue Aug 1, 2019 · 7 comments

Comments

@shihuacivis
Copy link

  • F2 Version: 3.4.0
  • Platform: IOS 12.3
    react-router: 5.0.1
    react: 16.8.4

F2图表嵌套在React组件中,在组件生命周期componentWillUnmount中调用chart.destroy()方法销毁图表。当SPA反复切换路由时(前进后又后退),一开始表现正常。大约往复10次后,页面上的大部分图表变成空白(部分正常显示)。此时即使刷新页面图表也无法正常显示,必须关闭浏览器窗口重开。
以上问题在IOS12的iPhone上必现。怀疑页面的canvas缓存没有正确释放。

  componentWillUnmount() {
    this.chartContainner && this.chartContainner.destroy();
    this.chartContainner = null;
    this.cvs = null;
    this.chartRendered = false;
  }
@thinkeyy
Copy link

我这边遇到了同样的问题,目前有什么方法解决吗

@LCF1314
Copy link

LCF1314 commented Dec 19, 2019

这个问题怎么解决

@LCF1314
Copy link

LCF1314 commented Dec 19, 2019

?????

@LCF1314
Copy link

LCF1314 commented Dec 20, 2019

???

@LCF1314
Copy link

LCF1314 commented Dec 20, 2019

????????????

@snowkeda
Copy link

这个问题怎么解决

建议先不走spa。后期解决在走spa

@zengyue
Copy link
Member

zengyue commented Mar 17, 2020

@zengyue zengyue closed this as completed Mar 17, 2020
zengyue added a commit that referenced this issue Mar 18, 2020
fix: ios spa多次创建导致canvas白屏。Closed #630
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants