javascript - vue2 ajax post data updated, but DOM not responding
ringa_lee2017-06-26 10:54:43
0
4
595
1. As shown in the figure: this.AreaData is the array. Every time ajax does the first thing, I clear it first and then assign it. The problem is that the assignment is Successful, but there is no response on the DOM. Why?
Try putting it into nextTick function
AreaData, please check if it is declared in the data configuration. If it has been declared, it should be OK.
I have also encountered it, and I don’t know the reason yet. The solution is to use localstorage to temporarily store it. I think it may be the reason. Please refer to this: vueSet
Confirm that this points to the vue object