|
|
|
@ -257,8 +257,8 @@ export default { |
|
|
|
'nodeData.pId': { |
|
|
|
deep: true, |
|
|
|
handler: function (newV, oldV) { |
|
|
|
if (!newV || newV.trim().length === 0) { |
|
|
|
this.childrenNodeList = []; |
|
|
|
if (!newV || newV.trim().length === 0) { |
|
|
|
return; |
|
|
|
} |
|
|
|
const findNodeById = (nodes, targetId) => { |
|
|
|
@ -275,7 +275,11 @@ export default { |
|
|
|
return null; |
|
|
|
}; |
|
|
|
const foundNode = findNodeById(this.treeData1, newV); |
|
|
|
this.childrenNodeList = foundNode ? foundNode.nodeList : []; |
|
|
|
if (foundNode && foundNode.nodeList) { |
|
|
|
this.childrenNodeList = foundNode.nodeList.filter(node => node.nodeName!==null&&node.nodeName.trim()!==""); |
|
|
|
} else { |
|
|
|
this.childrenNodeList = []; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|