Doubts about using v-model when getters return objects #2144
Unanswered
ParkerFiend
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Reproduction
https://stackblitz.com/edit/github-i1nwig
When I use getters to return an object,
I also use input boxes to v-model bind the object's properties.
At this point, manipulating the attribute values in the input box will directly change the corresponding data in the store(input2).
But if I set getters directly for specific attribute values, this situation wouldn't happen (input1).
If I want to be specific about the attributes and achieve the effect of the second input box,
I still need to use both Writable Computed and storeToRefs(input3).
Does this meet expectations?
How do I understand and use the above situations in the project?
Beta Was this translation helpful? Give feedback.
All reactions