From e1fb89c19e29447b108d3b959e222049a6b02e93 Mon Sep 17 00:00:00 2001 From: 徐旺旺 <11530253@qq.com> Date: 星期四, 29 四月 2021 17:52:35 +0800 Subject: [PATCH] fix bug --- src/components/LayerController/service/WfsLayerService.js | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/components/LayerController/service/WfsLayerService.js b/src/components/LayerController/service/WfsLayerService.js index a01d35d..b35fa41 100644 --- a/src/components/LayerController/service/WfsLayerService.js +++ b/src/components/LayerController/service/WfsLayerService.js @@ -63,8 +63,15 @@ }) }, onEachFeature: (feature, layer) => { + const popupDatas = [] + const properties = feature.properties + popupDatas.push({ + title: properties.wellname || properties.devicename || properties.name, + name: feature.id, + content: properties + }) layer.bindPopup((layer) => { - this.popupComp.setDatas(layer) + this.popupComp.setDatas(popupDatas) this.popupComp.setShow() return this.popupComp.$el }, { -- Gitblit v1.8.0