Welcome to Qi-U Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
463 views
in Technique[技术] by (71.8m points)

echarts的resize不生效问题

vue中,使用封装的echarts组件自适应容器,全都是百分比+flex布局,结果容器缩放时,echarts不resize,其实已经调了resize方法了;

求助各位大神怎么解决


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

1 Answer

0 votes
by (71.8m points)
window.addEventListener("resize", () => {
    chartIns.resize()
}, false);

最好 用节流函数 控制一下


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Qi-U Community for programmer and developer-Open, Learning and Share

755k questions

547k answers

4 comments

86.4k users

...