Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

父组件从后台拿数据,updated执行完了,子组件都没有渲染到dom里面,怎么在父组件里面拿到所有子组件都渲染完成后的dom?

我的需求:
一个div包着所有的子组件 我要等子组件加载完了 去控制这个div的滚动条在顶部


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
682 views
Welcome To Ask or Share your Answers For Others

1 Answer

// updated中这么试试
this.$nexrTick(function(){
    console.log("dom渲染完了");
});

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...