click event as props in Vue.js
问题 I created a dynamic overlay component with Vue.js to handle the close event, when we click on the screen away from the intended object the object closes my problem here the click event does not work here's my code <template> <button v-if="action" @click="clicked" tabindex="-1" class="fixed z-40 w-full h-full inset-0 bg-black opacity-50 cursor-default" ></button> </template> <script> export default { name: "Overlay", props: { action: Boolean, }, methods: { clicked() { if (this.action === true)