I define a model:
const model = defineModel({
type: String,
});
I define a ref
const query = ref();
I have an input with a v-model
of query
.
I wish to set model
to the value of query
, and when the input with v-model="query"
is typed in, I wish to update model
.
So I do:
model.value = computed(() => {
return query.value;
});
However, model is not updated. Why?