Openlayers select事件多次触发

我地图上有多个图标 我第一次点击图标会弹出对话框 然后第二次鼠标随便点击一个地方对话框又弹出来了 随后再怎么点就没有了 除非再次点击图标 不知道是为什么

selectFeature() {
                
                this.select = new Select({
                    
                    condition: click, //将默认的singleClick声明为click,使点击无延迟
                    style: false,
                    
                });
                this.map.addInteraction(this.select);
                this.select.on("select", (e) => {
                    
                    this.getAdd();
                    
                   // this.editDialog = true;
                    let coordinate = e.mapBrowserEvent.coordinate; //获取选择的坐标
                    let properties = e.selected[0].getProperties(); //获取当前要素的所有属性                  
                    this.programData = this.getProgram(properties["device_id"]);
                    //console.log("position:", coordinate);
                    //console.log(" properties:", properties);
                    //console.info(properties["device_id"])
                    
                    this.getProperties(properties["device_id"]);

                    
                });
                
            },

img


这个解决方法我试了没有用

img


这个有用