<el-tree
ref="treeRef"
:data="userListS"
:props="{ label: 'departmentName', children: 'child' }"
node-key="departmentId"
:default-expanded-keys="ruleForm.expanded"
:current-node-key="ruleForm.nodeKey"
highlight-current
/>
ruleForm.expanded = idx
nextTick(() => {
ruleForm.nodeKey = idx[idx.length-1]
treeRef.value.setCurrentKey(ruleForm.nodeKey)
});
网友评论