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

改变窗口大小,被keep-alive的echarts图表宽高会出现问题? #3198

Open
IkeChen0426 opened this issue May 19, 2020 · 1 comment

Comments

@IkeChen0426
Copy link

IkeChen0426 commented May 19, 2020

Bug report(问题描述)

改变窗口大小,被keep-alive的echarts图表宽高会出现问题?

keep-alive的echarts图表,在改变窗口大小时Echarts resize时宽高会查询不到,
导致返回图表,宽高错位

Steps to reproduce(问题复现步骤)

1、打开两个菜单,其中一个有Echarts
2、切换到另一个菜单,含Echarts页面被keep-alive
3、改变窗口大小
4、返回含Echarts页面,图表发生错位

Screenshot or Gif(截图或动态图)

image

Link to minimal reproduction(最小可在线还原demo)

暂无

Other relevant information(格外信息)

处理方法,在Charts-->mixins-->resize.js
activated 钩子里重新resize

  activated() {
    this.__resizeHandler();
  }
@SuperZiLu
Copy link

大佬请教一下我正常情况下改变窗口大小为什么图表都不能适配啊?

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