javascript - vue2 ajax post data updated, but DOM not responding
ringa_lee
ringa_lee 2017-06-26 10:54:43
0
4
676


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?

ringa_lee
ringa_lee

ringa_lee

reply all(4)
学习ing

Try putting it into nextTick function

this.$nextTick(() = {
  this.AreaData = back.commList
})
世界只因有你

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template