Use $emit in echarts click event
//执行点击事件
let that = this; //解决this指向问题 TypeError: this.$emit is not a function
myChart.on('dblclick', function (params) {
console.log(params)
that.$emit("titleChanged","1")
}
);
},
If you write that.$emit("titleChanged","1") directly, an error will be reported! Giant pit