Open
Description
Vue version
3.5.13
Link to minimal reproduction
Steps to reproduce
have a three component deep hierarchy, e.g.: App
- Middle
- Inner
as per the repro
in App
, declare a ref
to hold the value
pass it to Middle
via v-model
in Middle
,
- only use
defineModel
, but don't store it in a localconst
- pass it to
Inner
viav-model
What is expected?
I would expect one of the following
- it should work (same way when I use a prop/model only in the template then I don't have to store it in a local const)
- an error message telling me I should probably store the
Middle
's model in a local const - an explanation/warning in the docs in https://vuejs.org/guide/components/v-model.html
What is actually happening?
A misleading (though technically probably correct) error message
(2:28) v-model cannot be used on a prop, because local prop bindings are not writable. Use a v-bind binding combined with a v-on listener that emits update:x event instead.
System Info
Any additional comments?
the repro is the stripped down to the core prod code we used that triggered the issue
in the repro, in MiddleComponent.vue it has the working version too, just commented out
p.s.: https://new-issue.vuejs.org/?repo=vuejs/core doesn't prefill the github anymore