My code
const props = defineProps({
isOpen: {
type: Boolean,
default: true,
default: false,
},
closeModal: {
type: Function,
required: true,
},
closeModal2: {
type: Function,
// access and change the value of the prop => props.isOpen
},
});
I want to get and change the value of isOpen
in closeModel2
prop. Is it possible?
If yes then how can we achieve it?
CodePudding user response:
You can't. What you can do is emit an event from that component to the parent component which controls the isOpen
reactive value and change it there.