Vue如何在数据渲染完之后再调用函数
data(){
return{
deps:undefined
watch: {
'deps': function () {//'goodList'是我要渲染的对象,也就是我要等到它渲染完才能调用函数
this.$nextTick(function () {
//渲染完成后想要执行的代码
})
}
}
data(){
return{
deps:undefined
watch: {
'deps': function () {//'goodList'是我要渲染的对象,也就是我要等到它渲染完才能调用函数
this.$nextTick(function () {
//渲染完成后想要执行的代码
})
}
}