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

相关推荐
陈随易1 天前
有生之年系列,Nodejs进程管理pm2 v7.0发布
前端·后端·程序员
冰暮流星1 天前
javascript之事件代理/事件委托
前端
@yanyu6661 天前
登录注册功能-明文
vue.js·springboot
陈随易1 天前
AI时代,你还在坚持手搓文章吗
前端·后端·程序员
里欧跑得慢1 天前
17. Flutter Hero动画实现:让界面过渡更加优雅
前端·css·flutter·web
IT_陈寒1 天前
Vue的这个响应式陷阱,我debug了一整天才爬出来
前端·人工智能·后端
cn_mengbei1 天前
用React Native开发OpenHarmony应用:Reanimated共享元素过渡
javascript·react native·react.js
kyriewen1 天前
前端测试:别为了100%覆盖率而写测试,那是自欺欺人
前端·javascript·单元测试
去伪存真1 天前
我自己写的第一个skills--project-core-standards
前端·agent
Data_Journal1 天前
如何使用cURL更改User Agent
大数据·服务器·前端·javascript·数据库