随笔分类 - 第三方插件库 / echarts
摘要:给 servies 设置 center 中心点,缩放事件监听,判断最小的时候,给他设置中心点,放大的时候,自动获取中心点 中心点代码 // echarts设备树形结构 initTree() { const echartDom = this.$refs.myEchartsRef; this.myCha
阅读全文
摘要:屏幕放大、缩小,自适应 this.myChart 是获取存放图标的盒子元素 mounted() { window.addEventListener("resize", () => { this.myChart.resize(); }); }, beforeDestroy() { window.rem
阅读全文
摘要:放大缩小代码 使用getZr()注册和取消mousewheel事件 字体大小设置放在 textStyle 里面 this.myChart.getZr().off("mousewheel") this.myChart.getZr().on("mousewheel", (param) => { let
阅读全文
摘要:原因:初始化没有获取到元素 方法:初始化的时候,使用$nextTick延后执行 mounted() { this.init(); }, methods: { init() { this.$nextTick(() => { this.initPic(); }); }, initPic() { cons
阅读全文