element 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)

    });

你可能感兴趣的:(element tree 无法默认选中)