From 23c5eb13b9c22777c8551f79e5dbd3ea2c140ed4 Mon Sep 17 00:00:00 2001 From: zhenggengtong <1312771309@qq.com> Date: Thu, 17 Feb 2022 22:30:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9PCTree=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demoV2/Layouter/PCTree.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/demoV2/Layouter/PCTree.js b/demoV2/Layouter/PCTree.js index bd4eaa1..1692243 100644 --- a/demoV2/Layouter/PCTree.js +++ b/demoV2/Layouter/PCTree.js @@ -2,10 +2,14 @@ SV.registerLayout('PCTree', { - + sourcesPreprocess(sources) { - - sources[0].rootLabel = ['data', 'parent', 'firstChild']; + + for(let i = 0; i < sources.length; i++){ + if(sources[i].root){ + sources[i].rootLabel = ['data', 'parent', 'firstChild']; + } + } return sources; },