doc bug ? #10349
Replies: 2 comments
-
I think this is not a doc bug. The doc is referring to assigning a new value to the computed property, like This code is not assigning a new value to the computed property. It is ignoring the computed property, and assigning a new value to the variable To avoid this kind of error, the tutorial and guide in the docs always use |
Beta Was this translation helpful? Give feedback.
-
thank @redblobgames |
Beta Was this translation helpful? Give feedback.
-
https://vuejs.org/guide/essentials/computed.html#writable-computed
Computed properties are by default getter-only. If you attempt to assign a new value to a computed property, you will receive a runtime warning.
but bottom my code.
html:
js:
but run result no warning in F12。
Beta Was this translation helpful? Give feedback.
All reactions