0👍
You can’t use computed property
in data
, because data
evaluates before the computed properties
did.
You can use a watcher
to achieve the intended result. Have a look at the documentation, you can add the argument immediate
to trigger the callback immediately with the current value of the expression.
Computed properties
are already accessible in the template
by using {{}}
. You don’t need to put a this
in front of the computed.
- [Vuejs]-Yarn serve command serves old file version on WSL
- [Vuejs]-Nuxt js application freezing without any reason
Source:stackexchange.com