D
D
dicem2019-05-15 16:48:19
Vue.js
dicem, 2019-05-15 16:48:19

How to update v-for output in Vue?


I am making a square map editor based on a regular array.
I wrote down the following, on the top panel, select the type of block that will be placed and click on the map in the center, however, after clicking, the output of the array using v-for is not updated, although the console shows that the array has been updated.
How to fix it? Please help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-05-15
@dicem

You should still read the documentation :
Accordingly, instead of let it be

this.$set(this.terain[x], y, Number(this.cursorBlock))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question