el-tree设置导航树选中状态

setTreeCurrentKey (nodeKey) {
if (nodeKey) {
that.$refs.devTree.setCurrentKey(nodeKey)
} else {
that.$refs.devTree.setCurrentKey(null)
}
document.querySelector('.is-current')
},
// 设置导航树节点选中
setTreeSelectNodeByKey (nodeKey) {
// 延迟几秒执行
setTimeout(function () {
that.$nextTick(() => {
that.currentSelectNodeKey = nodeKey
that.setTreeCurrentKey(nodeKey)
})
}, 1000)
}
posted @ 2021-07-05 09:58  w20200618  阅读(1013)  评论(0)    收藏  举报