this.$refs[this.letter]是什么意思,有点不懂
来源:8-6 Vue项目城市选择页 - 兄弟组件数据传递
yyf4069502
2018-07-12
list.vue组件中,watch监听下的this.$refs[this.letter]是什么意思,有点不懂?
watch: {
listLetter () {
if (this.letter) {
const element = this.$refs[this.letter][0]
this.scroll.scrollToElement(element)
console.log(element)
}
console.log(this.listLetter)
}
}写回答
1回答
-
Dell
2018-07-14
获取到字母对应的dom元素
042019-01-17
相似问题