el-tree设置默认展开指定节点


    
data() {
    return {
      mydata: "",
      defaultProps: {
        children: "children",
        label: "LABEL",
        isLeaf: "leaf"
      }
    };
mounted() {
   
    searchPvtreeTwo()
      .then(res => {
        this.treedata2 = res.data.data;
        if (this.treedata2[0].LABEL) {
          this.mydata = this.treedata2[0].LABEL;
        }
      })
      .catch(res => {});
  },

你可能感兴趣的:(el-tree设置默认展开指定节点)