html区域
<template>
<div id="echarts_bazaar" style="width: 100%; height: 90%" @click="spik()"></div>
</template>
函数区域
spik() {
const myChart = this.$echarts.init(document.getElementById('echarts_bazaar'))
myChart.on('click', function(param) {
window.open('跳转地址')
})
}
```
坑
需要在vue页面初始化时候调用spik函数,一进来先调用这个函数然后onclick点击后才会立刻执行
mounted() {
this.spik()
}