关于element-ui el-tree 无CheckBox时获取当前选中id
需要在el-tree 中设置 key 是什么 node-key=“id”
this.$refs.tree.currentNode.node.id
手动选中高亮
this.$refs.tree.setCurrentKey(id)
当无法赋值时,可使用
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(id)
})
开了高亮只有高亮,