1. 内部监听生命周期函数
<template> <div class="echarts"></div></template><script>export default {
mounted() {
this.chart = echarts.init(this.$el) // 请求数据,赋值数据 等等一系列操作... // 监听窗口发生变化,resize组件 window.addEventListener('resize', this.$_handleResizeChart) }, updated() {
// 干了一堆活 }, created
转载请注明原文地址:https://ipadbbs.8miu.com/read-18265.html