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

相关推荐
NEXT0610 分钟前
后端跑路了怎么办?前端工程师用 Mock.js 自救实录
前端·后端·程序员
装不满的克莱因瓶1 小时前
Java7新特性:try-with-resources写法
java·前端·javascript·jdk·新特性·jdk7
SailingCoder3 小时前
【 从“打补丁“到“换思路“ 】一次企业级 AI Agent 的架构拐点
大数据·前端·人工智能·面试·架构·agent
~央千澈~3 小时前
抖音弹幕游戏开发之第12集:添加冷却时间机制·优雅草云桧·卓伊凡
java·服务器·前端
CappuccinoRose3 小时前
CSS 语法学习文档(十三)
前端·css·学习·postcss·模块化·预处理器
OpenTiny社区3 小时前
Angular Module→Standalone 架构进化解析
前端·架构·angular.js
哆啦A梦15884 小时前
Vue3魔法手册 作者 张天禹 06_监控
前端·vue.js·typescript
恋猫de小郭4 小时前
你知道不,你现在给 AI 用的 Agent Skills 可能毫无作用,甚至还拖后腿?
前端·人工智能·ai编程
用户600071819105 小时前
【翻译】用生成器实现可续充队列
前端
少云清5 小时前
【UI自动化测试】4_web自动化测试 _元素定位(重点)
前端·web前端自动化