我在弹出窗口中有一个按钮,当我单击它时,我希望能够在vue组件中调用方法。我已经在使用vue传单,但是在这种情况下,我必须使用传单的本机弹出功能。
我尝试使用此L.DomEvent并使用popupopen事件,但是由于我有很多弹出窗口,因此onclick被调用了几次。
L.popup().setLatLng(bounds.getCenter()).setContent(this.getPopupDisplayContent()).openOn(map);
getPopupDisplayContent() {
return (
`<div><button type="button" id="add-button">Add</button></div>`
);
}