一开始想用setTimeout的方法来延迟执行,发现渲染的时间没办法把握正确。
需要结合watch监听某个属性:
watch:{
asyncArray:function(){
this.$nextTick(function(){
//方法
});
}
}
在这里找到了答案https://blog.csdn.net/qq_34223398/article/details/79292319
一开始想用setTimeout的方法来延迟执行,发现渲染的时间没办法把握正确。
需要结合watch监听某个属性:
watch:{
asyncArray:function(){
this.$nextTick(function(){
//方法
});
}
}
在这里找到了答案https://blog.csdn.net/qq_34223398/article/details/79292319