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

相关推荐
用户63879947730520 分钟前
每组件(Per-Component)与集中式(Centralized)i18n
前端·javascript
SsunmdayKT20 分钟前
React + Ts eslint配置
前端
开始学java23 分钟前
useEffect 空依赖 + 定时器 = 闭包陷阱?count 永远停在 1 的坑我踩透了
前端
zerosrat24 分钟前
从零实现 React Native(2): 跨平台支持
前端·react native
狗哥哥24 分钟前
🔥 Vue 3 项目深度优化之旅:从 787KB 到极致性能
前端·vue.js
青莲84325 分钟前
RecyclerView 完全指南
android·前端·面试
青莲84325 分钟前
Android WebView 混合开发完整指南
android·前端·面试
GIS之路29 分钟前
GDAL 实现矢量数据转换处理(全)
前端
大厂技术总监下海30 分钟前
Rust的“一发逆转弹”:Dioxus 如何用一套代码横扫 Web、桌面、移动与后端?
前端·rust·开源
加洛斯30 分钟前
SpringSecurity入门篇(2):替换登录页与config配置
前端·后端