在mounted获得vue的实例要加
this.$nextTick(function () {
// 代码保证 this.$el 在 document 中
})
mounted: function () {
this.$nextTick(function () {
// 代码保证 this.$el 在 document 中
console.log(vm)
})
}
在mounted获得vue的实例要加
this.$nextTick(function () {
// 代码保证 this.$el 在 document 中
})
mounted: function () {
this.$nextTick(function () {
// 代码保证 this.$el 在 document 中
console.log(vm)
})
}