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

相关推荐
漂流瓶jz21 小时前
总结CSS组件化演进之路:命名规范/CSS Modules/CSS in JS/原子化CSS
前端·javascript·css
踩着两条虫21 小时前
「AI + 低代码」的可视化设计器
开发语言·前端·低代码·设计模式·架构
Jagger_21 小时前
项目上线忙碌结束之后,为什么总想找点事做?
前端
GalenZhang8881 天前
OpenClaw 配置多个飞书账号实战指南
前端·chrome·飞书·openclaw
steven~~~1 天前
为什么mq报错
javascript
萌新小码农‍1 天前
python装饰器
开发语言·前端·python
threelab1 天前
Three.js 初中数学函数可视化 | 三维可视化 / AI 提示词
开发语言·前端·javascript·人工智能·3d·着色器
爱学习的程序媛1 天前
浏览器工作原理全景解析
前端·浏览器·web
凉辰1 天前
解决 H5 键盘遮挡与页面上推
开发语言·javascript·计算机外设
我是若尘1 天前
用 Git Worktree 同时开多个需求,不用来回 stash
前端