- 高亮指定节点
this.$refs.taskTreeRef.setCurrentKey(id)
- 获取节点
dom
const targetDom = document.getElementsByClassName('el-tree-node is-current is-focusable')[0]
- 定位
setTimeout(() => {
if (targetDom) {
this.$nextTick(() => {
targetDom.scrollIntoView({ behavior: 'instant', block: 'end', inline: 'nearest' })
})
}
}, 100)