main.js中

import echarts from 'echarts'

Vue.prototype.$echarts = echarts

 

vue文件中

  _this.calendarChart=_this.$echarts.init(document.getElementById('earlyWarningCalendar'))

_this.calendarChart.on('click',function (param) {

        console.log(param)

})  

_this.calendarChart.setOption(_this.scatterOption)

vue 项目引入 echarts 添加点击事件

console结果

vue 项目引入 echarts 添加点击事件

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-11
猜你喜欢
  • 2021-08-17
  • 2021-10-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-31
  • 2021-12-04
相关资源
相似解决方案