在created()里使用this.$nextTick()可以等待dom生成以后再来获取dom对象
this.$nextTick(() => {
console.log(this.$refs['hello'].innerText);
});
在created()里使用this.$nextTick()可以等待dom生成以后再来获取dom对象
this.$nextTick(() => {
console.log(this.$refs['hello'].innerText);
});