0👍
Sounds like you can’t be sure if the input variable is a ref. You can use unref()
to optionally unpack it. Throwing in a check never hurts either:
const unpackedModal = unref(activeModal)
if (unpackedModal) {
unpackedModal.ref = activeModalRef.value;
}
0👍
I think ref couldn’t found in mounted..
You should do this.
onMounted(() => {
activeModal.value = activeModalRef.value;
});
Source:stackexchange.com