mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-12 18:56:01 +00:00
16 lines
367 B
TypeScript
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 });
|
|
});
|
|
},
|
|
};
|