Files
wanderer/assets/js/hooks/maps/mapAction.ts
Dmitry Popov 4136aaad76 Initial commit
2024-09-18 01:55:30 +04:00

16 lines
367 B
TypeScript

export default {
mounted() {
const hook = this;
this.el.addEventListener('click', e => {
e.preventDefault();
e.stopPropagation();
if (hook.el.dataset.confirm) {
if (!confirm(hook.el.dataset.confirm)) {
return;
}
}
this.pushEvent(hook.el.dataset.event, { data: hook.el.dataset.data });
});
},
};