Methods: { HandleNodeClick (data, e) { Var that=this //the console. The log (data); The console. The log (e); Let the tree=this. $refs. Tree; /* e.c. with our fabrication: hecked=! Hecked; of e.c. with our fabrication: */ The console. The log (tree); Enclosing treeKey="";//initialize Enclosing breadList=[];//initialize if (! Um participant roups) { Enclosing getTreeNode (tree. GetNode (e.k ey)); Enclosing treeKey=e.k ey. Enclosing treeGroupType=um participant roupType; The console. The log (enclosing breadList [this. BreadList. Length - 1]). Var id=this. BreadList [this. BreadList. Length - 1]//generated below the right div the id with which we call interface }
Var ozi=document. GetElementsByClassName (" zi "); The console. The log (ozi); Var oipt=document. GetElementsByClassName (" ipt "); The console. The log (oipt);
For (the let I=0; i Ozi [I] index=I; Ozi [I] onclick=function (e) {
If (e & amp; & E.s topPropagation) { E.s topPropagation () } else { Window. The event. The cancelBubble=true }
The console. The log (ozi [this index], "chan"); Oipt [this index]. Checked=! Oipt [this index]. Checked; If (oipt [this index]. Checked==true) { The console. The log (id)//generated right div the id with which we call interface Let the add={ Title: 'page 1', ChildrenList: [ { Add: 'function 1-1' }, { Add: 'function 1-2' }, { Add: 'function 1-2' }, ] } That. TitleList. Push (add) } else { That. TitleList. Splice (this index, 1) } }; }
},
GetTreeNode (node) { //get the current tree node and the parent node If (node) { If (the node label!==undefined) { The console. The log (node. Key) This. BreadList. Unshift (node. Key);//add elements in the array head Enclosing getTreeNode (node. The parent);//recursive } } }, RenderContent: function (h, {node, the data and store}) { Var createElement method=the arguments [0]; Var level=the arguments [1]. The node. The level; The console. The log (the arguments [1]. The node. Data); If (node. Data. Idlast==false) { Return createElement method (" span ", [ //the createElement method (" I ", {attrs: {class: "folder"}}), /* */ CreateElement method (" span ", the arguments [1]. The node. The label) ]); } else { Return createElement method (" span ", {attrs: {style: 'background: # 1 d304c; color:white; Padding: 0 px; Border - the radius: 4 px 'class: "zi"}}, [ The createElement method (" input ", {attrs: {type: "checkbox," class: "the ipt," style: 'margin - right: 5 px'}}),