diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js index 12e76a5b..9f7be8b9 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js @@ -102,6 +102,13 @@ export class MarkerCluster { "font-size:15px; background:#6f5757; color:#b39b9b;", this.infoWindow ); + //data.length 大于 5 取前5个数, 否则直接返回data + const pageSize = 6; + let pageNum = 1; + const dataFisrtPage = + data.length > pageSize + ? data.slice((pageNum - 1) * pageSize, pageSize) + : data; this.infoWindow.setContent(`