v-model
warning when using computed property as a duplicate of prop in Vue 3.3.0-beta.1
#8148
Labels
v-model
warning when using computed property as a duplicate of prop in Vue 3.3.0-beta.1
#8148
Vue version
3.3.0-beta.1
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-kp9nxc?file=src%2FApp.vue,src%2Fcomponents%2FTextField.vue&terminal=dev
Steps to reproduce
The following code snippet can be executed in Vue 3.2.47, even it's not recommended.
It defines a computed property
modelValue
that duplicatesprops
, and usesmodelValue
computed property two-way binding with<input>
in the<template>
. In Vue 3.2.47, no warning is thrown. However, in Vue 3.3.0-beta.1, a warning is displayed.What is expected?
Although this is not a good practice, it should not throw a warning.
What is actually happening?
System Info
[plugin:vite:vue] 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.
Any additional comments?
I'm not sure if this was intended, if so please close this issue.
The text was updated successfully, but these errors were encountered: