vue生命周期
mounted () {
},
如果生命周期还是不好用,在语句外套用this.$nextTick方法
this.$nextTick(function () {
this.x= document.getElementsByClassName('x')[0]
})
vue生命周期
mounted () {
},
如果生命周期还是不好用,在语句外套用this.$nextTick方法
this.$nextTick(function () {
this.x= document.getElementsByClassName('x')[0]
})