Emit issue on Vue 3.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 11.9k
- Forks
- 488
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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!
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.