developit / developit/mitt

Emit issue on Vue 3.

Open
#196 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.9k
Forks
488
PR merge metrics
No merged PRs in 30d

Description

Hi,

Here is my app.js code:
import mitt from 'mitt'
const emitter = mitt();

app.config.globalProperties.$bus = emitter;

Here is my ActionButton.vue code









export default {
props: ["data", "index",'showDelete'],
methods: {
getBasicDetails(id) {
this.$bus.emit("details", id);
},
deleteRecord(id) {
this.$swal
.fire({
title: "Are you sure?",
html: "You want to delete",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#60217D",
cancelButtonColor: "#d33",
confirmButtonText: "Yes",
})
.then((result) => {
if (result.value) {
this.$bus.emit("delete", id);
}
});
},
},
};

When we click on the edit button that time this.$bus.emit() event is not fire. can you please help me for the error occured.

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.