默认选中树形的子节点方法this.$refs.tree.se

比如子节点id为7,

默认选中树形子节点 this.$refs.tree.setCurrentKey(7);

  mounted () {

this.$refs.tree.setCurrentKey(7);

},

HTML代码

        <el-tree

class="filter-tree"

:data="data"

@node-click="handleNodeClick"

:props="defaultProps"

highlight-current

node-key="id"

default-expand-all

:filter-node-method="filterNode"

ref="tree"

>

全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务