2👍
✅
Your getValues()
approach is a common and fine approach. The expression and filter syntax in reactive expressions isn’t necessarily supposed to solve all data generation scenarios.
Another approach is to use a watch
against the model to calculate the value you want and set it as another property on the model. Then write your v-repeat
against that calculated value.
BTW, in your particular case, you should be able to do this:
<ul id="vue">
<li v-repeat="val: [ mykey1 ]">{{ val }}</li>
</ul>
$data
is just the model itself which references to attributes are evaluated against.
Source:stackexchange.com