ustbhuangyi / vue-sell

:rice: Vue.js高仿饿了么外卖App课程源码 http://coding.imooc.com/class/74.html
3.46k stars 1.36k forks source link

为什么在nextTick的回调里取不到v-for的遍历的dom #70

Open aloneWang opened 6 years ago

aloneWang commented 6 years ago

数据是从store.getters中的拿的,视图上是已经渲染出来,为什么拿不到v-for遍历的dom?希望作者告知一下。感激! 1 2

这里console.log(lists)是undefined

3 4

lalayouchou commented 6 years ago

我也是这样,有解决方案嘛

lalayouchou commented 6 years ago

我解决了,使用updated()