vue+echarts:echarts地图页面跳转

在setOption的平级写点击事件,给chart添加click监听

javascript 复制代码
 getmapChart.setOption({
  ......
    })

//和数据对应即可
//点击区域实现页面跳转
  getmapChart.on('click',function(params){
    // console.log(params);
    switch(params.name){
    case "xxxx":
      top.location.href="/profile";
      break;
    case "xxxx1":
      top.location.href="/profile";
      break;
    case "xxxx2":
      top.location.href="/profile";
      break;
   
    default:
      ElNotification({
            title: "提示",
            message: "请点击!!!",
            type: "warning",
        });
      break;
    }
  })

上一篇文章,

uniapp踩坑之项目:uni-table垂直居中和水平居中-CSDN博客文章浏览阅读651次。uniapp踩坑之项目:uni-table垂直居中和水平居中。uni-table 中的水平居中uni-td align="center"_uni-tablehttps://blog.csdn.net/weixin_43928112/article/details/140434217?spm=1001.2014.3001.5502

相关推荐
JarvanMo1 小时前
Dart 3.13:小版本,大动作
前端
纯粹的热爱1 小时前
Ubuntu 安装 Node.js 22.x(通过 NodeSource 官方源)
前端
Highcharts1 小时前
如何选择正确的图表:驱动理解和洞察力的三部分框架(第3部分)
前端·数据可视化
JavaGuide1 小时前
Github 史诗级故障,与此同时,Cursor 版「GitHub」正式上线!
前端·后端
郭邯1 小时前
用 AI 写了一个经纬度格式转换工具,从需求到落地的完整过程
前端
不一样的少年_1 小时前
修了 Bug、做了重构,为什么老板还是觉得你没产出?
前端·后端·程序员
马可家的菠萝1 小时前
Vue3 + Canvas 手绘笔记工程化实践:别把画布只当成一张 PNG
前端·vue.js·算法
IMPYLH1 小时前
HTML 的 <h1>–<h6> 元素
前端·javascript·html
IMPYLH2 小时前
HTML 的 <head> 元素
前端·html