0๐
โ
If I understood right, the problem you are having is that the template is not being updated according to the data
, as we can see on this fiddle: https://jsfiddle.net/gen1kL3y/
This is issue is related to how Vue Reactivity works.
You can find another similar question here and I made a working JS fiddle for you here: https://jsfiddle.net/vz11zdjc/
Basically, instead of setting the value as this.expandArea[id] = !this.expandArea[id]
, you should (among other options) use Vue.set(this.expandArea, id, !this.expandArea[id])
Source:stackexchange.com