element plus tree树获取选中节点的id

//node-key="id" 一定要设置这个
      <el-tree ref="tree" :data="treemu" :props="defaultPropsmu"  
    node-key="id" style="height: 50vh; overflow: auto;" show-checkbox  :default-expanded-keys="expandArr"
 :default-expand-all="expandall"/>

const tree = ref(null);
const expandArr = ref([]);

const expandTree = (

猜你喜欢

转载自blog.csdn.net/u010782109/article/details/131706188