Skip to content

Emit issue on Vue 3. #196

@tejas208

Description

@tejas208

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

<script> 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); } }); }, }, }; </script> 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions